# Spamassassin won't start

## Del Pede

I've recently installed spamassassin, and now i can't get it to start. The init script fails with this

```

 /etc/init.d/spamd start

 * Caching service dependencies ...                                                                                                                                                                      [ ok ]

 * Starting spamd ...

 * start-stop-daemon: /usr/sbin/spamd is a script

 * start-stop-daemon: and should be started, stopped or signalled with 

 * start-stop-daemon: --exec /usr/bin/perl -w /usr/sbin/spamd

 * start-stop-daemon: or you should specify a pidfile or process name

 * Failed to start spamd                                                                                                                                                                                 [ !! ]

 * ERROR: spamd failed to start

```

Here are my SPAMD_OPTS

```

SPAMD_OPTS="-m 5 -c -H -u postfix --pidfile /var/run/spamd/spamd.pid"

```

i've created the dir /var/run/spamd and chown'd it to postfix:postfix.

Still spamassassin won't start. Any help is appreciated

Cheers

Del Pede

----------

## di1bert

Have you checked if perhaps there's not a problem with your SA configuration with:

```

spamassassin -D --lint

```

As for the options, I would try running spamd from the CLI with your various options to see if 

perhaps one of them is causing the hiccup. You may want to add a couple of debug options 

to assist with this.

HTH

-m

----------

## electronvolt

This is most likely caused by an upgrade to baselayout-2/openRC which is more pedantic about the way daemons start/stop

A quick fix is to add --name spamd \ to /etc/init.d/spamd

```

start() {

        ebegin "Starting spamd"

        start-stop-daemon --start --quiet \

                --nicelevel ${SPAMD_NICELEVEL:-0} \

                --name spamd \

                --exec /usr/sbin/spamd -- -d -r ${PIDFILE} \

                        ${SPAMD_OPTS}

        eend $? "Failed to start spamd"

}

```

----------

## Del Pede

 *electronvolt wrote:*   

> This is most likely caused by an upgrade to baselayout-2/openRC which is more pedantic about the way daemons start/stop
> 
> A quick fix is to add --name spamd \ to /etc/init.d/spamd
> 
> ```
> ...

 

thanks - that helped alot. The errors messages is just down to one single line,. and that is basically "failed to start". I guess the init script trouble is solved, but now it's down to mis configuration

 *dilbert wrote:*   

> As for the options, I would try running spamd from the CLI with your various options to see if
> 
> perhaps one of them is causing the hiccup. You may want to add a couple of debug options
> 
> to assist with this.
> ...

 

spamd -D -u postfix tells me that the adress is allready in use. There shouldn't be any services on port 783. Apart from the file /etc/conf.d/spamd are there any other files, I should take a look at?

----------

## electronvolt

OK just had another look at bugzilla......

replace the line I just asked you to add in /etc/init.d/spamd with --pidfile ${PIDFILE} \

----------

## Del Pede

 *electronvolt wrote:*   

> OK just had another look at bugzilla......
> 
> replace the line I just asked you to add in /etc/init.d/spamd with --pidfile ${PIDFILE} \

 

Done - but it still fails. syslog tells me the following

```

May  7 13:25:41 localhost spamd[10994]: logger: removing stderr method 

May  7 13:25:41 localhost /etc/init.d/spamd[10993]: start-stop-daemon: /usr/sbin/spamd died

May  7 13:25:41 localhost /etc/init.d/spamd[10985]: ERROR: spamd failed to start

May  7 13:25:43 localhost spamd[10996]: config: failed to parse, now a plugin, skipping, in "/etc/mail/spamassassin/local.cf": ok_languages all 

May  7 13:25:45 localhost spamd[10996]: spamd: server started on port 783/tcp (running version 3.2.4-gr0) 

May  7 13:25:45 localhost spamd[10996]: spamd: server pid: 10996 

May  7 13:25:45 localhost spamd[10996]: spamd: server successfully spawned child process, pid 10998 

May  7 13:25:45 localhost spamd[10996]: spamd: server successfully spawned child process, pid 10999 

May  7 13:25:45 localhost spamd[10996]: prefork: child states: II 

```

My local.cs is generated of the web, and looks as follow

```

# SpamAssassin config file for version 3.x

# NOTE: NOT COMPATIBLE WITH VERSIONS 2.5 or 2.6

# See http://www.yrex.com/spam/spamconfig25.php for earlier versions

# Generated by http://www.yrex.com/spam/spamconfig.php (version 1.50)

# How many hits before a message is considered spam.

required_score           7.5

# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)

report_safe             1

# Enable the Bayes system

use_bayes               1

# Enable Bayes auto-learning

bayes_auto_learn              1

# Enable or disable network checks

skip_rbl_checks         0

use_razor2              1

use_dcc                 1

use_pyzor               1

# Mail using languages used in these country codes will not be marked

# as being possibly spam in a foreign language.

ok_languages            all

# Mail using locales used in these country codes will not be marked

# as being possibly spam in a foreign language.

ok_locales              all

```

I reckon the problem lies elsewhere, due to the config: failed to parse bit

----------

## electronvolt

going back to your OP..... is there any reason why you created the directory /var/run/spamd? my spamd.pid is just  /var/run/spamd.pid, you could then remove the --pidfile /var/run/spamd/spamd.pid from your SPAMD_OPTS as it should default to /var/run/spamd.pid. Just a thought

/edit

actually just check your /etc/conf/spamd file as it has a line for PIDFILE in it. It is one line below the SPAM_OPTS line in mine and if you've set the pidfile under SPAM_OPTS and it's set differently under PIDFILE this may cause a problem

----------

## Del Pede

 *electronvolt wrote:*   

> going back to your OP..... is there any reason why you created the directory /var/run/spamd? my spamd.pid is just  /var/run/spamd.pid, you could then remove the --pidfile /var/run/spamd/spamd.pid from your SPAMD_OPTS as it should default to /var/run/spamd.pid. Just a thought

 

I created it. so i didn't have to give systemwide write access to the whole /var/run directive. Just so that the postfix user only had write access to /var/run/spamd

----------

## electronvolt

Sorry I just edited my previous post before you replied to it!!  check your /etc/conf.d/spamd file as it has a specific place to add the pidfile location as opposed to setting it in SPAMD_OPTS

----------

## Del Pede

 *electronvolt wrote:*   

> 
> 
> actually just check your /etc/conf/spamd file as it has a line for PIDFILE in it. It is one line below the SPAM_OPTS line in mine and if you've set the pidfile under SPAM_OPTS and it's set differently under PIDFILE this may cause a problem

 

I commented out the PIDFILE line, but it still fails to start

----------

## electronvolt

OK I just tried your setup...set spamd to run under a different user using -u and set the --pidfile /var/run/spamd/spamd.pid under SPAM_OPTS and commented out the PIDFILE line. It did not start. I then removed the --pidfile bit from SPAM_OPTS and set the pidfile location with PIDFILE="/var/run/spamd/spamd.pid" and it started fine, so maybe you should give that a try

----------

## Del Pede

 *electronvolt wrote:*   

> OK I just tried your setup...set spamd to run under a different user using -u and set the --pidfile /var/run/spamd/spamd.pid under SPAM_OPTS and commented out the PIDFILE line. It did not start. I then removed the --pidfile bit from SPAM_OPTS and set the pidfile location with PIDFILE="/var/run/spamd/spamd.pid" and it started fine, so maybe you should give that a try

 

Bizare. Very bizare

```
freya conf.d # /etc/init.d/spamd start

 * Starting spamd ...

 * start-stop-daemon: /usr/sbin/spamd died

 * Failed to start spamd                                                                        [ !! ]

 * ERROR: spamd failed to start

freya conf.d # tail -f /var/log/syslog

May  7 14:38:34 localhost /etc/init.d/spamd[14204]: ERROR: spamd failed to start

May  7 14:39:06 localhost spamd[14227]: logger: removing stderr method 

May  7 14:39:06 localhost /etc/init.d/spamd[14226]: start-stop-daemon: /usr/sbin/spamd died

May  7 14:39:06 localhost /etc/init.d/spamd[14218]: ERROR: spamd failed to start

May  7 14:39:08 localhost spamd[14229]: config: failed to parse, now a plugin, skipping, in "/etc/mail/spamassassin/local.cf": ok_languages all 

May  7 14:39:10 localhost spamd[14229]: spamd: server started on port 783/tcp (running version 3.2.4-gr0) 

May  7 14:39:10 localhost spamd[14229]: spamd: server pid: 14229 

May  7 14:39:10 localhost spamd[14229]: spamd: server successfully spawned child process, pid 14231 

May  7 14:39:10 localhost spamd[14229]: spamd: server successfully spawned child process, pid 14232 

May  7 14:39:10 localhost spamd[14229]: prefork: child states: II 

```

the init scripts claims it fails, but syslog seems to think it starts

```

 ps -aux | grep spamd

Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html

root     14229  3.2  4.8  29832 24548 ?        Ss   14:39   0:03 /usr/sbin/spamd -d -r /var/run/spamd/spamd.pid -m 5 -c -H -u postfix

postfix  14231  0.0  4.5  29832 23100 ?        S    14:39   0:00 spamd child

postfix  14232  0.0  4.5  29832 23004 ?        S    14:39   0:00 spamd child

root     14249  0.0  0.1   4980   696 pts/0    R+   14:40   0:00 grep --colour=auto spamd

```

I'm officially confused. Can this be a init script bug, or is it just simply not running??!!

----------

## electronvolt

well we seem to be moving forward a little!! But I'm as confused as you!! Try commenting out the ok_languages and ok_locales entries in your /etc/spamassassin/local.cf file. I don't see why these should fail to parse but they are set to all by default anyway

----------

## Del Pede

 *electronvolt wrote:*   

> well we seem to be moving forward a little!! But I'm as confused as you!! Try commenting out the ok_languages and ok_locales entries in your /etc/spamassassin/local.cf file. I don't see why these should fail to parse but they are set to all by default anyway

 

Baiscally samething happends. init scritps claims to fail, but syslog claims succes, but nothing about parsing errors. ps -aux shows spamd running...

----------

## electronvolt

This is very strange, can you post your full /etc/init.d/spamd file as I'm inclined to think that there is something wrong with the init script.

----------

## Del Pede

 *electronvolt wrote:*   

> This is very strange, can you post your full /etc/init.d/spamd file as I'm inclined to think that there is something wrong with the init script.

 

off course. Here you go

```

#!/sbin/runscript

# Copyright 1999-2005 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin/files/3.0.0-spamd.init,v 1.7 2007/02/11 19:46:32 ian Exp $

# NB: Config is in /etc/conf.d/spamd

# Provide a default location if they haven't in /etc/conf.d/spamd

PIDFILE=${PIDFILE:-/var/run/spamd/spamd.pid}

opts="${opts} reload"

depend() {

        need net

        before mta

        use logger

}

start() {

        ebegin "Starting spamd"

        start-stop-daemon --start --quiet \

                --nicelevel ${SPAMD_NICELEVEL:-0} \

                --pidfile ${PIDFILE} \

                --exec /usr/sbin/spamd -- -d -r ${PIDFILE} \

                        ${SPAMD_OPTS}

        eend $? "Failed to start spamd"

}

stop() {

        ebegin "Stopping spamd"

        start-stop-daemon --stop --quiet --pidfile ${PIDFILE}

        eend $? "Failed to stop spamd"

}

reload() {

        ebegin "Reloading configuration"

        kill -HUP $(< ${PIDFILE})

        eend $?

}

```

----------

## electronvolt

Well the init script seems fine, apart from the change in PIDFILE location it is identical to mine. Going back several steps to di1bert's suggestions, as a test remove -u postfix from your SPAMD_OPTS variable to see whether it starts fine as root; it may be some strange permissions issue. Apart from that I'm running out of ideas. The only other thing I can think of is some strange issue in the local.cf file, although I can't see why. It may just be worth renaming it to local.cf.old and touch local.cf to create an empty file and trying that.

----------

## electronvolt

well now I have something. I tried your config again, running as a different user and using /var/run/spamd/spamd.pid as the pid location and this gave exactly the same error you were getting. Namely the init script failed to start but ps -aux | grep spamd shows spamd running. Strange eh? So I killed all running instances using killall spamd and then tried again and IT WORKED FINE!! Maybe you've got running instances from before we started this long road!!

----------

## di1bert

I had this problem recently. For some reason famd was listening on the spamd port. Since it was a server I didn't need famd running

so I killed it and removed from default runlevel and restarted spamd...problem solved.

HTH

-m

----------

## Del Pede

 *di1bert wrote:*   

> I had this problem recently. For some reason famd was listening on the spamd port. Since it was a server I didn't need famd running
> 
> so I killed it and removed from default runlevel and restarted spamd...problem solved.
> 
> HTH
> ...

 

I don't have famd installed, so that don't seem to be the problem

----------

## Del Pede

 *electronvolt wrote:*   

> well now I have something. I tried your config again, running as a different user and using /var/run/spamd/spamd.pid as the pid location and this gave exactly the same error you were getting. Namely the init script failed to start but ps -aux | grep spamd shows spamd running. Strange eh? So I killed all running instances using killall spamd and then tried again and IT WORKED FINE!! Maybe you've got running instances from before we started this long road!!

 

I've reverted way back to the basic config, with just the change in init script. I tried killall spamd, and it now says there is no process running - which is good.

Then i try to start from the init script again, and it fails

```

/etc/init.d/spamd start

 * Caching service dependencies ...                                       [ ok ]

 * Starting spamd ...

 * start-stop-daemon: did not create a valid pid in `/var/run/spamd.pid'

 * Failed to start spamd                                                  [ !! ]

 * ERROR: spamd failed to start

```

Back to the pid file issue

----------

## electronvolt

Just to clarify, what is SPAMD_OPTS set to? are you still running as postfix? I get this error if I try to run spamd as a user without write permission for /var/run. Try removing the -u postfix part and see if it works correctly. If so then we know it's a permissions issue.

----------

## Del Pede

 *electronvolt wrote:*   

> Just to clarify, what is SPAMD_OPTS set to? are you still running as postfix? I get this error if I try to run spamd as a user without write permission for /var/run. Try removing the -u postfix part and see if it works correctly. If so then we know it's a permissions issue.

 

```
SPAMD_OPTS="-m 5 -c -H"
```

I just run it as root now.

----------

## electronvolt

So it runs fine as root? Now we need to make it work as user postfix. Go ahead and revert to -u postfix, and set the pidfile location to /var/run/spamd/spamd.pid in /etc/conf.d/spamd and in /etc/init.d/spamd. Make sure the /var/run/spamd directory exists and has the correct permissions set. what does ls -l give when in directory /var/run?

----------

## Del Pede

 *electronvolt wrote:*   

> So it runs fine as root? Now we need to make it work as user postfix. Go ahead and revert to -u postfix, and set the pidfile location to /var/run/spamd/spamd.pid in /etc/conf.d/spamd and in /etc/init.d/spamd. Make sure the /var/run/spamd directory exists and has the correct permissions set. what does ls -l give when in directory /var/run?

 

It apparently runs, but the init scripts fails. 

```
freya conf.d # /etc/init.d/spamd start

 * Starting spamd ...

 * start-stop-daemon: did not create a valid pid in `/var/run/spamd.pid'

 * Failed to start spamd                                                  [ !! ]

 * ERROR: spamd failed to start

freya conf.d # ps -aux | grep spamd

Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html

root     28012 12.9  4.8  29820 24532 ?        SNs  18:51   0:03 /usr/sbin/spamd -d -r /var/run/spamd.pid -m 5 -c -H

root     28014  0.0  4.5  29820 22796 ?        SN   18:52   0:00 spamd child

root     28015  0.0  4.4  29820 22700 ?        SN   18:52   0:00 spamd child

root     28017  0.0  0.1   4984   700 pts/0    R+   18:52   0:00 grep --colour=auto spamd

freya conf.d #

```

----------

## electronvolt

Right...the assumption I made in my original reply to your post was that you were using baselayout-2/openRC...is that so? If not then you won't need the --pidfile ${PIDFILE} \ line in /etc/init.d/spamd. If you are using openRC then I'm stumped. There should be no reason why it shouldn't be able to create /var/run/spamd.pid. can you post what ls -l shows in /var/run

----------

## Del Pede

 *electronvolt wrote:*   

> Right...the assumption I made in my original reply to your post was that you were using baselayout-2/openRC...is that so? If not then you won't need the --pidfile ${PIDFILE} \ line in /etc/init.d/spamd. If you are using openRC then I'm stumped. There should be no reason why it shouldn't be able to create /var/run/spamd.pid. can you post what ls -l shows in /var/run

 

```
 ls -l /var/run/

totalt 72

-rw-r--r-- 1 root    root       5  7 maj 12:33 apache2.pid

-rw-r--r-- 1 root    root       5 26 apr 13:50 authdaemon.pid

-rw------- 1 root    root       0 26 apr 13:50 authdaemon.pid.lock

srwx------ 1 apache  root       0  4 maj  2007 cgisock

srwx------ 1 apache  root       0 23 maj  2007 cgisock.11607

srwx------ 1 apache  root       0 16 jun  2007 cgisock.12454

srwx------ 1 apache  root       0 15 maj  2007 cgisock.26219

-rw-r--r-- 1 root    root       5 26 apr 13:50 cron.pid

drwxr-xr-x 2 dhcp    dhcp      80 26 apr 13:50 dhcp

-rw-r--r-- 1 root    root       5 26 apr 14:11 dnsmasq.pid

-rw-r--r-- 1 root    root       5 26 apr 13:50 imapd.pid

-rw------- 1 root    root       0 26 apr 13:50 imapd.pid.lock

drwxr-xr-x 2 root    root     128  7 maj 12:42 iptraf

-rw-r--r-- 1 root    root       5 26 apr 13:50 klogd.pid

drwxrwxr-T 2 root    users     48 27 feb 17:33 mount.davfs

drwxr-xr-x 2 mysql   mysql    112 26 apr 13:50 mysqld

-rw-r--r-- 1 root    root       4 27 apr 01:38 ntpd.pid

drwxr-xr-x 2 ldap    ldap      48 24 apr 15:13 openldap

-rw------- 1 root    root     465  7 maj 00:57 portmap_mapping

drwx------ 2 root    root      48 18 sep  2006 pure-ftpd

-rw------- 1 root    root     512 26 apr 13:50 random-seed

drwxr-xr-x 2 root    root      48 19 jun  2003 samba

drwxrwxr-x 4 root    utmp      96  2 nov  2006 screen

drwxr-xr-x 2 root    root      48 21 apr 13:53 sepermit

-rw------- 1 root    root       5 26 apr 13:50 sm-notify.pid

drwxr-xr-x 2 postfix postfix   48  7 maj 18:11 spamd

-rw-r--r-- 1 root    root       6  7 maj 18:52 spamd.pid

-rw-r--r-- 1 sqlgrey sqlgrey    5 26 apr 13:50 sqlgrey.pid

-rw-r--r-- 1 root    root       5 26 apr 13:50 sshd.pid

-rw-r--r-- 1 root    root      29 26 apr 13:50 svc-started-mysqld

-rw-r--r-- 1 root    root       5 26 apr 13:50 syslogd.pid

-rw-r--r-- 1 root    utmp    4608  7 maj 18:09 utmp

-rw-r--r-- 1 root    root       5 26 apr 14:14 ypserv.pid

```

I changed it back to, just creating the pid file in /var/run, and not /var/run/spamd. Though neither things work. I don't seem to be running openrc. I've even tried chmod 777 on /var/run/spamd

----------

## electronvolt

If you do the following as root

killall spamd

rm /var/run/spamd.pid

/etc/init.d/spamd start

does it still give the start-stop-daemon: did not create a valid pid in `/var/run/spamd.pid' error?

If it does I am truly stumped because there should be absolutely no reason why root cannot create a pidfile in /var/run

----------

## Del Pede

 *electronvolt wrote:*   

> If you do the following as root
> 
> killall spamd
> 
> rm /var/run/spamd.pid
> ...

 

```
 /etc/init.d/spamd start

 * Starting spamd ...

 * Failed to start spamd                                                                                                                               [ !! ]

 * ERROR: spamd failed to start

```

From syslog

```

May  7 19:59:36 localhost spamd[29674]: server socket setup failed, retry 1: spamd: could not create INET socket on 127.0.0.1:783: Adressen er allerede i brug

May  7 19:59:37 localhost spamd[29674]: server socket setup failed, retry 2: spamd: could not create INET socket on 127.0.0.1:783: Adressen er allerede i brug

May  7 19:59:38 localhost spamd[29674]: spamd: could not create INET socket on 127.0.0.1:783: Adressen er allerede i brug

May  7 19:59:38 localhost /etc/init.d/spamd[29665]: ERROR: spamd failed to start

```

Now it just can't connect to 127.0.0.1:738

Getting closer.

I have no clue to why it cannot connect to port 738

----------

## Del Pede

A slight progress update

spamd -D seems to make the bloody thing run, so i guess it's a init script problem. Here is the debug output

```
[4341] dbg: logger: adding facilities: all

[4341] dbg: logger: logging level is DBG

[4341] dbg: logger: trying to connect to syslog/unix...

[4341] dbg: logger: opening syslog with unix socket

[4341] dbg: logger: successfully connected to syslog/unix

[4341] dbg: logger: successfully added syslog method

[4341] dbg: spamd: will perform setuids? 1

[4341] dbg: spamd: creating INET socket:

[4341] dbg: spamd: Listen: 128

[4341] dbg: spamd: LocalAddr: 127.0.0.1

[4341] dbg: spamd: LocalPort: 783

[4341] dbg: spamd: Proto: 6

[4341] dbg: spamd: ReuseAddr: 1

[4341] dbg: spamd: Type: 1

[4341] dbg: logger: adding facilities: all

[4341] dbg: logger: logging level is DBG

[4341] dbg: generic: SpamAssassin version 3.2.4

[4341] dbg: config: score set 0 chosen.

[4341] dbg: dns: no ipv6

[4341] dbg: dns: is Net::DNS::Resolver available? yes

[4341] dbg: dns: Net::DNS version: 0.63

[4341] dbg: spamd: Preloading modules with HOME=/tmp/spamd-4341-init

[4341] dbg: ignore: test message to precompile patterns and load modules

[4341] dbg: config: using "/etc/mail/spamassassin" for site rules pre files

[4341] dbg: config: read file /etc/mail/spamassassin/init.pre

[4341] dbg: config: read file /etc/mail/spamassassin/v310.pre

[4341] dbg: config: read file /etc/mail/spamassassin/v312.pre

[4341] dbg: config: read file /etc/mail/spamassassin/v320.pre

[4341] dbg: config: using "/usr/share/spamassassin" for sys rules pre files

[4341] dbg: config: using "/usr/share/spamassassin" for default rules dir

[4341] dbg: config: read file /usr/share/spamassassin/10_default_prefs.cf

[4341] dbg: config: read file /usr/share/spamassassin/11_gentoo.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_advance_fee.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_body_tests.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_compensate.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_dnsbl_tests.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_drugs.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_dynrdns.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_fake_helo_tests.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_head_tests.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_html_tests.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_imageinfo.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_meta_tests.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_net_tests.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_phrases.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_porn.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_ratware.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_uri_tests.cf

[4341] dbg: config: read file /usr/share/spamassassin/20_vbounce.cf

[4341] dbg: config: read file /usr/share/spamassassin/23_bayes.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_accessdb.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_antivirus.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_asn.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_dcc.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_dkim.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_domainkeys.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_hashcash.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_pyzor.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_razor2.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_replace.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_spf.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_textcat.cf

[4341] dbg: config: read file /usr/share/spamassassin/25_uribl.cf

[4341] dbg: config: read file /usr/share/spamassassin/30_text_de.cf

[4341] dbg: config: read file /usr/share/spamassassin/30_text_fr.cf

[4341] dbg: config: read file /usr/share/spamassassin/30_text_it.cf

[4341] dbg: config: read file /usr/share/spamassassin/30_text_nl.cf

[4341] dbg: config: read file /usr/share/spamassassin/30_text_pl.cf

[4341] dbg: config: read file /usr/share/spamassassin/30_text_pt_br.cf

[4341] dbg: config: read file /usr/share/spamassassin/50_scores.cf

[4341] dbg: config: read file /usr/share/spamassassin/60_awl.cf

[4341] dbg: config: read file /usr/share/spamassassin/60_shortcircuit.cf

[4341] dbg: config: read file /usr/share/spamassassin/60_whitelist.cf

[4341] dbg: config: read file /usr/share/spamassassin/60_whitelist_dk.cf

[4341] dbg: config: read file /usr/share/spamassassin/60_whitelist_dkim.cf

[4341] dbg: config: read file /usr/share/spamassassin/60_whitelist_spf.cf

[4341] dbg: config: read file /usr/share/spamassassin/60_whitelist_subject.cf

[4341] dbg: config: read file /usr/share/spamassassin/72_active.cf

[4341] dbg: config: using "/etc/mail/spamassassin" for site rules dir

[4341] dbg: config: read file /etc/mail/spamassassin/local.cf

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::DCC from @INC

[4341] dbg: dcc: network tests on, registering DCC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::Pyzor from @INC

[4341] dbg: pyzor: network tests on, attempting Pyzor

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::Razor2 from @INC

[4341] dbg: razor2: razor2 is not available

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::SpamCop from @INC

[4341] dbg: reporter: network tests on, attempting SpamCop

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::AWL from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::AutoLearnThreshold from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::WhiteListSubject from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::MIMEHeader from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::ReplaceTags from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::Check from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::HTTPSMismatch from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::URIDetail from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::BodyEval from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::DNSEval from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::HTMLEval from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::HeaderEval from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::MIMEEval from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::RelayEval from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::URIEval from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::WLBLEval from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::VBounce from @INC

[4341] dbg: plugin: loading Mail::SpamAssassin::Plugin::ImageInfo from @INC

[4341] dbg: rules: __MO_OL_9B90B merged duplicates: __MO_OL_C65FA

[4341] dbg: rules: __XM_OL_22B61 merged duplicates: __XM_OL_A842E

[4341] dbg: rules: __MO_OL_07794 merged duplicates: __MO_OL_8627E __MO_OL_F3B05

[4341] dbg: rules: __XM_OL_07794 merged duplicates: __XM_OL_25340 __XM_OL_3857F __XM_OL_4F240 __XM_OL_58CB5 __XM_OL_6554A __XM_OL_812FF __XM_OL_C65FA __XM_OL_CF0C0 __XM_OL_F475E __XM_OL_F6D01

[4341] dbg: rules: FH_MSGID_01C67 merged duplicates: __MSGID_VGA

[4341] dbg: rules: FS_NEW_SOFT_UPLOAD merged duplicates: HS_SUBJ_NEW_SOFTWARE

[4341] dbg: rules: __FH_HAS_XMSMAIL merged duplicates: __HAS_MSMAIL_PRI

[4341] dbg: rules: __MO_OL_015D5 merged duplicates: __MO_OL_6554A

[4341] dbg: rules: __MO_OL_91287 merged duplicates: __MO_OL_B30D1 __MO_OL_CF0C0

[4341] dbg: rules: KAM_STOCKOTC merged duplicates: KAM_STOCKTIP15 KAM_STOCKTIP20 KAM_STOCKTIP21 KAM_STOCKTIP4 KAM_STOCKTIP6

[4341] dbg: rules: __XM_OL_015D5 merged duplicates: __XM_OL_4BF4C __XM_OL_4EEDB __XM_OL_5B79A __XM_OL_9B90B __XM_OL_ADFF7 __XM_OL_B30D1 __XM_OL_B4B40 __XM_OL_BC7E6 __XM_OL_F3B05 __XM_OL_FF5C8

[4341] dbg: rules: __MO_OL_22B61 merged duplicates: __MO_OL_4F240 __MO_OL_ADFF7

[4341] dbg: rules: __MO_OL_812FF merged duplicates: __MO_OL_BC7E6

[4341] dbg: rules: __MO_OL_25340 merged duplicates: __MO_OL_4EEDB __MO_OL_7533E

[4341] dbg: rules: __MO_OL_58CB5 merged duplicates: __MO_OL_B4B40

[4341] dbg: rules: __DOS_HAS_ANY_URI merged duplicates: __HAS_ANY_URI

[4341] dbg: rules: __XM_OL_C9068 merged duplicates: __XM_OL_EF20B

[4341] dbg: rules: __MO_OL_72641 merged duplicates: __MO_OL_A842E

[4341] dbg: rules: __MO_OL_F475E merged duplicates: __MO_OL_FF5C8

[4341] dbg: rules: __MO_OL_4BF4C merged duplicates: __MO_OL_F6D01

[4341] dbg: conf: finish parsing

[4341] dbg: plugin: Mail::SpamAssassin::Plugin::ReplaceTags=HASH(0x8b011c8) implements 'finish_parsing_end', priority 0

[4341] dbg: replacetags: replacing tags

[4341] dbg: replacetags: done replacing tags

[4341] dbg: bayes: no dbs present, cannot tie DB R/O: /tmp/spamd-4341-init/.spamassassin/bayes_toks

[4341] dbg: config: score set 1 chosen.

[4341] dbg: message: main message type: text/plain

[4341] dbg: message: ---- MIME PARSER START ----

[4341] dbg: message: parsing normal part

[4341] dbg: message: ---- MIME PARSER END ----

[4341] dbg: plugin: Mail::SpamAssassin::Plugin::DNSEval=HASH(0x8dca13c) implements 'check_start', priority 0

[4341] dbg: bayes: no dbs present, cannot tie DB R/O: /tmp/spamd-4341-init/.spamassassin/bayes_toks

[4341] dbg: plugin: Mail::SpamAssassin::Plugin::Check=HASH(0x8b066f4) implements 'check_main', priority 0

[4341] dbg: conf: trusted_networks are not configured; it is recommended that you configure trusted_networks manually

[4341] dbg: metadata: X-Spam-Relays-Trusted: 

[4341] dbg: metadata: X-Spam-Relays-Untrusted: 

[4341] dbg: metadata: X-Spam-Relays-Internal: 

[4341] dbg: metadata: X-Spam-Relays-External: 

[4341] dbg: message: no encoding detected

[4341] dbg: dns: is_dns_available() last checked 1210244494.0 seconds ago; re-checking

[4341] dbg: dns: no ipv6

[4341] dbg: dns: is Net::DNS::Resolver available? yes

[4341] dbg: dns: Net::DNS version: 0.63

[4341] dbg: dns: name server: 208.67.222.222, LocalAddr: 0.0.0.0

[4341] dbg: dns: testing resolver nameservers: 208.67.222.222, 208.67.220.220

[4341] dbg: dns: trying (3) motorola.com...

[4341] dbg: dns: looking up NS for 'motorola.com'

[4341] dbg: dns: NS lookup of motorola.com using 208.67.222.222 succeeded => DNS available (set dns_available to override)

[4341] dbg: dns: name server: 208.67.220.220, LocalAddr: 0.0.0.0

[4341] dbg: dns: trying (3) apache.org...

[4341] dbg: dns: looking up NS for 'apache.org'

[4341] dbg: dns: NS lookup of apache.org using 208.67.220.220 succeeded => DNS available (set dns_available to override)

[4341] dbg: dns: name server: 208.67.220.220, LocalAddr: 0.0.0.0

[4341] dbg: dns: NS list: 208.67.222.222, 208.67.220.220

[4341] dbg: dns: name server: 208.67.222.222, LocalAddr: 0.0.0.0

[4341] dbg: dns: is DNS available? 1

[4341] dbg: dns: checking RBL sa-other.bondedsender.org., set bsp-untrusted

[4341] dbg: dns: checking RBL plus.bondedsender.org., set ssc-firsttrusted

[4341] dbg: dns: checking RBL combined.njabl.org., set njabl

[4341] dbg: dns: checking RBL bl.spamcop.net., set spamcop

[4341] dbg: dns: checking RBL dob.sibl.support-intelligence.net., set dob

[4341] dbg: dns: checking RBL zen.spamhaus.org., set zen-lastexternal

[4341] dbg: dns: checking RBL dnsbl.sorbs.net., set sorbs-lastexternal

[4341] dbg: dns: checking RBL dnsbl.sorbs.net., set sorbs

[4341] dbg: dns: checking RBL zen.spamhaus.org., set zen-lastexternal

[4341] dbg: dns: checking RBL list.dnswl.org., set dnswl-firsttrusted

[4341] dbg: dns: checking RBL sa-accredit.habeas.com., set habeas-firsttrusted

[4341] dbg: dns: checking RBL list.dsbl.org., set dsbl-lastexternal

[4341] dbg: dns: checking RBL sa-trusted.bondedsender.org., set bsp-firsttrusted

[4341] dbg: dns: checking RBL zen.spamhaus.org., set zen

[4341] dbg: dns: checking RBL iadb.isipp.com., set iadb-firsttrusted

[4341] dbg: check: running tests for priority: -1000

[4341] dbg: rules: running head tests; score so far=0

[4341] dbg: rules: compiled head tests

[4341] dbg: eval: all '*From' addrs: ignore@compiling.spamassassin.taint.org

[4341] dbg: eval: all '*To' addrs: 

[4341] dbg: rules: running body tests; score so far=0

[4341] dbg: rules: compiled body tests

[4341] dbg: rules: running uri tests; score so far=0

[4341] dbg: rules: compiled uri tests

[4341] dbg: rules: running rawbody tests; score so far=0

[4341] dbg: rules: compiled rawbody tests

[4341] dbg: rules: running full tests; score so far=0

[4341] dbg: rules: compiled full tests

[4341] dbg: rules: running meta tests; score so far=0

[4341] dbg: rules: compiled meta tests

[4341] dbg: check: running tests for priority: -950

[4341] dbg: rules: running head tests; score so far=0

[4341] dbg: rules: compiled head tests

[4341] dbg: rules: running body tests; score so far=0

[4341] dbg: rules: compiled body tests

[4341] dbg: rules: running uri tests; score so far=0

[4341] dbg: rules: compiled uri tests

[4341] dbg: rules: running rawbody tests; score so far=0

[4341] dbg: rules: compiled rawbody tests

[4341] dbg: rules: running full tests; score so far=0

[4341] dbg: rules: compiled full tests

[4341] dbg: rules: running meta tests; score so far=0

[4341] dbg: rules: compiled meta tests

[4341] dbg: check: running tests for priority: -900

[4341] dbg: rules: running head tests; score so far=0

[4341] dbg: rules: compiled head tests

[4341] dbg: rules: running body tests; score so far=0

[4341] dbg: rules: compiled body tests

[4341] dbg: rules: running uri tests; score so far=0

[4341] dbg: rules: compiled uri tests

[4341] dbg: rules: running rawbody tests; score so far=0

[4341] dbg: rules: compiled rawbody tests

[4341] dbg: rules: running full tests; score so far=0

[4341] dbg: rules: compiled full tests

[4341] dbg: rules: running meta tests; score so far=0

[4341] dbg: rules: compiled meta tests

[4341] dbg: check: running tests for priority: -400

[4341] dbg: rules: running head tests; score so far=0

[4341] dbg: rules: compiled head tests

[4341] dbg: rules: running body tests; score so far=0

[4341] dbg: rules: compiled body tests

[4341] dbg: rules: running uri tests; score so far=0

[4341] dbg: rules: compiled uri tests

[4341] dbg: rules: running rawbody tests; score so far=0

[4341] dbg: rules: compiled rawbody tests

[4341] dbg: rules: running full tests; score so far=0

[4341] dbg: rules: compiled full tests

[4341] dbg: rules: running meta tests; score so far=0

[4341] dbg: rules: compiled meta tests

[4341] dbg: check: running tests for priority: 0

[4341] dbg: rules: running head tests; score so far=0

[4341] dbg: rules: compiled head tests

[4341] dbg: rules: ran header rule __MISSING_REF ======> got hit: "UNSET"

[4341] dbg: rules: ran header rule __MSGID_OK_HOST ======> got hit: "@spamassassin_spamd_init>"

[4341] dbg: rules: ran header rule __MSGID_OK_DIGITS ======> got hit: "1210244492"

[4341] dbg: rules: ran header rule __MSOE_MID_WRONG_CASE ======> got hit: "

[4341] dbg: rules: Message-Id: "

[4341] dbg: rules: ran header rule __HAS_MSGID ======> got hit: "<"

[4341] dbg: rules: ran header rule __SANE_MSGID ======> got hit: "<1210244492.01473@spamassassin_spamd_init>

[4341] dbg: rules: "

[4341] dbg: rules: ran header rule MISSING_DATE ======> got hit: "UNSET"

[4341] dbg: rules: ran eval rule NO_RELAYS ======> got hit (1)

[4341] dbg: rules: ran eval rule __UNUSABLE_MSGID ======> got hit (1)

[4341] dbg: rules: ran eval rule MISSING_HEADERS ======> got hit (1)

[4341] dbg: rules: running body tests; score so far=1.581

[4341] dbg: rules: compiled body tests

[4341] dbg: rules: ran body rule __NONEMPTY_BODY ======> got hit: "I"

[4341] dbg: rules: running uri tests; score so far=1.581

[4341] dbg: rules: compiled uri tests

[4341] dbg: eval: stock info total: 0

[4341] dbg: rules: running rawbody tests; score so far=1.581

[4341] dbg: rules: compiled rawbody tests

[4341] dbg: rules: running full tests; score so far=1.581

[4341] dbg: rules: compiled full tests

[4341] dbg: util: current PATH is: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/mc

[4341] dbg: pyzor: pyzor is not available: no pyzor executable found

[4341] dbg: pyzor: no pyzor found, disabling Pyzor

[4341] dbg: dcc: dccifd is not available: no r/w dccifd socket found

[4341] dbg: dcc: dccproc is not available: no dccproc executable found

[4341] dbg: dcc: dccifd and dccproc are not available, disabling DCC

[4341] dbg: rules: running meta tests; score so far=1.581

[4341] dbg: rules: compiled meta tests

[4341] dbg: check: running tests for priority: 500

[4341] dbg: dns: harvest_dnsbl_queries

[4341] dbg: rules: running head tests; score so far=1.581

[4341] dbg: rules: compiled head tests

[4341] dbg: rules: running body tests; score so far=1.581

[4341] dbg: rules: compiled body tests

[4341] dbg: rules: running uri tests; score so far=1.581

[4341] dbg: rules: compiled uri tests

[4341] dbg: rules: running rawbody tests; score so far=1.581

[4341] dbg: rules: compiled rawbody tests

[4341] dbg: rules: running full tests; score so far=1.581

[4341] dbg: rules: compiled full tests

[4341] dbg: rules: running meta tests; score so far=1.581

[4341] dbg: rules: meta test FM_DDDD_TIMES_2 has undefined dependency 'FH_HOST_EQ_D_D_D_D'

[4341] dbg: rules: meta test FM_SEX_HOSTDDDD has undefined dependency 'FH_HOST_EQ_D_D_D_D'

[4341] dbg: rules: compiled meta tests

[4341] dbg: check: running tests for priority: 1000

[4341] dbg: rules: running head tests; score so far=2.865

[4341] dbg: rules: compiled head tests

[4341] dbg: locker: safe_lock: created /tmp/spamd-4341-init/.spamassassin/auto-whitelist.lock.freya.4341

[4341] dbg: locker: safe_lock: trying to get lock on /tmp/spamd-4341-init/.spamassassin/auto-whitelist with 0 retries

[4341] dbg: locker: safe_lock: link to /tmp/spamd-4341-init/.spamassassin/auto-whitelist.lock: link ok

[4341] dbg: auto-whitelist: tie-ing to DB file of type DB_File R/W in /tmp/spamd-4341-init/.spamassassin/auto-whitelist

[4341] dbg: auto-whitelist: db-based ignore@compiling.spamassassin.taint.org|ip=none scores 0/0

[4341] dbg: auto-whitelist: AWL active, pre-score: 2.865, autolearn score: 2.865, mean: undef, IP: undef

[4341] dbg: auto-whitelist: DB addr list: untie-ing and unlocking

[4341] dbg: auto-whitelist: DB addr list: file locked, breaking lock

[4341] dbg: locker: safe_unlock: unlink /tmp/spamd-4341-init/.spamassassin/auto-whitelist.lock

[4341] dbg: auto-whitelist: post auto-whitelist score: 2.865

[4341] dbg: rules: running body tests; score so far=2.865

[4341] dbg: rules: compiled body tests

[4341] dbg: rules: running uri tests; score so far=2.865

[4341] dbg: rules: compiled uri tests

[4341] dbg: rules: running rawbody tests; score so far=2.865

[4341] dbg: rules: compiled rawbody tests

[4341] dbg: rules: running full tests; score so far=2.865

[4341] dbg: rules: compiled full tests

[4341] dbg: rules: running meta tests; score so far=2.865

[4341] dbg: rules: compiled meta tests

[4341] dbg: check: is spam? score=2.865 required=7.5

[4341] dbg: check: tests=MISSING_DATE,MISSING_HEADERS,MISSING_SUBJECT,NO_RECEIVED,NO_RELAYS

[4341] dbg: check: subtests=__HAS_MSGID,__MISSING_REF,__MSGID_OK_DIGITS,__MSGID_OK_HOST,__MSOE_MID_WRONG_CASE,__NONEMPTY_BODY,__SANE_MSGID,__UNUSABLE_MSGID

[4341] dbg: learn: initializing learner

[4341] dbg: config: copying current conf to backup

[4341] info: spamd: server started on port 783/tcp (running version 3.2.4-gr0)

[4341] info: spamd: server pid: 4341

[4343] dbg: prefork: sysread(8) not ready, wait max 300 secs

[4341] info: spamd: server successfully spawned child process, pid 4343

[4341] dbg: prefork: child 4343: entering state 0

[4341] dbg: prefork: new lowest idle kid: none

[4344] dbg: prefork: sysread(9) not ready, wait max 300 secs

[4341] info: spamd: server successfully spawned child process, pid 4344

[4341] dbg: prefork: child 4344: entering state 0

[4341] dbg: prefork: new lowest idle kid: none

[4341] dbg: prefork: child 4343: entering state 1

[4341] dbg: prefork: new lowest idle kid: 4343

[4341] dbg: prefork: child reports idle

[4341] dbg: prefork: child 4344: entering state 1

[4341] dbg: prefork: new lowest idle kid: 4343

[4341] dbg: prefork: child reports idle

[4341] info: prefork: child states: II

[4341] info: spamd: server killed by SIGINT, shutting down

```

[4341] info: spamd: server killed by SIGINT, shutting down <<-- that's me terminating spamd

ps -aux shows it running

```
ps -aux | grep spamd

Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html

root      4368  0.0  0.2   6212  1220 ?        Ss   13:04   0:00 SCREEN spamd

root      4369 37.9  4.8  29804 24768 pts/1    Ss+  13:04   0:04 /usr/bin/perl -w /usr/sbin/spamd

root      4371  0.1  4.5  29804 22800 pts/1    S+   13:04   0:00 spamd child

root      4372  0.0  4.4  29804 22704 pts/1    S+   13:04   0:00 spamd child

root      4375  0.0  0.1   4980   708 pts/0    S+   13:04   0:00 grep --colour=auto spamd

```

Anyone? Init script problem?

Cheers for all the help up untill now anyways

----------

## electronvolt

Just a thought...check the /etc/init.d/spamd file to make sure that no whitespaces have crept in during the various edits you've made. Both after the statements and ensure that the indented commands are 'tabbed' rather then padded out with spaces.

----------

## Del Pede

 *electronvolt wrote:*   

> Just a thought...check the /etc/init.d/spamd file to make sure that no whitespaces have crept in during the various edits you've made. Both after the statements and ensure that the indented commands are 'tabbed' rather then padded out with spaces.

 

There don't seem to be any whitespaces in the init script. Bizarre

----------

## pdt13

i found running 

```
spamassassin -D --lint 
```

 first, this told me to run 

```
sa-update
```

after that i re-run 

```
spamassassin -D --lint 
```

 ok, this is working now, 

```
/etc/init.d/spamd start
```

 now works

----------

