[Mimedefang] mimedefang and spamassassin question.

Jan-Pieter Cornet johnpc at xs4all.nl
Mon Feb 4 07:38:30 EST 2008


On Sun, Feb 03, 2008 at 05:47:40PM -0500, Mark London wrote:
> I want to add a header line to a message, such that it will be seen when 
> spamassassin is run on that message.  Is there any way to do that?   
> action_add_header adds a line, but spamassassin doesn't see that line.  

There are multiple solutions possible:

The official solution is to modify INPUTMSG in place, since the
spam_assassin_mail routine uses that to construct the message that
is passed to SA.

Another way is to write your own spam_assassin routines. You could copy
the current routines, and add somewhere in my_spamassassin_mail
a line: push(@sahdrs, @my_extra_spam_assassin_headers);

A similar but more dangerous solution is to patch your installed
mimedefang.pl with a line like that. Note that that change will be
removed as soon as you upgrade, so I wouldn't recommend that.
Note that just such a patch has been suggested here in the past.
It was mailed on Mon, 22 May 2006 18:15:57 +0200 by Jonas Eckerman
<jonas_lists at frukt.org>. That has been rejected by David because he
didn't want to add another global variable.

Finally, the "best" way is to come up with a patch that doesn't add
a global, yet still allows you to insert custom headers for spamassassin,
and send that to David to be included. I have however no idea how
that would fly, as I believe a pretty complete rewrite of mimedefang
is in progress.

-- 
Jan-Pieter Cornet <johnpc at xs4all.nl>
!! Disclamer: The addressee of this email is not the intended recipient. !!
!! This is only a test of the echelon and data retention systems. Please !!
!! archive this message indefinitely to allow verification of the logs.  !!



More information about the MIMEDefang mailing list