spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Abrahamsen <e...@ericabrahamsen.net>
Subject getting the daily learning cronjob right
Date Tue, 17 Nov 2015 04:15:32 GMT
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

to activate per-virtual-user databases. In /etc/postfix/master.cf, the
dovecot line starts:

argv=/usr/bin/spamc -u ${user}@${nexthop} .....

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.

Spam filtering isn't working very well though (it's hard to be sure, but
it seems pretty clear that learning isn't working), and I'm starting to
think that the -u option to spamc doesn't actually correspond to what's
happening with the --virtual-config-dir option to spamd.

I used "sa-learn --dump magic --dbpath ...." on several of my virtual
users, and it's hard to tell what's going on -- they seem to have their
own databases, but most have little or nothing in them, which makes me
think the script is not actually recording the learning properly.

I also tried directly running this, to re-learn what was already in my
Junk folder:

spamc -u eric@ericabrahamsen.net \
--spam /var/mail/vmail/ericabrahamsen.net/eric/Junk/cur/*

And the command simply hung -- I killed it after a minute or two.

So obviously I'm doing something pretty wrong.

Can someone confirm what I should be doing with spamc (both in postfix
delivery, and the learning script) to make this work correctly with
per-virtual-user databases?

Thanks,
Eric


Mime
View raw message