Spamassassin per user databases configuration

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.

Tom HANAX

Posted 2019-09-20T10:27:56.003

Reputation: 11

Answers

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}

Tom HANAX

Posted 2019-09-20T10:27:56.003

Reputation: 11