Decoding Microsoft (Outlook) Attachments

Bill Sconce sconce at in-spec-inc.com
Wed Dec 8 14:05:01 EST 2004


Hi, Greg -

My, this brings back memories!

Back when our shop still used Microsoft software (but Netscape, never
OutBack!) we saw this same problem.  What a pain - even on a Windows
system you couldn't read the attachments!

There were solutions (although not from Microsoft).  Here's a URL for
another one (the one we used back then), FWIW:

http://www.fentun.com/linux.html

("fentun" - "un" "tnef" - heh, heh)

    'Once you've downloaded the file, gunzip it ("gzip -d fentun.gz")
    and change the permissions on it so that it can be executed
    ("chmod 755 fentun"). Then put it in a handy bin/ directory (like
    /usr/local/bin) and set it as the handler for "application/ms-tnef"
    MIME content.'
    
Addtional discussion of the background on TNEF is at:

    http://ufaq.org/modules.php?name=Forums&file=viewtopic&p=11782
    
and (Microsoft's advice to their own users, which conceivably could
be helpful if you want to explain to your senders how the problem
arises):

    http://office.microsoft.com/Assistance/2000/olfrmt.aspx

-Bill


P.S.  [OFF TOPIC, for amusement only]  Using Firefox reading the above
Microsoft page generates a message, in RED, 

    Warning: You are viewing this page with an unsupported Web browser.
    This Web site works best with Microsoft Internet Explorer 5.01 or
    later or Netscape Navigator 6.0 or later. Click here for more 
    information on supported browsers.
    
When you "click here" you get a yellow triangle and a message:

    This service is unavailable
    ...
    The server is not able to process your request.
    
Clicking Troubleshooting Tips (from there) yields:

    NOTE.  We are aware that some users are experiencing problems with
    Microsoft Office Online even when using supported browsers. If you
    are using a supported browser, you can still use many of the site
    features even though warning messages are displayed. We apologize
    for any inconvenience.
    
Gee, this programming business must be harder than it looks, if the
world's largest software company just prints an apology instead of
getting it right.  I wonder how good their security is.


    
    
    
On Tue, 07 Dec 2004 23:03:25 -0500
Greg Rundlett <greg at freephile.com> wrote:

> Around this time of year, people share a lot of photos.  Pictures of 
> friends, family, the kids, their pets, their Christmas trees etc.  The 
> problem is that many of these people are chained to a Microsoft email 
> empire, and thus using email software that
> 
>     a) writes html-formatted (or Rich Text) messages by default
>     b) encodes attachments in a proprietary way
> 
> You yourself have probably seen these messages, where the sender claims 
> to have attached some photos, but all you see is something called "Part 
> 1.2" or "Winmail.dat"  If you try to open this attachment, you will see 
> that it is encoded as type application/ms-tnef. It is unlikely that your 
> Linux system will know what to do with it.  This message is meant to 
> share with you the utilities that exist to help you receive your 
> Microsoft-using counterparts with the humble grace and compassion 
> appropriate for the season.
> 
> ms-tnef stands for "MicroSoft Transport Neutral Encapsulation 
> Format"[1], which, because it comes from Microsoft, is neither neutral 
> nor formatted the way standard MIME mail messages are encoded.   
> Although I haven't tested this, some Windows versions of free software 
> may decode these messages automatically by calling on some Windows dll.  
> Still, it would be nice to decode them on a free operating system.
> 
> Enter the linux utility tnef[2].  tnef is a command-line utility that 
> can unpack those pesky Microsoft attachments, and is actually included 
> in many (most?) modern Linux distributions.  If you do not have it, you 
> can download it from the tnef project site on SourceForge.net
> 
> My Debian Sarge includes a GUI version called ktnef that I is bundled 
> with KDE and integrated into KMail.  Located at /usr/bin/ktnef on my 
> system, this utility can be launched and allows you to visually open, 
> examine the contents of, and extract the ms-tnef attachments.  Since I 
> use Mozilla for email, it doesn't know what to do with these ms-tnef 
> attachements.  So, you must first save the attachment in question before 
> using the utility. 
> 
> To avoid this two-step process of saving the attachment and launching 
> the utility independently, you will want to register the ktnef 
> application as a helper for Mozilla[3].   Open Mozilla and under the 
> 'Edit->preferences->Navigator->helper applications' menu, you will want 
> to associate "application/ms-tnef" with the command "/usr/bin/ktnef".  
> (To find the correct location of the program on your system, issue this 
> command at the command shell: 'locate ktnef')  Once you have made this 
> association, you can restart Mozilla and it will be ready to launch 
> ktnef automatically whenever you open such an attachment.
> 
> Don't want to bother with any setup?  There is a nice free service at 
> this website[4] that will decode your attachments for you.  It is a PHP 
> script that hooks into tnef on the backend.  Want to share the goodness 
> of tnef with other people?  The neat little PHP script is released under 
> the GPL.  You can download the source from that website and setup your own.
> 
> System Administrator?  Maybe you would like it if you never saw another 
> ms-tnef or winmail.dat attachment ever again.  Check out tnefclean, a 
> perl script that filters out the ugliness, and by the time you see your 
> email, it looks the way [insert deity] intended it to.
> 
> If the sender is both competent, and open to suggestion, you may be able 
> to suggest to them that they send text-formatted emails[6], and that way 
> any attachment should come across with the correct MIME encoding, rather 
> than encapsulated in ms-tnef.
> 
> [1] http://agamemnon.ucs.ed.ac.uk/faq/mstnef.html
> [2] http://sourceforge.net/projects/tnef
> [3] The Mozilla project just released version 1.0 of Thunderbird, which 
> automatically imports your Mozilla mail settings and messages, so you 
> may want to check that out too.  I assume that it is a similar process 
> to hook up ktnef with Thunderbird.
> [4] http://tud.at/php/tnef/
> [5] http://www.dread.net/~striker/tnefclean/
> [6] http://www.expita.com/nomime.html
> 
> p.s. If you would like to reference this article, or edit sections of 
> it, it is available at the Newburyport GNUS website at 
> http://freephile.com/nbpt-gnus/index.php/Decoding_Microsoft_Outlook_Attachments
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



More information about the gnhlug-discuss mailing list