1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

spamassassin training error after 9.5 upgrade

Discussion in 'Plesk 9.x for Windows Issue, Fixes, How-To' started by PauloP, Apr 26, 2010.

  1. PauloP

    PauloP Guest

    0
     
    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=****** --mailname=mail@mail.com':
    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\mail@mail.com\bayes"
    util: refusing to untaint suspicious path: "C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\mail@mail.com\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\mail@mail.com\bayes"
    util: refusing to untaint suspicious path: "C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\mail@mail.com\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
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    I have forwarded it to developers. Let's wait their answer with results of investigation.
     
  3. PauloP

    PauloP Guest

    0
     
    any news about this?
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    It is still under developer's investigation. I will update thread with results as soon as I receive it.
     
  5. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    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) {
    
     
  6. PauloP

    PauloP Guest

    0
     
    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.
     
  7. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    I have forwarded your question to developers. I will update this thread with their reply.
     
  8. JavierAlonso

    JavierAlonso New Pleskian

    19
    35%
    Joined:
    Oct 29, 2009
    Messages:
    8
    Likes Received:
    0
    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?

    Greetings / saludos
    Javier Alonso
     
  9. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    As you can see there is path to needed file.
     
  10. Sunyl7

    Sunyl7 New Pleskian

    16
    60%
    Joined:
    Jul 1, 2010
    Messages:
    16
    Likes Received:
    0
    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.
     
  11. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
  12. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    PauloP,

    I have received following questions from developers to you:
     
Loading...