MBF Knowledge Base

I'm using Postfix with SpamAssassin. SpamAssassin is adding autolearn=ham in the headers of spam emails. For example, when I look up the message in /var/vmail on the server and run spamassassin -t to test it, it yields a score of above 100 because the sender is on my blacklist. Why is SpamAssassin marking these as Ham instead of Spam?

Calling Spamassassin from Postfix means that Spamassassin will be called with the Postfix user, not your user, which is why on the Spamassassin webpage page, they recommend using a script to call Spamassassin, so you can pass the user.

If the blacklist is under your user, the Postfix user won't see it and the Bayes DB will not be trained with information specific to you.

If you're running every message in Spamassassin as the same user, you don't need separate accounts in SpamAssassin. Try using /etc/spamassassin/local.cf (or wherever the system config lives) rather than ~/.spamassassin/user_prefs for your blacklist and if that works, make sure other per-user items are done on a global basis as well, especially sitewide bayes.

If you do want per-user items, you'll have to figure out which user you're running as. Either dig through your logs or run top and watch as a test message comes in.