Security and Technology Ramblings…

Ever get an email from one of your “Window Using” friends and the attachment just shows up as a “winmail.dat” file? It’s pretty much useless.

This winmail.dat file is actually your attachment encapsulated in the TNEF format. If you’re really bored, you can go read what Wikipedia has to say about TNEF: (Click Here)

When I received an email today that had a winmail.dat file, I went looking for options. Turns out there is a cool “tnef” app on sourceforge (linux) that will let you convert the file to it’s original format. (Click Here)

Usage is simple…


tnef: [options] [FILE]
-f FILE,--file=FILE       use FILE as input ('-' == stdin)
-C DIR, --directory=DIR   unpack files into DIR
-x SIZE --maxsize=SIZE    limit maximum size of extracted archive (bytes)
-t,     --list            list files, do not extract
        --list-with-mime-types   list files and mime-types, do not extract
-w,     --interactive     ask for confirmation for every action
        --confirmation    same as -w
        --overwrite       Overwrite existing files
        --number-backups  Instead of overwriting file FOO,
                            create FOO.n instead
        --use-paths       Use pathnames for files if found in the TNEF
                            file (for security reasons paths to included
                            files are ignored by default)
        --save-rtf[=FILE]  [DEPRECATED] Save the RTF message body to a file
        --save-body[=FILE]  Save the message body to a file
-h,     --help            show this message
-K,     --ignore-checksum  Ignore any checksum error (warn only)
-V,     --version         display version and copyright
-v,     --verbose         produce verbose output
        --debug          produce a lot of output

If FILE is not specified standard input is used

Leave a Reply