• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

spamassassin training error after 9.5 upgrade

P

PauloP

Guest
Like my topic says, I get this error when I try to use the training icon in spamassassin:

Error: Cannot exec 'spammng --train-spam --filename=C:/Program Files (x86)/Parallels/Plesk/tmp/spmBF8F.tmp --password=****** [email protected]':
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\[email protected]\bayes"
util: refusing to untaint suspicious path: "C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\[email protected]\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)
-----
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\[email protected]\bayes"
util: refusing to untaint suspicious path: "C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\[email protected]\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.


Any help on this?
Thanks
 
I have forwarded it to developers. Let's wait their answer with results of investigation.
 
It is still under developer's investigation. I will update thread with results as soon as I receive it.
 
Here is developer's solution:

​As I investigated, this issue appear because of untaint_file_path method don't count brackets '(' and ')' as valid symbol. But default path on Windows x64 contains this symbol.
Its still mystery, why its appear only after upgrade.

First dirty solution, which I can suggest is to fix SpamAssassin method untaint_file_path in file C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\site\lib/Mail/SpamAssassin/Util.pm:

Code:
@@ -225,7 +225,7 @@
   local ($1);
   # Barry Jaspan: allow ~ and spaces, good for Windows.  Also return ''
   # if input is '', as it is a safe path.
-  my $chars = '-_A-Za-z\xA0-\xFF0-9\.\%\@\=\+\,\/\\\:';
+  my $chars = '-_A-Za-z\xA0-\xFF0-9\.\%\@\=\+\,\/\\\:\(\)';
   my $re = qr/^\s*([$chars][${chars}~ ]*)$/o;

   if ($path =~ $re) {
 
Thansk Igor.
I did that fix and now I don´t see the error anymore but! My spamassassine don´t work. I don´t know if this is normal please you tell me.
When I mark an email as spam I don´t see any error but the email keeps there in the list... is this normal? If its normal its strange because how can I see if an email is already taged as spam?

Igor thanks for your help.
 
I have forwarded your question to developers. I will update this thread with their reply.
 
I have the same problem

Hi, have the same problem, but I don't know how fix this issue.
¿Where i have to add this lines?

Here is developer's solution:

​As I investigated, this issue appear because of untaint_file_path method don't count brackets '(' and ')' as valid symbol. But default path on Windows x64 contains this symbol.
Its still mystery, why its appear only after upgrade.

First dirty solution, which I can suggest is to fix SpamAssassin method untaint_file_path in file C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\site\lib/Mail/SpamAssassin/Util.pm:

Code:
@@ -225,7 +225,7 @@
   local ($1);
   # Barry Jaspan: allow ~ and spaces, good for Windows.  Also return ''
   # if input is '', as it is a safe path.
-  my $chars = '-_A-Za-z\xA0-\xFF0-9\.\%\@\=\+\,\/\\\:';
+  my $chars = '-_A-Za-z\xA0-\xFF0-9\.\%\@\=\+\,\/\\\:\(\)';
   my $re = qr/^\s*([$chars][${chars}~ ]*)$/o;

   if ($path =~ $re) {

Greetings / saludos
Javier Alonso
 
IgorG

Replaced the lines on Windows 2008 x64 plesk 9.5.2 sill have same error when selecting the email and clicking to "It's Spam" button under Training.

Please help us to sort out this issue.

Regards.
 
PauloP,

I have received following questions from developers to you:
Could you ask customer just change 'Modify spam mail subject' option in Spam Filtering Settings? So just change '****SPAM****' to '***SPAM***', save changes and check send mail with GTUBE text in mail body:
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

Also please ask him how many emails he used to train SpamAssassin? It should be at least 200 right and 200 wrong mails to trian personal SpamAssassin rules.
 
Back
Top