Symptoms
-
SpamAssassin training doesn't work in Plesk for Windows with the following errors in
%plesk_dir%adminlogsphp_error.log
file:PleskUtilException: "C:Program Files (x86)Plesk/admin/bin/spammng" -train-messages-ham "[email protected]" "-filename=C:/Program Files (x86)/Plesk/PrivateTemp/sat10f1e19e.tmp" failed with message: Unable to train spamassasin: Learned tokens from 0 message(s) (1 message(s) examined)
ERROR: the Bayes learn function returned an error, please re-run with -D for more information at C:Program Files (x86)PleskAdditionalSpamAssassinbinsa-learn line 509.
-
Windows Event Viewer might contain the following error message:
Access denied for user 'sa_bayes'@'localhost' (using password: YES).
Cause
Product issue:
-
#PPPM-12579 "SpamAssassin no longer fails to learn if the autogenerated password for the sa_bayes database contains the hash character (#)."
Fixed in:- Plesk Obsidian 26 January 2021 (Windows)
Resolution
Please consider updating your server:
Workaround
If update is not possible for some reason you may try the following
workaround
-
Connect to the server via RDP.
-
Open
%plesk_dir%AdditionalSpamAssassinetcmailspamassassinv321.pre
file for editing. -
Prepend every
#
character inbayes_sql_password
with a backslashFor example:
-
before
bayes_sql_password 622#b1#F-VyD
-
after
bayes_sql_password 622#b1#F-VyD
-