# POD documentation
killtnef --in=source [--out=source] [--man] [--help] [--version]
killtnef - Converts emails with MS-TNEF, Microsoft's proprietary Transport Neutral Encapsulated Format, attachments into standard MIME-compliant emails.
This script reads an mbox, or a single email message, from STDIN, extracts data from any ms-tnef attachments that may exist, and writes a new mbox (or a single email message) to STDOUT which has each of the files that were encoded in any ms-tnef attachments attached separately, as RFC-822/RFC-1521 compliant MIME emails/attachments.
Any email(s)
containing no ms-tnef MIME attachments are passed through
this script untouched.
When used with NST as an external filter the commandline should look like:
killtnef.exe --in=%IN% --out=%OUT%
This script was originally written to convert about 35,000 emails from some Microsoft Outlook *.pst (post office) files, almost all of which had ms-tnef encoded attachments, into MIME-compliant emails so that they could be imported into an email-archiving system that 10East supplies to some of its customers. If anyone is curious, an imapd was used to move the emails from the *.pst files to mbox format using Outlook 2000 as an IMAP client.
This script can also be used as an incoming mail filter which will automatically convert ms-tnef attachments into MIME-compliant attachments.
Andrew Orr <aorr@10east.com>
Lester Hightower <hightowe@10east.com>
Dennis Heidner (.001% of the work -- the guys above did all the hard stuff) =head1 LICENSE
This software is licensed under the terms of the GNU Public License, which is available for review at http://www.gnu.org/copyleft/gpl.html
Feb-22-2002: Originally created by Andy Orr
Feb-26-2002: A few enhancements and bug-fixes by Lester Hightower
Mar-06-2002: Documentation and a few comments added by Lester Hightower in preparation for submitting this script to CPAN.
Mar-07-2002: After realizing that a POD README section is needed for the HTML pages generated for the script index in CPAN, LHH added one and submitted this as killtnef-1.0.1.pl.
March-07-2005: Wow, its been three years since anyone had to touch the code. This version uses Getopt::Long so we may specify the input file and output file for the conversion. I've also added some additional mime types. Dennis Heidner
April-06-2005: Fixed print to output in all cases, even when no MS TNEF., Dennis Heidner
This script requires the strict
module.
It also requires Convert::TNEF 0.16
and MIME::Parser 5.406