Site Navigation
other links ...
superkaramba ...
linux ...
weather ...
winmail.dat attachments
howto open winmail.dat mail attachments
Have you ever got an attachment from a windows user called winmail.dat that you couldn't open, or do anything with, other than curse Microsoft for their insistance on never using anything resembling an open standard. Well you can unlock the contents of the winmail.dat using one of two applications. One called fentun and the other called ktnef. Fentun is a freeware package, and ktnef is a utility that is now part of kde, and is usually found in the pim module. However, now that a lot of distributions are breaking kde modules down into the individual applications, ktnef is not always installed by default.
what is a winmail.dat file?
MS Outlook generates and attaches a winmail.dat file at the end of each message that only Outlook can use. It's put at the end of the message so that on the receiving side Outlook can display the message correctly. This file is typically very small, and may or may not include the original attachment. However, Outlook is the only email program that can use this information. Therefore, recipients using email clients other than Outlook might receive the winmail.dat file instead of the original message. If the winmail.dat file contains an attachment, there is seldom anything in a standard install of linux that will extract the attachment from the winmail.dat file.
installing fentun
You can download fentun from here. Make sure that you get the static version, so that you don't have any dependency issues. Once downloaded, you will need to unzip it. Open a terminal, and use the cd command to change to the directory where fentunStatic.gz was downloaded to. Then enter the command:
- gunzip fentunStatic.gz
You will then need to make it executable. So enter the command:
- chmod +x fentunStatic
Then copy it to a directory in your $PATH (/usr/local/bin is a good place). You will need to be root to copy the file here:
- sudo cp fentunStatic /usr/local/bin
installing ktnef
If you've got kde installed, you may already have ktnef. Open a terminal and type which ktnef. If it's installed, you should get a line that looks like /usr/bin/ktnef. If not, you will just get another bash prompt. If it's not there, and you've got kde installed, it probably means that your distribution has broken kdepim down into individual applications, and has not installed ktnef by default. So you'll need to go to your distribution's package manager and install it from there. If you don't have kde installed, then you could try downloading the individual package from here, although I don't know how up to date those packages are, given ktnef is now maintained under kde. If you don't use kde, then you are probably better off trying fentun.
configuring the ms-tnef mimetypes
I'll set out how to do this in both kde and gnome
kde
You then need to make sure that kde understands that it needs to open winmail.dat files using fentun or ktnef. Hopefully, if you have ktnef installed, you won't need to do anything, as the install should have taken care of the mimetype situation.
So open up the kde settings by opening the run dialog using alt+f2. Then type settings:/ in the dialog. This will open the settings:/ kioslave in a konqueror window. Click on KDE Components and this will open the file associations dialog. Click on the Add... button. You will then get a dialog that looks like:
![]() |
Under Group: change this to application using the drop-down menu. Under Type name insert ms-tnef. Then click OK. The right hand side of the file association dialog should then change to this:
![]() |
In the Filename Patterns box click the Add... button. In the dialog that pops up, insert *.dat. Then add a Description if you want. In the Application Preference Order box press the Add... button.
![]() |
Enter /usr/local/bin/fentunStatic and/or ktnef in the address bar, and press OK. Then in the file association dialog, press Apply, and you're done. You should then be able to click on a winmail.dat file in kmail, and get this dialog (for fentun):
![]() |
... or this dialog if using ktnef:
![]() |
Click on the file you want to extract and press the extract button. Sadly fentun doesn't ask you where you want to put the file, it just puts it in your home directory. You'll have to move it manually from there to where you want it. Ktnef will ask you where to put it. You can also look at the original text of the message in ktnef by pressing the envelope in the toolbar.
gnome
Changing the default program to open specific mimetypes from nautilus is actually fairly simple:
- In nautilus, right-click on a winmail.dat file (you may have to save it out of your mail client), and choose “Properties” from the bottom of the pop-up menu;
- The 4th Tab should be “Open With”. Choose this tab.
- There should be a list of programs that nautilus/gnome-open already knows is capable of opening the file. If the one you want is listed, select the radio-button for it. If it is not listed, create a new entry by choosing the “Add” button, and typing the command name in the popup box that appears (/usr/local/bin/fentunStatic or ktnef). This will add it to the list, and automatically select the new program as the preferred application to use.
- Choose close - nautilus and anything that uses gnome-open will now use the selected program to open files of this type.
You can discuss this howto on the forums.




