Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

because of a transition from MS Exchange to Courier IMAP, all our old mail messages have a winmail.dat attachment, which sometimes contains also the message's original attachments. I am looking for a tool which will scan a whole Maildir and convert the winmail.dat-s to "normal attachments" (or delete the ones that just contain the RTF version of the message). I realize there are some commandline tools for *nix, but I have not found an automated solution to process whole Maildirs. Suggestions?

share|improve this question
up vote 1 down vote accepted

Some searching over the last few minutes reveals that a lot of people are using Outlook Express or Thunderbird to do this kind of conversion by downloading the messages and then moving them back to the IMAP server. If you have just a few mailboxes to do that might end up being the path of least resistance.

It looks, to me, like you're going to either be chaining a group of smaller utilities together or scripting something "from the ground up" yourself. It looks like there are probably enough Python and Perl modules that handle parsing maildirs that it shouldn't be too hatefully bad to write. It doesn't look like fun, though. (I hate writing code that deals with email, personally...)


Here's a couple of links re: the Outlook / Outlook Express converstion of WINMAIL.DAT files. I haven't got any of these messages w/ TNEF attachments laying around in a handy place to give it a try.

share|improve this answer
Neither OE nor Thunderbird seem to be able to decode winmail.dat's by default, so I assume they are using some third party utility? – Marie Fischer Jul 17 '09 at 19:55
I'm on-site right now. When I can grab a second I'll post up some of the links I've seen re: this conversion. – Evan Anderson Jul 17 '09 at 20:53
Thanks for the links, I finally tried the IMAP -> copy to Outlook Personal Folders -> Import into Outlook Express -> move back to IMAP variety and it works. Might be the easiest way indeed. – Marie Fischer Jul 28 '09 at 12:35
Glad to hear it worked. I sure hope you don't have hundreds of mailboxes to do! It surprises me, actually, that somebody doesn't have a solution out there already. What version of Exchange are you migrating off of, anyway? – Evan Anderson Jul 28 '09 at 12:45

Sorry to respond to such an old question - I'm sure the above answers and comments are a good solution - but I'd like to point to tnef ( and which perhaps could be used to script a solution.

(Full disclosure: I am the author/maintainer of that tool).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.