On Tue, 17 Nov 2015 12:15:32 +0800
Eric Abrahamsen wrote:

> I set up a new mail server (postfix) a month or two ago, and all is
> working well.
> 
> My solution for learning spam and ham was to give users two mailboxes,
> learn/ham and learn/spam, where they move messages to learn. Every
> three hours a cronjob runs to iterate through virtual users, learn the
> messages, and then move them elsewhere. Pretty standard.
> 
> I run spamd with this in the OPTIONS:
> 
> --virtual-config-dir=/var/lib/spamassassin/%d/%u/spamassassin
> 


You don't mention using the -x (--nouser-config) option. Paradoxically
it's essential with --virtual-config-dir, and it's not set implicitly.

You should also have -u spamd, if you don't already.


> I used to use sa-learn in the learning cronjob, but after reading some
> threads here I changed to using spamc, also with the -u option.

Training via spamc is useful if the unix user doing the training
doesn't own the databases, or if spamc and spamd are running on
separate machines. 

I just run sa-learn as spamd's unprivileged user, with HOME set to the
appropriate virtual home directory. I don't see the point in involving
spamd - it's just one more thing that can go wrong. 

Reply via email to