[Mimedefang] spamassassin scores ignored in sa-mimedefang.cf

David F. Skoll dfs at roaringpenguin.com
Wed Jan 8 09:48:23 EST 2014

On Wed, 08 Jan 2014 14:28:51 +0100
Christoph Lehmann <christoph.lehmann.germany at web.de> wrote:

> I like to use different configuration files for authenticated and 
> non-authenticated users.

> ($hits, $req, $names, $report) = 
> spam_assassin_check('/etc/mail/sa-mimedefang.cf');

MIMEDefang uses a persistent Mail::SpamAssassin object, unfortunately.
So once it's created, subsequent calls to spam_assassin_check simply
return the same object even if the config file is specified differently.

You can prevent this by calling:

    undef $SASpamTester;

just before any of the spam_assassin_* functions.



More information about the MIMEDefang mailing list