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 "tnef.sh" and save to your "Desktop" folder.

Contents :

#!/bin/bash

LOCATION=~/Desktop/winmail

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


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

chmod +x tnef.sh

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

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

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

No comments:

Post a Comment