Page 1 of 1

Spamassassin error state

Posted: Thu Aug 10, 2006 11:31 am
by MGonz
Hi,
I just installed spam assassin and followed the technotes on configuring it. The only thing is that when i send mail and look at the log it says the the spamassassin milter is in an error state. Any ideas?

Code: Select all

Aug 10 09:20:24 mail_serv sendmail[5021]: k7AFKOhw005021: Milter (spamassassin): local socket name /var/run/spamass.sock unsafe
Aug 10 09:20:24 mail_serv sendmail[5021]: k7AFKOhw005021: Milter (spamassassin): to error state
Aug 10 09:20:24 mail_serv sendmail[5021]: k7AFKOhw005021: from=Me.Last@ourdomain.com, size=0, class=0, nrcpts=1, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 10 09:20:24 mail_serv sendmail[5025]: k7AFKOZ4005025: from=<Me.Last@ourdomain.com>, size=4531, class=0, nrcpts=1, msgid=<23307040.1155223224324.JavaMail.root@mail_serv.ourdomain.com>, proto=ESMTP, relay=root@localhost
Aug 10 09:20:24 mail_serv sendmail[5026]: k7AFKO6s005026: Milter (spamassassin): local socket name /var/run/spamass.sock unsafe
Aug 10 09:20:24 mail_serv sendmail[5026]: k7AFKO6s005026: Milter (spamassassin): to error state
Aug 10 09:20:24 mail_serv sendmail[5026]: k7AFKO6s005026: from=<Me.Last@ourdomain.com>, size=4727, class=0, nrcpts=1, msgid=<23307040.1155223224324.JavaMail.root@mail_serv.ourdomain.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 10 09:20:24 mail_serv sendmail[5025]: k7AFKOZ4005025: to=<Me.Last@ourdomain.com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=34531, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k7AFKO6s005026 Message accepted for delivery)
Aug 10 09:20:24 mail_serv sendmail[5050]: k7AFKO6s005026: to=<Me.Last@ourdomain.com>, delay=00:00:00, xdelay=00:00:00, mailer=scalix, pri=124727, relay=mail_serv, dsn=2.0.0, stat=Sent (Ok)
Aug 10 09:20:24 mail_serv sendmail[5097]: k7AFKOV4005097: from=<Me.Last@ourdomain.com>, size=4512, class=0, nrcpts=1, msgid=<23307040.1155223224324.JavaMail.root@mail_serv.ourdomain.com>, proto=ESMTP, relay=root@localhost
Aug 10 09:20:24 mail_serv sendmail[5116]: k7AFKOSj005116: Milter (spamassassin): local socket name /var/run/spamass.sock unsafe
Aug 10 09:20:24 mail_serv sendmail[5116]: k7AFKOSj005116: Milter (spamassassin): to error state
Aug 10 09:20:24 mail_serv sendmail[5116]: k7AFKOSj005116: from=<Me.Last@ourdomain.com>, size=4696, class=0, nrcpts=1, msgid=<23307040.1155223224324.JavaMail.root@mail_serv.ourdomain.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 10 09:20:24 mail_serv sendmail[5097]: k7AFKOV4005097: to=<Me@outsidedomain.com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=34512, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k7AFKOSj005116 Message accepted for delivery)
Aug 10 09:20:39 mail_serv sendmail[5156]: k7AFKOSj005116: to=<Me@outsidedomain.com>, delay=00:00:15, xdelay=00:00:15, mailer=esmtp, pri=124696, relay=outside.mail.server.com. [1.2.3.4], dsn=2.0.0, stat=Sent (ok:  Message 1731461041 accepted)

Posted: Thu Aug 10, 2006 2:51 pm
by btisdall
This is error is usually because the 'SOCKET' value in /etc/sysconfig/spamass-milter doesn't match what's in the sendmail config.

Posted: Thu Aug 10, 2006 3:11 pm
by MGonz
Thank you for your quick reply.

Hmm. So how would I fix it? I looked for that config file and it wasn't in that location.

Posted: Thu Aug 10, 2006 4:16 pm
by btisdall
Some ideas:

It might be set directly in the init script (somewhere in /etc/init.d).

If you're on an rpm-based system then this will give you a listing of the config files installed by <package>:

Code: Select all

rpm -qc <package>


You could do this:

Code: Select all

grep -ir 'spam.*\.sock' /etc


Or if all else fails this :-)

Code: Select all

man spamass-milter

Posted: Mon Aug 14, 2006 3:36 pm
by MGonz
Ok, I looked in both the start up files for spamassassin and sendmail.cf and it seems like both have the socket pointing to /var/run/spamass.sock
It is still erroring out on me. Any more ideas?
Thank ahead of time.

Posted: Mon Aug 14, 2006 6:56 pm
by MGonz
Ok, I got it out of the error state, but evertime i restart the server i have to type

spamass-milter -p /var/run/spamass.sock -f

to get it up. I tried changing the startup script for it, but I still can't get it to start up at boot. Any ideas?

Posted: Mon Aug 14, 2006 8:28 pm
by ScalixSupport
I suspect your spamass-milter is not configured to start on boot. Edit /etc/init.d/spamass-milter and add the variables you require to this section:

Code: Select all

### Default variables
SOCKET="/var/run/spamass.sock"
EXTRA_FLAGS="-m -r 20"
SYSCONFIG="/etc/sysconfig/spamass-milter"


Then configure the script to start on boot with:

chkconfig --level 35 spamass-milter on

To check it use:

chkconfig --list spamass-milter

Also make sure your spamassassin script is configured to start on boot.

Regards,
Don

Posted: Tue Aug 15, 2006 11:36 am
by MGonz
The spamass-milter is set up to start on boot. The error that i keep getting is that

Aug 15 09:33:02 mail sendmail[4233]: k7FFX2q4004233: Milter (spamassassin): local socket name /var/run/spamass.sock unsafe
Aug 15 09:33:02 mail sendmail[4233]: k7FFX2q4004233: Milter (spamassassin): to error state

Both spamass-milter and spamassassin are set to boot.

Posted: Tue Aug 15, 2006 1:27 pm
by ScalixSupport
A little googling goes a long way...

http://www.google.com/search?hl=en&q=Mi ... gle+Search

This may be of most use to you...

http://comments.gmane.org/gmane.mail.sp ... eral/54594

Regards,
Don

Posted: Sun Sep 24, 2006 5:45 pm
by dvichas
the configuring spammassassin guide is wrong for FC4

the location to the spamass-milter socket file should be

/var/run/spamass-milter/spamass-milter.sock

Posted: Mon Feb 18, 2008 2:30 pm
by Ruthiness
All - I just had a problem with the spamass-milter socket and found that somehow, the /etc/init.d/spamass-milter was creating a socket with a different name from the one specified in /etc/mail.sendmail.cf.

Here is what I learned from this and fixed:

SpamAssassin - fixing errors with socket

Startup script is /etc/init.d/spamass-milter

In that file it specifies creation of a socket at (hopefully) /var/run/spamass-milter/spamass-milter.sock

In /etc/sendmail.cf should be a line looking for the above socket. The paths and socket names should match.

You can also navigate to the path given and see the sockets there and the dates created.

If they don't match, fix the spamass-milter startup script first to match what is in sendmail.cf, then make sure the paths match with /etc/sendmail.cf and then restart
SpamAssassin and sendmail as follows:

/etc/init.d/spamassassin restart
/etc/init.d/spamass-milter restart
/etc/init.d/sendmail restart

If they don't match you may see the following error in /var/log/maillog:

Feb 18 12:52:03 mailpa sendmail[23268]: m1IHq3xq023268: Milter (spamassassin): error connecting to filter: Connection refused by /var/run/spamass-milter/spamass-milter.sock
Feb 18 12:52:03 mailpa sendmail[23268]: m1IHq3xq023268: Milter (spamassassin): to error state

You can easily see the health of spamassassin with the following command:

tail -f /var/log/maillog | grep spam

My OS is Linux Redhat EL4

Posted: Mon Feb 18, 2008 5:37 pm
by les
Ruthiness wrote:All - I just had a problem with the spamass-milter socket and found that somehow, the /etc/init.d/spamass-milter was creating a socket with a different name from the one specified in /etc/mail.sendmail.cf.

Here is what I learned from this and fixed:

SpamAssassin - fixing errors with socket

Startup script is /etc/init.d/spamass-milter

In that file it specifies creation of a socket at (hopefully) /var/run/spamass-milter/spamass-milter.sock

In /etc/sendmail.cf should be a line looking for the above socket. The paths and socket names should match.

You can also navigate to the path given and see the sockets there and the dates created.

If they don't match, fix the spamass-milter startup script first to match what is in sendmail.cf, then make sure the paths match with /etc/sendmail.cf and then restart
SpamAssassin and sendmail as follows:

/etc/init.d/spamassassin restart
/etc/init.d/spamass-milter restart
/etc/init.d/sendmail restart

If they don't match you may see the following error in /var/log/maillog:

Feb 18 12:52:03 mailpa sendmail[23268]: m1IHq3xq023268: Milter (spamassassin): error connecting to filter: Connection refused by /var/run/spamass-milter/spamass-milter.sock
Feb 18 12:52:03 mailpa sendmail[23268]: m1IHq3xq023268: Milter (spamassassin): to error state

You can easily see the health of spamassassin with the following command:

tail -f /var/log/maillog | grep spam

My OS is Linux Redhat EL4


Its actually better to set the socket via /etc/sysconfig/spamass-milter

That way when you next upgrade spamass-milter it wont blow away your change to the init script.

And its possible to set the socket to a file and location of your choice.