Articles in this section

SpamAssassin daily training doesn't work in Plesk for Windows

kb: bug Plesk for Windows kb: fixed

Applicable to:

  • Plesk for Windows

Symptoms

  • SpamAssassin training doesn't work in Plesk for Windows with the following errors in %plesk_dir%\admin\logs\php_error.log file:

    CONFIG_TEXT: PleskUtilException: "C:\Program Files (x86)\Plesk/admin/bin/spammng" -train-messages-ham "mailname=jdoe@example.com" "-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)\Plesk\Additional\SpamAssassin\bin\sa-learn line 509.

  • Windows Event Viewer might contain the following error message:

    CONFIG_TEXT: 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:

Resolution

Please consider updating your server:

Workaround

If update is not possible for some reason you may try the following

workaround
  1. Connect to the server via RDP.

  2. Open %plesk_dir%\Additional\SpamAssassin\etc\mail\spamassassin\v321.pre file for editing.

  3. Prepend every # character in bayes_sql_password with a backslash \

    For example:

    • before

      CONFIG_TEXT: bayes_sql_password 622#b1#F-VyD

    • after

      CONFIG_TEXT: bayes_sql_password 622\#b1\#F-VyD

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.