0

For each e-mail user I want to use his own bayes database.

The databases are located at /home/spamd/[domain]/[user], for example /home/spamd/example.com/testuser with 2 files: bayes_seen and bayes_toks.

In /etc/default/spamassassin I set virtual-config-dir:

OPTIONS="--create-prefs --max-children 1 -D --helper-home-dir --virtual-config-dir=/home/spamd/%d/%l -x -u spamd"

However, in the log I can see that none of placeholders %d and %l is working, they are replaced with empty strings:

sep 20 12:16:19 DietPi spamd[11167]: config: using "/home/spamd//" for user state dir 
sep 20 12:16:19 DietPi spamd[11167]: bayes: tie-ing toDB file R/O /home/spamd///bayes_toks 
sep 20 12:16:19 DietPi spamd[11167]: bayes: tie-ing to DB file R/O /home/spamd///bayes_seen

Can anybody help? Thanks.

1
  • Actually from my personal experience 99% of the users just suck at training a bayes filter properly; instead of training it they tend to poison it. The best practice IMHO is to train Spamassassin globally on a small corpus of ham and spam, and let autolearn do its job. Dec 30, 2019 at 19:41

1 Answer 1

0

I found out that I need to specify -u ${recipient} parameter for spamc, more specifically I use this in master.cf for postfix:

spamassassin unix -     n       n       -       -       pipe
    user=spamd argv=/usr/bin/spamc -u ${recipient} -f -e
    /usr/sbin/sendmail -oi -f ${sender} ${recipient}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .