Page 1 of 1

SpamAssassin Not Scanning

Posted: Fri Mar 30, 2007 9:53 am
by dougp23
OK. I **THINK** I've found all the gotchas, and covered them.

My /etc/sysconfig/spamass-milter Looks like this: (note that the SOCKET line was commented out for some reason):

### Override for your different local config
SOCKET=/var/run/spamass.sock

### Default parameter for spamass-milter is -f (work in the background)
### you may add another parameters here, see spamass-milter(1)
#EXTRA_FLAGS="-m -r 15"

----

My smtpd.cfg Looks like this:
SMTPFILTER=TRUE
RELAY accept 127.0.0.1
RELAY accept .mydomain.com
RELAY Log_Reject ALL

-----

My /var/log/maillog starts off with:
Mar 30 09:29:49 qmail spamd[29852]: spamd starting
Mar 30 09:29:50 qmail spamd[29854]: server started on port 783/tcp (running version 3.0.6)
Mar 30 09:29:50 qmail spamd[29854]: server successfully spawned child process, pid 29858

And that's it for spamd entries. We are getting a bunch of spam!!!!

Can anyone help?

Posted: Fri Mar 30, 2007 10:25 am
by craig
Is the spam tagged as ***SPAM**?

Posted: Fri Mar 30, 2007 10:55 am
by dougp23
Well according to the WIKI, I should see messages in /var/log/maillog that start with:

spamd: processing message

I don't see those. I do see milter re-writing headers, I see autollearn=failed

So am I wondering if I am really catching any spam at all?

I do see in my headers X-Spam-Score

Posted: Sun May 27, 2007 9:01 am
by Dakapo
Hello!

Did you solve this problem?
I've exactly the same. I installed SpamAssassin with my Scalix 11.0.1.22 Server on a Debian-System.

I used the Wiki-HowTo and I had no problems with the installation.

In my sendmail.mc I added

Code: Select all

INPUT_MAIL_FILTER(`spamassassin',`S=local:/var/run/sendmail/spamass.sock, F=, T=
C:15m;S:4m;R:4m;E:10m')dnl


To the last line. I changed the sock-Entry because under Debian it's in another directory.
After that I made

Code: Select all

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

for compiling the new sendmail-configuration.

Under Debian you also have to change one line in /etc/default/spamassassin to the following:

Code: Select all

ENABLED=1


Now I have the same problem like dougp23. spamd seems to get started during system-boot. But messages don't get scanned.

Is there something more that I have to look for on a debian-system?

Is something missed in the Wiki-HowTo?

Kind regards
Dakapo

Posted: Wed May 30, 2007 3:41 am
by Dakapo
Realy nobody that knows something about this problem?

Does it work fine on all other servers but mine or does nobody use SpamAssassin to fight against Spam? :(

Posted: Wed May 30, 2007 4:30 pm
by dougp23
Sorry for my delay in getting back to you. I have it working just fine on my server, but my maillog always says things like "still running as root, dropping back to nobody", but that's fine, I just need to adjust a file somewhere so spamd doesn't run as root.

Here's what I would do, and I don't know if Debian uses Sys V init scripts or not, so adjust for your flavor.

/etc/init.d/spamassassin stop (stop the service if it is running) does it stop successfully without errors?
/etc/init.d/spamass-milter stop (same check as above)

/etc/init.d/spamassassin start (look for failure or errors)
/etc/init.d/spamass-milter start (same, look for failure or errors)

If I recall, I could see that spamass-milter.sock was either in the wrong directory or didn't exist, so if the milter can't be started, then sendmail can't scan the messages.

Let me know how you make out, I'm usually better than this in watching and replying in the forums!!! :oops:

Posted: Thu May 31, 2007 5:56 am
by Dakapo
Hey dougp!

Thank you very much for your reply! The tipp with spamass-milter could help me.
I just checked the spamassassin-configuration till yet.

Can you tell me where the spamass-milter-socket is configured?

My standard-spamass-milter-configuration seems to be very empty:

Code: Select all

# spamass-milt startup defaults

# OPTIONS are passed directly to spamass-milter.
# man spamass-milter for details

# Default, use the nobody user as the default user, ignore messages
# from localhost
OPTIONS="-u nobody -i 127.0.0.1"

# Reject emails with spamassassin scores > 15.
#OPTIONS="-r 15"

# Do not modify Subject:, Content-Type: or body.
#OPTIONS="-m"

Posted: Thu May 31, 2007 7:54 am
by Dakapo
I did insert the Socket-Information into my spamass-milter.conf like you showed it at the beginning of this thread.

But I still get no errors on start and when I receive a new mail nothing happens with SpamAssassin.

Here is my mail.log after starting SpamAssassin and Spam-Milter:

Code: Select all

May 31 13:47:18 localhost spamass-milter[3808]: spamass-milter 0.3.1 starting
May 31 13:47:28 localhost spamd[3812]: logger: removing stderr method
May 31 13:47:30 localhost spamd[3814]: rules: meta test DIGEST_MULTIPLE has undefined dependency 'DCC_CHECK'
May 31 13:47:30 localhost spamd[3814]: spamd: server started on port 783/tcp (running version 3.1.7-deb)
May 31 13:47:30 localhost spamd[3814]: spamd: server pid: 3814
May 31 13:47:30 localhost spamd[3814]: spamd: server successfully spawned child process, pid 3816
May 31 13:47:30 localhost spamd[3814]: spamd: server successfully spawned child process, pid 3817
May 31 13:47:30 localhost spamd[3814]: prefork: child states: IS
May 31 13:47:30 localhost spamd[3814]: prefork: child states: II

Posted: Thu May 31, 2007 8:25 am
by dougp23
Check for another spamass-milter config file, usually /etc/sysconfig/spamass-milter. (My config file there points out that the sock file should be at /var/run/spamass.sock)

Also, do a

ps aux | grep spamass

make sure spamass-milter is running. Sounds like spamd (the spamassassin daemon is running but without milter, sendmail won't be able to intercept the message).

Posted: Thu May 31, 2007 10:46 am
by Dakapo
Ok, Debian has the Socket-Value in /etc/init.d/spamass-milter

I made a ps aux and spamass-milter is running:

Code: Select all

scalix:~# ps aux | grep spamass
root      3851  0.0  0.1  11104  1124 ?        Ss   13:53   0:00 /usr/sbin/spamass-milter -P /var/run/spamass.pid -f -p /var/run/sendmail/spamass.sock -u nobody -i 127.0.0.1
root      3852  0.0  0.1  11104  1124 ?        S    13:53   0:00 /usr/sbin/spamass-milter -P /var/run/spamass.pid -f -p /var/run/sendmail/spamass.sock -u nobody -i 127.0.0.1
root      3853  0.0  0.1  11104  1124 ?        S    13:53   0:00 /usr/sbin/spamass-milter -P /var/run/spamass.pid -f -p /var/run/sendmail/spamass.sock -u nobody -i 127.0.0.1
root      4904  0.0  0.0   3776   708 pts/0    R+   16:40   0:00 grep spamass


It seems like the problem has to be somewhere else. But where should I search? I get no errors :(

Posted: Thu May 31, 2007 1:21 pm
by dougp23
Hmmm....mine looks like this:

root 20837 0.0 0.0 45004 896 ? Ssl May08 1:48 spamass-milter -p /var/run/spamass.sock -f -r 50 -b spamhouse@mydomain.com

The one thing I don't like about yours is the -i flag. -i tells spamass-milter to IGNORE mail originating with this IP, so you are in effect, telling spamass-milter to ignore any message that originates on your scalix box (which would be all of them). Remove the -i 127.0.0.1 setting in your config file and see if it's better.

Posted: Thu May 31, 2007 1:35 pm
by Dakapo
Perfect!!!!!!!!!!
Thank you very much. The -i Option was the problem. Now Spamassassin is scanning and I can continue with configuring it :)

I'll see how many of about my 100 morning-spam-mails will be registrated tomorrow :)

Posted: Thu May 31, 2007 2:47 pm
by dougp23
Great! Happy I was able to help!

Do a man on spamass-milter, it's a pretty neat little script. I invoke the -b option, so all marked spam is sent to a separate account, so my users never have to see it. I don't think I've seen a false positive yet!

Good luck!