All too often nowadays people report that they "can't open the attachment" of an email, because they only received a file named (typically) "Winmail.dat", "Win.dat", or "Part 1.2". Here's a brief explanation of the problem, and what to do about it.
The basic problem is that in certain cases Microsoft's Outlook or Exchange programs use a nonstandard extra packaging mechanism called "ms-tnef" or "tnef" when it sends email - typically when it sends attachments. What Outlook is supposed to do is simply use the industry standards (such as MIME and HTML) directly for attachments, but Outlook fails to do so and adds this other nonsense instead. The full name of the format is "Transport Neutral Encapsulation Format", but that is a misleading name, because it obstructs reception due to its non-neutral, non-standard nature.
Most other email readers cannot read this nonstandard format. Email clients that can't (currently) read this format include Lotus Notes, Thunderbird / Netscape Mail, and Eudora. In fact, even Microsoft's own Outlook Express can't read this format!
If your e-mail program receives a TNEF file and doesn't understand it, instead of seeing the e-mail and/or attachment, you may only see an attachment named "Winmail.dat", "win.dat", "Part 1.2", or something else ending in ".dat" or ".eml". You can get software to read this file format, if you need to; the details are below.
The problem seems to be two-part: Microsoft Outlook (their "client" program, used on the desktop) and Microsoft Exchange (their "mail server" program, used by a group of people to send and receive email with the rest of the world).
If you use Microsoft Outlook, and want to send attachments outside your office, you have to reconfigure Outlook so that other people can read the files you send :-(. Ideally, convince your IT department to fix your whole organization.
According to MozillaZine, Outlook 2002/XP and Outlook 2003 should be configured this way so that email sent outside is not corrupted:
If you prefer, in all versions of Outlook, you can disable TNEF completely:
One oddity: don't send a calendar entry / meeting invitation and an attachment in the same message; some versions of Outlook will send TNEF in this case, even if you've told it not to.
Alternatively, one of the best ways to improve the security of Windows clients is to stop using Microsoft Outlook and Internet Explorer. These two programs are the top two ways that Windows systems get exploited. Replacing them with more secure applications is more important than installing a virus checker - yes, Windows systems also need virus checkers, but cover your oozing wounds before worrying about innoculations. A simple and free way to do that is to get Mozilla Firefox and Thunderbird, but just about any alternative will do.
Microsoft Exchange can be configured to stop sending nonstandard formats.
So, you just received a nonstandard format - now what? Well, you could tell the sender to configure their email client to send files in standard formats. That's a very friendly gesture; they almost certainly have no idea that their program is sending data others can't read, so you'll do a lot of people a favor. Feel free to give them a link to this page, if it would help: https://dwheeler.com/essays/microsoft-outlook-tnef.html
But sometimes that's impractical. In that case, there are tools for reading TNEF files in other readers. Here are a few that seem to work; I'm sure there are many others.
First, I should note that for many systems and email clients, this is a non-issue. For example, the Linux distribution "Fedora Core 5" normally invokes a TNEF reader when trying read such files (e.g., from Thunderbird). (If you need the details, it can use the "ktnef" program, which is part of the kdepim package.)
For Mac, "TNEF's Enough" is one such tool for reading. I've heard from people who are happy with it. It's freeware. Get it from here: http://www.joshjacob.com/macdev/tnef/index.html
Another one is tnefDD for Mac OS X (open source). Elliot Wilen reports to me that he's "observed truncation of filenames with TNEF's Enough, [but] tnefDD did not have this drawback".
A freely-available tool for reading TNEF format on Windows and Linux is the tool called tnef. It is released under the GNU General Public License (GPL). There are other alternatives, which I'll discuss below, but let's discuss tnef first - it's free and seems to do the job well.
Installation of tnef on Windows is not as trivial as I'd like, in part because on Windows it requires installing the "Cygwin" tool first. Still, I found it works well once installed, and Cygwin is useful for lots of other things too.
Here are instructions for how to install the GPL'ed "tnef" on Windows:
cygpath -w $HOME
git clone --recursive https://github.com/verdammelt/tnef.git cd tnef autoreconf ./configure make make install # Some systems, though not Cygwin, require a "sudo make install"
Now the tnef tool is installed, but you need to configure Windows to auto-run the tnef tool on these files:
From now on, you can save an tnef attachment somewhere with that file extension, double-click on it, and the original file will then be saved in the same directory. If you get a new file extension, you can configure Windows again for that extension.
Here are alternatives I know of:
Note that fentun doesn't appear to DO anything if you just double-click the executable. You have to pass in a winmail.dat file to have it do something. There is no install -- you just download fentun.exe from fentun.com, put it anywhere on your PC and then have your mail client (Thunderbird, for me) open up a winmail.dat attachment. The first time you do it, just browse to fentun.exe as the application to open it for you and tell the mail client to remember that option. From then on, just open the winmail.dat file up and Fentun will happily run and allow you to easily extract any of the contents!
Again, a freely-available tool for reading TNEF format on Windows and Linux/Unix is the tool called tnef. It is released under the GNU General Public License (GPL).
This is easier to install on Linux than Windows, and seems to work well. Here are instructions for how to install the GPL'ed "tnef" on Linux-based systems:
git clone --recursive https://github.com/verdammelt/tnef.git cd tnef autoreconf ./configure make # On some systems, omit "sudo": sudo make install
Now the tnef tool is installed, but you need to configure your GUI to auto-run the tnef tool on these files. Here are the steps for GNOME (KDE is similar):
/usr/local/bin/tnef -f $1 -C $HOME/Desktop
From now on, you can save an tnef attachment somewhere with that file extension, double-click on it, and the original file will then be saved in the same directory (or the desktop, if you've configured it that way). If you get a new file extension, you can configure your system again for that extension.
Thunderbird bug/feature request #77811 specifically discusses adding the capability to read Microsoft TNEF format, inline. At the time of this writing, no one has been inspired enough to add direct support for TNEF in Thunderbird.
If this is a problem for you, I encourage you to go to Thunderbird bug/feature request #77811 and vote for its implementation, since this would help Mozilla gauge the importance of this capability.
You can install the LookOut extension. (You may not be able to just click on "install it"; if so, right-click on "install it", save it in a file, and from Thunderbird use Tools/Extensions/Install to install the file.) As described in the LookOut home page, LookOut is a plugin which will allow Thunderbird to interface with Microsoft's mail tools by decoding metadata and attachments encapsulated/embedded in a TNEF encoded attachment. The TNEF decoding engine was inspired (with permission) by the tnef.sf.net project. Some reports seem to suggest that this extension is a little buggy, though, so using tnef or ktnef above might be the better approach at this particular moment. But once it matures, LookOut might be the easier way to handle these extensions in the future.
Dmitry Yu Okunev (dyokunev *at* ut dot mephi dot ru) notified me about a utility he wrote for his own purposes. To get it, use the "git" development utility and run:
git clone git://git.mephi.ru/xtnef.git
I have not tried it, so I don't know how well it works. He reports that it supports tnef and ytnef.
The Wikipedia article on Transport Neutral Encapsulation Format (TNEF) and the MozillaZine article on Winmail.dat have more information.
I think the above is correct, but I'm only human and there certainly could be mistakes in the above. If you find a mistake, please contact me and tell me how to correct it.
Feel free to see my home page at https://dwheeler.com.