Thursday, June 14, 2012

EXTRACT Contents of winmail.dat file under UBUNTU.

    Have you got any mail with an attachment file "winmail.dat" containing useful information and you could not open it ?

Then here is a simple solution to extract the contents.

1. Install tnef command-line program using command below,

sudo apt-get install tnef.

2. Create a small script "" and save to your "Desktop" folder.

Contents :



/usr/bin/tnef -C $LOCATION --save-body -f $1

3. Change the permission of file "" as, (type in terminal and press enter)

chmod +x

4. Go to thunderbird and click on winmail.dat attachment and,
select open with...
-----> Browse..... -----> Click "OK".

5.This will create a folder "winmail" in your desktop which contains,

   a) Mail Body as .rtf format.
   b) Attachments.