[Mimedefang] How to pass custom headers to spamassassin?

Jan Pieter Cornet johnpc at xs4all.nl
Thu Feb 10 09:53:16 EST 2005

On Thu, Feb 10, 2005 at 12:29:24PM +0100, Enrico Scholz wrote:
> does there exist a way to create custom headers which are
> evaluated by SpamAssassin? E.g. I have
> | action_add_header("X-FOO", 'bar')   if <something>
> in my filter_begin(). Then I have a SpamAssassin rule which checks
> for this header and scores the message accordingly.  Unfortunately,
> this header does not seem to be seen by spam_assassin_check() which
> is executed in filter_end().
> Background is, that there are some tests which can not be expressed
> in SpamAssassin directly, or that I want to disable SPF checks for
> certain relays.

Not currently. You'd have to roll your own version of the
spam_assassin_mail function (or patch the one in mimedefang.pl, but
that would make it very hard to upgrade).

It would be nice if there was a standard way to pass custom headers to

#!perl -wpl # mmfppfmpmmpp mmpffm <pmmppfmfpppppfmmmf at fpffmm4mmmpmfpmf.ppppmf>
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;                                # Jan-Pieter Cornet

More information about the MIMEDefang mailing list