[How to] Manage spam filter settings for multiple email accounts in Plesk for Linux?

Created:

2016-11-16 13:15:49 UTC

Modified:

2017-08-08 13:38:05 UTC

0

Was this article helpful?


Have more questions?

Submit a request

[How to] Manage spam filter settings for multiple email accounts in Plesk for Linux?

Applicable to:

  • Plesk for Linux

Symptoms :

How to set spam filter settings for bunch of email accounts avoiding configuration of Spamassassin on server level in Plesk for Linux?

Resolution :

Plesk GUI and spamasassin utility do not support multiple mail accounts management at once. Instead, the following command should be used to update multiple mailboxes simultaneously:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` -Dpsa -Ne"SELECT CONCAT(mail_name,'@',name) FROM mail,domains WHERE dom_id=domains.id AND postbox='true';"|while read i;do /usr/local/psa/bin/spamassassin -u $i -status true -action del -hits 5;done

This command will enable Spamassassin on all mailboxes (if disabled), set 5 hits required for marking a message as spam, set spam messages to be deleted

Additional information

For details about spam settings management via Plesk CLI, visit:

213412289 [How to] Manage spam settings in Plesk via CLI?

Have more questions? Submit a request
Please sign in to leave a comment.