Squeeze upgrade killed Spamassassin daemon init scriptSpama

Discussion in 'HOWTO-Related Questions' started by VinceHeuser, Aug 4, 2011.

  1. VinceHeuser

    VinceHeuser New Member

    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
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's the output of
    Code:
    ls -la /etc/init.d/
    ?
     
  3. Mark_NL

    Mark_NL New Member

    This script is called "spamassassin" not spamd

    Code:
    /etc/init.d/spamassassin
     
  4. VinceHeuser

    VinceHeuser New Member

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

    Mark_NL New Member

    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.
     
  6. VinceHeuser

    VinceHeuser New Member

    Thanks for the advice!

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

    Mark_NL New Member

    SpamAssassin comes with ISPConfig2 .. so it's Falko's and/or Till's fault!!! ;-)
     
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

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

    Mark_NL New Member

    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 ;)
     

Share This Page