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

Created:

2016-11-16 13:16:08 UTC

Modified:

2017-08-16 16:17:31 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 Windows?

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Windows

Question

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

Answer

Plesk GUI and spamasassin utility do not support multiple mail accounts management at once. Instead, a script can be used to update multiple mailboxes simultaneously:

  1. Create list.txt file that contains all mailboxes that require modification by SpamAssassin. The list should look like:

mailbox1@example.com

mailbox2@example.commailbox3@example.cometc.
  1. In C:\ directory, create script.bat file with the following content:
    @echo off

    for /f "tokens=*" %%a in (C:\\list.txt) do "C:\\Program Files (x86)\\Parallels\\Plesk\\bin\\spamassassin.exe" --update %%a -hits 6 -action del -blacklist add:spam@sample.com

This command modifies the SpamAssassin configuration on all emails listed in list.txt: sets the number of hits sufficient to consider a letter as spam to 6, orders to delete spam, and puts the spam@sample.com email address to the black list.

  1. Run the script in a command line:
    C:\\>script.bat

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.