SpamAssassin runs amok after Update

Discussion in 'Installation/Configuration' started by Coteaux, Jan 17, 2006.

  1. Coteaux

    Coteaux New Member

    I was running ISPConfig 2.1.1 on Suse 10.0 64 bit. Everything was fine: Emails were scanned, Spam was discarded...
    Then I did an update to ISPConfig 2.1.2 and now, everytime a mail arrives the system, the spamassassin-process eats all the memory (2GB) and the swap until the kernel kills the process. The server is so laggy in these times that I cannot interfere.
    Where can I search for an error? How is this spamassassin-script started?

    I did the perfect install for suse with the changes for 64 bit in the compile-file and the changes for the suse-courier-start-scripts from this forum.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try this (from the ISPConfig installation manual):

    SpamAssassin

    The ISPConfig comes with SpamAssassin, but without the Perl modules needed by
    SpamAssassin. Run the following command after the installation of the ISPConfig:

    /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin

    If errors appear you have to install some Perl modules.
    Code:
    perl -MCPAN -e shell
    install HTML::Parser
    install DB_File
    install Net::DNS (when prompted to enable tests, choose "no")
    install Digest::SHA1
    
    To leave the Perl shell type

    q

    If

    /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin

    does not return any error everything is fine. You can then leave SpamAssassin by typing
    " CTRL + c".
     
  3. Coteaux

    Coteaux New Member

    Thanks for the quick reply!

    /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin
    didn't show any message at all.
    The perl-modules are all up to date.

    There was a patch from SuSE for Courier (autoinstalled by you). Could it have to do with that?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats ok. And the process does not aet up your memory?

    Ok.

    No, courier is not involved with mailscanning.

    Spamassassin is invoked by a procmail recipe.
     
  5. Coteaux

    Coteaux New Member

    Thats ok. And the process does not aet up your memory?

    No, that process is ok.
    The process which has to be killed is for example (from ps aux):

    10002 9784 77.8 65.9 1385860 1347520 ? R 16:31 0:08 /usr/bin/perl -T -w /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin --prefs-file=/srv/www/web1/user/web1_sysadmin/.user_prefs

    If other users receive mail it is similar.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's in /srv/www/web1/user/web1_sysadmin/.user_prefs? Also post the output of
    Code:
    ls -la /srv/www/web1/user/web1_sysadmin/
     
  7. Coteaux

    Coteaux New Member

    /srv/www/web1/user/web1_sysadmin/.user_prefs :
    required_score 5.0

    rewrite_header Subject ***SPAM-Nachricht***
    (rest is commented out).

    ls -la /srv/www/web1/user/web1_sysadmin/ :
    total 118
    drwxr-xr-x 6 web1_sysadmin web1 576 Jan 17 18:33 .
    drwxr-xr-x 18 fco_webadmin web1 696 Dec 30 19:41 ..
    -rw-r--r-- 1 root root 544 Jan 16 20:13 .antivirus.rc
    -rw-r--r-- 1 root root 762 Jan 16 20:13 .autoresponder.rc
    -rw-r--r-- 1 root root 22 Jan 16 20:13 .bounce-exceed-quota.txt
    -rw------- 1 web1_sysadmin web1 24 Jan 16 20:13 .forward
    -rw-r--r-- 1 root root 67866 Jan 16 20:13 .html-trap.rc
    -rw-r--r-- 1 root root 3889 Jan 16 20:13 .local-rules.rc
    -rw-r--r-- 1 root root 180 Jan 16 20:13 .mailsize.rc
    -rw-r--r-- 1 root root 446 Jan 16 20:13 .procmailrc
    -rw-r--r-- 1 root root 2667 Jan 16 20:13 .quota.rc
    drwx------ 2 web1_sysadmin web1 144 Jan 12 21:06 .spamassassin
    -rw-r--r-- 1 root root 1146 Jan 16 20:13 .spamassassin.rc
    -rw-r--r-- 1 root root 1651 Jan 16 20:13 .user_prefs
    -rw-r--r-- 1 web1_sysadmin web1 0 Dec 10 05:48 .vacation.cache
    -rw-r--r-- 1 root root 0 Jan 16 20:13 .vacation.msg
    drwx------ 6 web1_sysadmin web1 272 Jan 17 07:52 Maildir
    drwx------ 2 web1_sysadmin web1 72 Jan 17 18:33 tmp
    drwxrwxr-x 2 web1_sysadmin web1 8816 Jan 17 18:32 web
     
  8. Coteaux

    Coteaux New Member

    I attached to one of the amok-running processes with strace.
    This is a part of the output:

    HTML:
    ...
    25607 lstat("/srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock", {st_mode=S_IFREG|0666, st_size=62, ...}) = 0
    25607 select(0, NULL, NULL, NULL, {1, 148776}) = 0 (Timeout)
    25607 write(3, "fco1.fightclub-online.de.25607\n", 31) = 31
    25607 link("/srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock.fco1.fightclub-online.de.25607", "/srv/www/web1
    /user/web1_missy/.spamassassin/auto-whitelist.lock") = -1 EEXIST (File exists)
    25607 lstat("/srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock.fco1.fightclub-online.de.25607", {st_mode=S_IF
    REG|0666, st_size=899, ...}) = 0
    25607 lstat("/srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock", {st_mode=S_IFREG|0666, st_size=62, ...}) = 0
    25607 select(0, NULL, NULL, NULL, {1, 334264}) = 0 (Timeout)
    25607 write(3, "fco1.fightclub-online.de.25607\n", 31) = 31
    25607 link("/srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock.fco1.fightclub-online.de.25607", "/srv/www/web1
    /user/web1_missy/.spamassassin/auto-whitelist.lock") = -1 EEXIST (File exists)
    25607 lstat("/srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock.fco1.fightclub-online.de.25607", {st_mode=S_IF
    REG|0666, st_size=930, ...}) = 0
    25607 lstat("/srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock", {st_mode=S_IFREG|0666, st_size=62, ...}) = 0
    25607 close(3) = 0
    25607 unlink("/srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock.fco1.fightclub-online.de.25607") = 0
    25607 write(2, "[25607] warn: Use of uninitializ"..., 131) = 131
    25607 write(2, "[25607] warn: Use of uninitializ"..., 130) = 130
    25607 brk(0x26e0000) = 0x26e0000
    25607 write(2, "[25607] warn: Deep recursion on "..., 134) = 134
    25607 brk(0x2701000) = 0x2701000
    25607 brk(0x272b000) = 0x272b000
    25607 mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaac942000
    25607 brk(0x274c000) = 0x274c000
    25607 mremap(0x2aaaac942000, 139264, 208896, MREMAP_MAYMOVE) = 0x2aaaac942000
    25607 brk(0x2782000) = 0x2782000
    25607 mremap(0x2aaaac942000, 208896, 315392, MREMAP_MAYMOVE) = 0x2aaaac942000
    25607 brk(0x27a3000) = 0x27a3000
    25607 brk(0x27c4000) = 0x27c4000
    25607 mmap(NULL, 143360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaac98f000
    25607 brk(0x27e5000) = 0x27e5000
    25607 mremap(0x2aaaac942000, 315392, 471040, MREMAP_MAYMOVE) = 0x2aaaac9b2000
    25607 brk(0x2806000) = 0x2806000
    25607 brk(0x2827000) = 0x2827000
    25607 mremap(0x2aaaac98f000, 143360, 212992, MREMAP_MAYMOVE) = 0x2aaaac942000
    25607 brk(0x2848000) = 0x2848000
    25607 brk(0x2869000) = 0x2869000
    25607 mremap(0x2aaaac9b2000, 471040, 704512, MREMAP_MAYMOVE) = 0x2aaaac9b2000
    25607 brk(0x288a000) = 0x288a000
    25607 brk(0x28ab000) = 0x28ab000
    25607 brk(0x28cc000) = 0x28cc000
    25607 mremap(0x2aaaac942000, 212992, 319488, MREMAP_MAYMOVE) = 0x2aaaac942000
    25607 brk(0x28ed000) = 0x28ed000
    25607 brk(0x291d000) = 0x291d000
    25607 brk(0x293e000) = 0x293e000
    25607 brk(0x295f000) = 0x295f000
    25607 mremap(0x2aaaac9b2000, 704512, 1056768, MREMAP_MAYMOVE) = 0x2aaaac9b2000
    25607 brk(0x2980000) = 0x2980000
    25607 brk(0x29a1000) = 0x29a1000
    25607 brk(0x29c2000) = 0x29c2000
    25607 brk(0x29e3000) = 0x29e3000
    25607 mremap(0x2aaaac942000, 319488, 479232, MREMAP_MAYMOVE) = 0x2aaaacab4000
    25607 brk(0x2a04000) = 0x2a04000
    25607 brk(0x2a25000) = 0x2a25000
    25607 brk(0x2a48000) = 0x2a48000
    25607 brk(0x2a69000) = 0x2a69000
    25607 brk(0x2a8a000) = 0x2a8a000
    ...
    
    Can this give you a hint?
    Please help me!
     
  9. falko

    falko Super Moderator Howtoforge Staff

     
  10. Coteaux

    Coteaux New Member

    /srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock
    did exist. I removed it. I also removed all .spamassassin directorys and did several server reboots. Nothing helped.
    I now renamed
    /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin
    so the server doesn't lag all the time. We can receive mails now, but they are not scanned (just with TrashScan). But that's a pity, because we like this feature very much.

    Should I try to downgrade to 2.1.1 ?
    Will I loss data if I do so?
    Or isn't this an ISPConfig-problem?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess this is not an ISPConfig problem. If I remember correctly, Spamassassin was not upgraded between 2.1.1 and 2.1.2.
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Also, the SpamAssassin procmail recipe hasn't changed... :confused:
     
  13. Coteaux

    Coteaux New Member

    whow, I got it :p
    It was a double installation of Berkely DB (DB_File): I installed db42 (and db42_devel) for compiling one thing and then db_devel for ISPConfig. It was good for three weeks but after reboot it went wrong. Now I uninstalled db42 and spamassassin works!
    Thank you for your help and sorry, it has nothing to do with 2.1.2; my fault.
    2.1.2 works fine now! :D
     

Share This Page