RESOLUTION
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 --mailname=mailname@domain.com --spam=$message ; done
# cd /path/to/ham_mail/
# for message in * ; do /usr/local/psa/admin/sbin/spammng --bayes --mailname=mailname@domain.com --ham=$message ; done
3. Then repeat this command for every mailbox on the server or just copy bayes bases (./domain.com/mailname/.spamassassin/bayes_*) from this mailbox to each other with:
# find /var/qmail/mailnames/ -mindepth 2 -maxdepth 2 -type d -exec /bin/cp -f /var/qmail/mailnames/domain.com/mailname/.spamassassin/bayes_* {}/.spamassassin/ \; Note, 'domain.com' and 'mailname' should be replaced with the real domain name and mail name in the paths that are listed above.
Keywords: sa-learn train spamassassin spam ham