How to set up SpamAssassin run online tests along with local ones

Created:

2016-11-16 13:14:11 UTC

Modified:

2017-04-24 11:42:13 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to set up SpamAssassin run online tests along with local ones

Applicable to:

  • Plesk 11.5 for Windows

Symptoms

By default, SpamAssassin (thereafter, SA) built into Plesk executes only local tests on the incoming messages. But SA also has online tests, that use external services for spam detection.

How to enable network test in SA?

Resolution

Plesk starts SA on-demand, when mail server pickup event is being executed. It starts the perl daemon with the following options:

"C:\\PROGRA~2\\PARALL~1\\Plesk\\ADDITI~1\\Perl\\bin\\perl" "C:\\Program Files (x86)\\Parallels\\Plesk\\Additional\\SpamAssassin\\psa-spam-filter" "--virtual-config-dir=C:\\Program Files (x86)\\Parallels\\Plesk\\Additional\\SpamAssassin\\SpamFilterUserConfigsPath\\%user%@%domain%" "--config-file=C:\\Program Files (x86)\\Parallels\\Plesk\\Additional\\Perl\\site\\\\etc\\\\mail\\\\spamassassin" "--port=8783"

In the 'C:\\Program Files (x86)\\Parallels\\Plesk\\Additional\\SpamAssassin\\psa-spam-filter' script, we can define the local tests directive:

my %opts;
%opts = (
"create-prefs" => 1, ## 0 means that if no prefs exist - no prefs will be created
"virtual-config-dir" => undef, ## template (sprintf like): c:\\dir\\%domain%\\%user%
"local-tests-only" => 1,
"port" => 738, #port, default is 738
"config-file"=>'0',
);

'local-tests-only' is set to "1" by default. You may set it to 0 in order to enable online tests.

Further, you will have to configure corresponding SA options in order to enable tests. Please refer to this document for reference.

NOTE! Online tests may impact the server performance significantly, since every incoming message will trigger a network communication with an external servers!! Be extremely careful

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