Article ID: 1217, created on Oct 6, 2008, last review on Nov 19, 2015

  • Applies to:
  • Plesk 8.x for Linux/Unix


There is no such feature in current Plesk version. However it can be done manually from the command line in the following way.

1. Store SPAM and HAM messages in two different folders, for example 'spam_mails'
and 'ham_mails'.

2. Train Spamassassin for one mailbox using the messages from that folders:

# cd /path/to/spam_mail/
# for message in * ; do /usr/local/psa/admin/sbin/spammng --bayes --spam=$message ; done
# cd /path/to/ham_mail/
# for message in * ; do /usr/local/psa/admin/sbin/spammng --bayes --ham=$message ; done

3. Then repeat this command for every mailbox on the server or just copy bayes bases (./*) from this mailbox to each other with:

# find /var/qmail/mailnames/  -mindepth 2 -maxdepth 2 -type d -exec /bin/cp -f /var/qmail/mailnames/* {}/.spamassassin/ \;

Note, '' and 'mailname' should be replaced with the real domain name and mail name in the paths that are listed above.

b8ef5052d936e902043e41759118114e a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF