[Mimedefang] SpamAssassin from MIMEDefang vs. spamd

John Nemeth jnemeth at victoria.tc.ca
Thu Jun 22 04:44:09 EDT 2006


On Nov 6,  4:47am, "Josh Kelley" wrote:
} On 6/14/06, Fredrik Nyberg <nba at abo.fi> wrote:
} > running spam_assassin_check() on mail produces different results than
} > dumping said to spamd; very different results indeed. Configs seem to be
} > loading correctly and local.cf has been loaded. Sometime bayes test seem
} > to differ, too.
} 
} MIMEDefang always runs SpamAssassin checks as the defang user (or
} whatever user you configured mimedefang to run under).  This means
} that you only use defang's Bayesian database and don't use per-user
} SpamAssassin configurations.  spamd uses separate Bayesian databases

     This is not true.  For one of my setups, I have SpamAssassin using
MySQL to store the bayesian database (consumes about 2G of disk space
on my system).  Then I do

$SASpamTester->signal_user_changed({ username => $user });

before calling spam_assassin_check().  $user is set to user at host in the
case of a virtual domain and to just plain user in the case of one of
the local domains.  This combination allows SpamAssassin running under
MIMEDefang to do per-user bayesian filtering.  There may be other ways
to do it as well.  I was already using MySQL to store user's spam
filtering preferences anyways, so storing bayesian stuff there wasn't a
big stretch for me.  This is one of the reasons that I call
spam_assassin_init() from within my filter, i.e. I need the
$SASpamTester variable initialised prior to the first time I call
spam_assassin_check().

}-- End of excerpt from "Josh Kelley"



More information about the MIMEDefang mailing list