Article ID: 9122, created on Oct 7, 2010, last review on May 11, 2014

  • Applies to:
  • Plesk 9.x for Windows

Symptoms

Note: Issue described below is actual only for 64bit Windows versions.

Spamassassin training fails with the following error. Error appears if you select message and click on the 'Train' button.

Error: Cannot exec 'spammng --train-spam --filename=C:/Program Files (x86)/Parallels/Plesk/tmp/spm367.tmp --password=******* --mailname=account@domain.tld':
Learned tokens from 0 message(s) (1 message(s) examined)

Use of uninitialized value in concatenation (.) or string at C:/Program Files (x86)/Parallels/Plesk/Additional/Perl/lib/File/Spec/Win32.pm line 275.
util: refusing to untaint suspicious path: "C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\kax376c@ltt.es\bayes"
util: refusing to untaint suspicious path: "C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\kax376c@ltt.es\bayes_journal"
bayes: expire_old_tokens: Insecure dependency in sysopen while running with -T switch at C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\site\lib/Mail/SpamAssassin/Locker/Win32.pm line 71.
plugin: eval failed: bayes: (in learn) Insecure dependency in sysopen while running with -T switch at C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\site\lib/Mail/SpamAssassin/Locker/Win32.pm line 71.
ERROR: the Bayes learn function returned an error, please re-run with -D for more information at C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\bin\sa-learn line 490.
Unable to train spamassasin: Learned tokens from 0 message(s) (1 message(s) examined)

Resolution

Open the file %plesk_dir%\Additional\Perl\site\lib\Mail\SpamAssassin\Util.pm with the text editor and find the line which starts with the words "my $chars ="

If the value of the variable $chars equals to: '-_A-Za-z\xA0-\xFF0-9\.\%\@\=\+\,\/\\\:'  it should be changed to the correct one.

Wrong value:

my $chars = '-_A-Za-z\xA0-\xFF0-9\.\%\@\=\+\,\/\\\:';

Correct value:
my $chars = '-_A-Za-z\xA0-\xFF0-9\.\%\@\=\+\,\/\\\:\(\)';

After replacing save this file. Spamassassin training should work now.
 

aac4a8fcd879de03758354e15495d69a a914db3fdc7a53ddcfd1b2db8f5a1b9c 85a92ca67f2200d36506862eaa6ed6b8 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF