- Plesk for Linux
- Plesk for Windows
How to train SpamAssassin on a Plesk server?
Enable Apply individual settings to spam filtering option in Tools & Settings > Spam Filter.
Go to Domains > example.com > Email Addresses > firstname.lastname@example.org > Spam Filter.
Tick the option Move spam to the Spam folder:
Click on the screenshot below to expand
Press the OK button to apply the changes.
Using webmail or mail clients, train the spam filter and improve its accuracy by moving spam messages from
Spamand non-spam messages from
Note: Spam training is performed on a daily basis while the Plesk daily task ( For Linux servers / For Windows servers ). In case it is required to run such a process manually, execute the command below via command-line:
# plesk daily ExecuteSpamtrain
Note: All messages are automatically removed from the
Spamfolder after 30 days. Move all non-spam messages back to the
Inboxfolder after performing the Plesk daily task.
Log into the server via SSH.
Place all existing spam messages for example into the spam folder of the email@example.com mailbox.
Run the command below to generate the antispam database:
# sa-learn --spam /var/qmail/mailnames/example.com/johndoe/Maildir/.Spam/cur/
Copy the generated files from the step №3 from
.spamassassinfolder of the required mailbox, for the example firstname.lastname@example.org:
# cp /root/.spamassassin/* /var/qmail/mailnames/example.com/johndoe/.spamassassin/
Set the correct ownership for the copied files by executing the command below:
# chown -R popuser:popuser /var/qmail/mailnames/example.com/johndoe/.spamassassin/*
Note: after the steps above the antispam database will be applied to email@example.com mailbox.
Question 1: Is it required that 'Move spam to the Spam folder' be selected for SpamAssasin to auto learn?
Our preference is rather to mark emails as '***SPAM***' at the beginning of the subject line so as to not miss false positive and then manually select 'Junk' for those email come through that are SPAM. Will this not work??
Question 2: we're using linux. Do we also need to use the sa-learn utility?
I marked a bunch of emails as 'Junk' in RoundCube and they appear to show up in the /our_user/Maildir/.Spam/cur directory.
However when I run the utility it works, but nothing shows up in the /root/.spamassassin as indicated above
I don't see where the output of the 'sa-learn' process went to??
Please sign in to leave a comment.