[H-GEN] Compressing mail attachments
David Wood
dwood at PIsoftware.com
Wed Oct 13 23:38:12 EDT 1999
[ Humbug *General* list - semi-serious discussions about Humbug and
Unix-related topics. ]
On Thu, Oct 14, 1999 at 12:52:12PM +1000, Marshall, Joshua wrote:
> Just thinking aloud: I'm wondering if it would be possible to intercept
> emails as they pass through the relay (sendmail), and pull out all the
> attachments, compress them with a compressor such as "zip" and insert the
> compressed file in place of the original, before passing the message along.
Yes, this is possible and a good idea. Here are two bits which might help:
- There is a Perl module called IspMailGate (on the CPAN) which
acts as a sendmail "plug-in" to filter traffic. Brad Marshall
is experienced with this and recently convinced the authors to
release the code under the GPL.
- The MIME::Parser Perl module (also on the CPAN) would make parsing
and reinserting the attachements easy.
In my book "Programming Internet Email" I have an example script called
mboxscrub.pl which cleans a mailbox of unwanted attachments. The approach
would be similar.
--
Regards,
Dave
------------------------------------------------------------------
David Wood | Telephone: +61 7 3876 7140
mailto:dwood at PIsoftware.com | Facsimile: +61 7 3876 7142
http://www.PIsoftware.com | PGP Key available via finger
------------------------------------------------------------------
Technical Director, Plugged In Software
--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.
More information about the General
mailing list