Spamassassin does not detect spam messages

Created:

2016-11-16 12:45:29 UTC

Modified:

2017-04-24 11:19:01 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Spamassassin does not detect spam messages

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.0 for Windows
  • Plesk 11.5 for Windows
  • Plesk 12.0 for Windows

Symptoms

  • Spamassassin does not detect spam messages. A GTUBE test pattern was used to make sure the message does not filter

  • Plesk and SpamAssassin are installed on the drive other than C: and having short (8.3) filenames disabled

  • Unable to create an email address, I got an error from spammng.exe alike:
    "D:\Program Files (x86)\Parallels\Plesk\/admin/bin/spammng" "--sensitivity=7" "--mailname=user@domain.tld" failed with message: Could not find file 'D:\\Program Files (x86)\\Parallels\\Plesk\\\\Additional\\Perl\\site\\\\share\\\\spamassassin\\\\user_prefs.template'. (code 0)

Error in Windows EventViewer:

System.Exception: Unable to train spamassasin: Can't open perl script "D:\Program Files (x86)\Parallels\Plesk\Additional\Perl\site\bin\sa-learn": No such file or directory

at spammng.app.execSaLearn(String operation, String mail_name, String file_name)
at spammng.app.Main(String[] args)

NMAKE : fatal error U1073: don't know how to make 'D:\Program'
Stop.

Cause

  1. Lack of binary files at ' D:\Program Files (x86)\Parallels\Plesk\Additional\Perl\site\bin\ '
  2. Perl could not recognize the long filenames, (path with 'space' characters) due to a disabled creation of short file names on local disk (which is typically enabled by default):
    NMAKE : fatal error U1073: don't know how to make 'D:\Program'
    Stop.

Resolution

  1. Enable creation of short names on disk:

    fsutil 8dot3name set D: 0
    Successfully enabled 8dot3name generation on D:
  2. Stop every processes and services related to ' D:\Program Files (x86)\ '

  3. Use fsutil to create the shortname for ' D:\Program Files (x86)\ ' as ' PROGRA~2 '

    fsutil file setshortname "D:\Program Files (x86)" PROGRA~2

    dir /x /a
    07.03.2014 09:12 <DIR> PROGRA~2 Program Files (x86)
  4. Reboot the server

  5. Modify %plesk_dir%\Additional\Perl\lib\Config.pm : replace all Program Files (x86) with PROGRA~2

  6. Go to System > Advanced system settings > Environment Variables > Path (in Global) > Edit > Replace Program Files (x86) with PROGRA~2 for Perl path only. (be careful, do not loose other data in this field)

  7. Export Windows registry hives to file prior to making any changes

  8. Modify path in Windows registry:

    • In HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Perl replace all Program Files (x86) with PROGRA~2
    • In HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config\\SpamFilterUserConfigsPath

and

HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config\\SpamFilterUserConfigTemplateFile

HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PLESK\\PSA Config\\Config edit PRODUCT_DATA_D and PRODUCT_ROOT_D

  1. Uninstall SpamAssassin and install it again using the Plesk autoinstaller .

  2. Modify %plesk_dir%\\Additional\\SpamAssassin\\makefile : replace all Program Files (x86) with PROGRA~2

  3. Modify %plesk_dir%\\Additional\\SpamAssassin\\install.bat remove 2 words exit and add pause at the end of this script to be able to see the installation progress.

  4. Execute install.bat

Have more questions? Submit a request
Please sign in to leave a comment.