Opening winmail.dat files from Outlook attachments

Occasionally I receive emails from people which have a single attachment named winmail.dat. After a bit of searching online, it turns out that Microsoft Outlook, depending on how it is configured, uses the MIME type application/ms-tnef for attachments, which other mail clients (e.g. Thunderbird) can’t read.

Unfortunately I couldn’t find a simple way to patch other mail clients to read these files, and the extension that was available for Thunderbird has not been updated for over 7 years and so is unlikely to work. However, someone has helpfully created a program for Linux called TNEF, with the source code available on GitHub.

Installation is relatively simple, I used the following steps:

git clone
cd tnef
./configure --prefix=/home/paul/bin/tnef
make check
make install

To extract the files contained within winmail.dat, save the attachment locally (e.g. to /tmp) and then run:

tnef -f /tmp/winmail.dat -C /tmp/

It might be possible to automate the above steps so that Thunderbird calls tnef with the appropriate options, but I haven’t had time to investigate that. Please let me know in the comments if you’re aware of an alternative option which would integrate with the latest versions of Thundebird (60.x).

2 thoughts on “Opening winmail.dat files from Outlook attachments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.