HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   SpamAssassin runs amok after Update (http://www.howtoforge.com/forums/showthread.php?t=2110)

Coteaux 17th January 2006 12:09

SpamAssassin runs amok after Update
 
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.

till 17th January 2006 12:27

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".

Coteaux 17th January 2006 13:40

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?

till 17th January 2006 13:53

Quote:

Originally Posted by Coteaux
Thanks for the quick reply!

/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin
didn't show any message at all.

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

Quote:

The perl-modules are all up to date.
Ok.

Quote:

There was a patch from SuSE for Courier (autoinstalled by you). Could it have to do with that?
No, courier is not involved with mailscanning.

Spamassassin is invoked by a procmail recipe.

Coteaux 17th January 2006 14:27

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.

falko 17th January 2006 17:43

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/

Coteaux 17th January 2006 18:37

/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

Coteaux 18th January 2006 16:14

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

HTML Code:

...
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!

falko 18th January 2006 17:00

Quote:

Originally Posted by Coteaux
[html]
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)

Maybe the problem is related to the existence of /srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock or /srv/www/web1/user/web1_missy/.spamassassin/auto-whitelist.lock.fco1.fightclub-online.de.25607. Do these files exist? If so, remove them.

Maybe a server reboot would be a good idea.

Coteaux 18th January 2006 17:33

/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?


All times are GMT +2. The time now is 16:21.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.