[Dovecot] Antispam plugin / sa-learn

RW rwmaillists at googlemail.com
Fri Sep 13 18:29:39 EEST 2013


On Thu, 12 Sep 2013 22:09:42 +0200
Mathieu R. wrote:

> 22:01 root at effraie01 ~ # sa-learn --username=vmail --backup
> v       3       db_version # this must be the first line!!!
> v       0       num_spam
> v       0       num_nonspam

sa-learn --username sets the virtual user not the unix user.  (BTW
sa-learn --dump magic is a quicker way of reading the metadata)

By default SA stores the bayes database files under a user's home
directory. If you run sa-learn as vmail, which doesn't have a home
directory, it will probably just give up. 


What you need to do is set bayes_path (in local.cf) to a directory to
which vmail has access, then run sa-learn as vmail. Alternately you can
setup one of the SQL backends.

I'm posting this through gmane as I'm not subscribed to dovecot list. I
replied in that SpamAssassin list before spotting that it was
cross-posted. You can ignore most of it now, but I'll quote what I
wrote about learning ham:

 "I'm sceptical that the Antispam plugin can learn enough ham this way.
  As I understand it the only mail that gets learnt as ham will be
  false-positives based on the overall spamassassin score, irrespective
  of the Bayes result. Bayes needs (by default) 200 spams and hams to
  even start classifying and much more for optimal results - I don't
  expect to get 200 FPs in the rest of my life. Unless this is high
  volume server with a shared database, I'd suggest either learning a
  few thousand hams manually, or implementing an unsure folder. You can
  also mitigate the problem by autotraining with a high ham threshold,
  but then you really need to be careful to move all spam to the spam
  folder. "





More information about the dovecot mailing list