[Mimedefang] how to build SA-compatible encapsulated spam message?

Gary Funck gary at intrepid.com
Mon Jan 3 19:42:24 EST 2005

> -----Original Message-----
> From: mimedefang-bounces at lists.roaringpenguin.com
> [mailto:mimedefang-bounces at lists.roaringpenguin.com]On Behalf Of James
> Ebright
> Sent: Monday, January 03, 2005 7:08 AM
> To: mimedefang at lists.roaringpenguin.com
> Subject: Re: [Mimedefang] how to build SA-compatible encapsulated spam
> message?
> I attached a snippet from my filter code... gleaned from KAM a bit over a
> year ago.. it works well and I think will do the job.

Follow-up, I had to change the attachment attributes a bit
to make them liine up with the way Spamassassin was defining
them in its "safe report".  Without this change, Outlook
would display only a blank page, because the SA report was
tagged as having a FileName.  Here's the gist of the

                $container = MIME::Entity->build(Type => 'message/rfc822',
                     Description => 'Original message before MIMEDefang',
                     Disposition => 'Attachment',
                     Data => [ "" ]);
                $report2 = MIME::Entity->build(Type => 'text/plain',
                               Description => 'SpamAssassin Warning',
                               Data  => ["$report\n"],
                               Disposition => "inline",
                               Encoding => "-suggest");

More information about the MIMEDefang mailing list