As I mentioned on the homepage, I've been dabbling in perl for a while now, COBOL having lost some of the mystery after several years continuous use.
Working all day on a dumb terminal, folks sending me attachments and wot not don't make it easy to read the messages. Without resorting to the sloth of cranking up an under-memoried P133 under Windoze 98, there's little choice but to strip out the bloat. The script drops inline html and mime encoding on the floor and exports and decodes attachments to the appropriate filename. It also decodes quoted-printable text messages and reformats long lines. You are welcome to beta test it at your own risk! click here to download. Release history for those that like it:
Release 1.32 09/06/00 Wasn't ignoring case when checking for encoding
in getheadefinfo. Also failed to decode a base64
attachment due to an unknown (Lotus??) client
sending the file disposition before the encoding
method. Now does the renaming of the file and
the open once it's out of the separator header.
When decoding a quoted-printable section
translate \243 to $curr (UKP).
Release 1.31 26/05/00 Wasn't detecting multipart/alternative
in the body. Leaving trailing separators
after processing a uuencoded portion becuase
$hasatt was reset incorrectly.
Release 1.3 24/05/00 Always dump unnamed attachments of type
ms-tnef. Strange Micro$oft dross.
Truncate attachment file names of greater
than n characters (not including the file
extension, if any). Attachments with no name
now use a random number in their filename
rather than a count up from zero. However
multiple files within the same message count
up sequentially from this number.
Release 1.2 21/05/00 Debug now sent to a file rather than STDERR.
Better handling of multipart/alternative.
boundary, content type and encoding headers
now ignore case (SIMEON 4.1.5 for windoze).
Attachments with no file name are saved as
FILE00n.UNK. Use the name= header if the
filename= header isn't set (SIMEON again!)
Wasn't spotting boundaries if they contained
characters which had special meanings in
regular expressions - now using \Q..\E.
Release 1.1 15/05/00 Support for inline uuencoded attachements
Release 1.0 14/05/00 Written. Phew!
Note that your perl environment may not have the necessary modules to perform the decoding. If this is the case then you shouldn't have much trouble throwing away that part of the code, or you can download the modules from CPAN
This page was last updated 13/06/00 |
|