HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Squeeze upgrade killed Spamassassin daemon init scriptSpama (http://www.howtoforge.com/forums/showthread.php?t=53661)

VinceHeuser 4th August 2011 15:58

Squeeze upgrade killed Spamassassin daemon init scriptSpama
 
Falko,
I followed your ISP setup in Etch... and upgraded succesfully to Lenny.
Now, a year later, I "dist-upgraded" to squeeze and have a problem.
My old cron was "sa-update --nogpg && /etc/init.d/spamd restart"
That now fails, since there is no "/etc/init.d/spamd" script.

When I type # "spamd" or "spamd stop" I get exactly 10 iterations of :
"warn: server socket setup failed, retry 1: spamd: could not create INET socket on 127.0.0.1:783: Address already in use"

If I kill all spamd processes, then try "spamd start" I get
Aug 3 22:18:37.701 [18002] info: spamd: server started on port 783/tcp (running version 3.3.1)
Aug 3 22:18:37.702 [18002] info: spamd: server pid: 18002
Aug 3 22:18:37.704 [18002] info: spamd: server successfully spawned child process, pid 18004
Aug 3 22:18:37.708 [18002] info: spamd: server successfully spawned child process, pid 18005
Aug 3 22:18:37.710 [18002] info: prefork: child states: II
and the cursor hangs here.....

if I hit <ctrl>-C I get
Aug 3 22:18:58.180 [18002] info: spamd: server killed by SIGINT, shutting down
and the thing is dead again....

After days of searching and reading, I can find no startup script or explanation. In Squeeze, what is the proper way to set up a daemon of sa

I am using your ISPConfig... Postfix, Amavis, Dovecot, SA, Squirrelmail, etc.

Vince Heuser
Louisville, Ky. USA

falko 5th August 2011 10:24

What's the output of
Code:

ls -la /etc/init.d/
?

Mark_NL 5th August 2011 11:08

This script is called "spamassassin" not spamd

Code:

/etc/init.d/spamassassin

VinceHeuser 5th August 2011 15:52

Spamd script changed to spamassassin in Debian 6?
 
Here's the relevant (I hope) listing of init.d:
total 448
drwxr-xr-x. 2 root root 4096 Aug 1 10:31 .
drwxr-xr-x. 98 root root 12288 Aug 5 07:01 ..
-rwxr-xr-x 1 root root 3664 Dec 16 2010 amavis
-rwxr-xr-x 1 root root 7476 Mar 22 16:56 apache2
-rwxr-xr-x 1 root root 1071 Nov 23 2009 atd
-rwxr-xr-x 1 root root 9205 Jul 30 17:15 clamav-daemon
-rwxr-xr-x 1 root root 8459 Jul 30 17:15 clamav-freshclam
-rwxr-xr-x 1 root root 7114 Mar 2 2010 console-screen.sh
-rwxr-xr-x 1 root root 3753 Dec 18 2010 cron
-rwxr-xr-x 1 root root 2832 Jun 12 07:31 dbus
-rwxr-xr-x 1 root root 5696 May 25 04:09 dovecot
-rwxr-xr-x 1 root root 5717 Jun 28 2010 fail2ban
-rwxr-xr-x. 1 root root 1329 Jan 2 2008 halt
-rw-r--r-- 1 root root 0 Jul 17 13:51 .legacy-bootordering
-rwxr-xr-x 1 root root 3649 Jan 1 2011 mtab.sh
-rwxr-xr-x 1 root root 2443 Aug 29 2010 openbsd-inetd
-rwxr-xr-x 1 root root 4840 May 4 17:30 postfix
-rwxr-xr-x 1 root root 1298 Jan 31 2010 procps
-rwxr-xr-x 1 root root 4965 Mar 7 04:09 proftpd
-rwxr-xr-x 1 root root 117 Jan 1 2011 rcS
-rwxr-xr-x 1 root root 8065 Dec 19 2010 saslauthd
-rwxr-xr-x 1 root root 3286 Jan 1 2011 sendsigs
-rwxr-xr-x 1 root root 1891 Aug 9 2009 spamassassin
-rwxr-xr-x 1 root root 3704 Mar 31 2010 ssh

I get that changing the cron to ".../init.d/spamassassin" will fix the startup problem. What I don't get is why it shouldn't be ".../spamd -d", and why the Debian dist-upgrade didn't take care of the cron entry... Thanks!!

Mark_NL 5th August 2011 16:03

1. it shouldn't be spamd -d .. because this way you're calling the daemon binary itself, and will not fork into the background, it'll stay in the foreground until you kill it (with f.e. CTRL-C).

2. The cron entry is something that you've added manually, the dist-upgrade will not change manually changed values/settings etc. You've added that entry, so it's you're responsibility to see if it still works.

VinceHeuser 5th August 2011 16:10

Thanks for the advice!
 
I sure don't remember doing that myself... No matter... I will gratefully follow your advice. Thanks!!

Mark_NL 5th August 2011 16:19

Quote:

..I followed your ISP setup in Etch... and upgraded succesfully to Lenny...
SpamAssassin comes with ISPConfig2 .. so it's Falko's and/or Till's fault!!! ;-)

falko 5th August 2011 19:04

Quote:

Originally Posted by Mark_NL (Post 261042)
SpamAssassin comes with ISPConfig2 .. so it's Falko's and/or Till's fault!!! ;-)

But ISPConfig doesn't run it as a daemon... ;)

Mark_NL 5th August 2011 19:14

Quote:

Originally Posted by falko (Post 261055)
But ISPConfig doesn't run it as a daemon... ;)

Grrr, true .. most people switch to daemonized to save some resources on a busy server. only downside with ispc2 was that you'll lose the ability to supply user defined preferences for SA :)

Ah, you shouldn't run ispc2 anyway ;)


All times are GMT +2. The time now is 04:11.

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