This is an old revision of the document!
https://www.virtualmin.com/node/39491
Replace the <virtual-server>, <username> and junk message names as necessary.
All dashes, spaces and punctuation are important.
Scan a message using the spamc
client with the processing done by spamd
and spamd child
(both running as root):
spamc -u <username> < /home/<virtual-server>/homes/<username>/Maildir/.spam/cur/1454565258.32109_0.www
Scan a message as root:
spamassassin -D -t -p /home/<virtual-server>/homes/<username>/.spamassassin/user_prefs < /home/<virtual-server>/homes/<username>/Maildir/.spam/cur/1454619898.14251_0.www
Scan a message as a user:
su -s /bin/sh -c "spamassassin -D -t -p /home/<virtual-server>/homes/<username>/.spamassassin/user_prefs < /home/<virtual-server>/homes/<username>/Maildir/.spam/cur/1454565258.32109_0.www" - <username>
Train the Bayesian filter as a user:
su -s /bin/sh -c "sa-learn -D --spam --no-sync /home/<virtual-server>/homes/<username>/Maildir/.spam/{cur,new}" - <username>
Update rules (taken from /etc/cron.daily/spamassassin
):
su - debian-spamd -c "sa-update -D --gpghomedir /var/lib/spamassassin/sa-update-keys"
Permissions on debian-spamd
home directory:
chown -R debian-spamd.debian-spamd /var/lib/spamassassin find /var/lib/spamassassin -type f -exec chmod 644 {} \; find /var/lib/spamassassin -type d -exec chmod 775 {} \; chmod -R o-rwx /var/lib/spamassassin/sa-update-keys/ reboot