PDA

View Full Version : newbie question re spam filters



locateMe
06-25-2004, 03:10 AM
Some time ago I installed the spam killer into Exim but I just noticed that I get the following error message in maillog

Jun 13 04:06:28 server spamc[1442]: connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#1 of 3): Connection refused

Can anyone point me in the right direction please as to what to check?

Thanks

DirectAdmin Support
06-25-2004, 12:46 PM
Is spamd running?

ps -ax | grep spamd

If not, start it:

spamd -d

If it is, then check if you can telnet to it:

telnet 127.0.0.1 783

If not, then you have a firewall blocking it.

John

locateMe
06-26-2004, 03:41 AM
That's what it was - spamd wasn't running so I started it as you suggested and it seems fine.

How do I ensure that spamd starts after a reboot which I assume is why it was not running?

Many thanks

Steve

DirectAdmin Support
06-26-2004, 01:06 PM
Edit /etc/init.d/exim and make the start section look like this:


...
start)
# Start daemons.
echo -n "Starting exim: "
/usr/sbin/exim $EXIM_OPTS -oP /var/run/exim.pid
echo
touch /var/lock/subsys/exim

if [ -e /usr/bin/spamd ]; then /usr/bin/spamd -d -a -c -m 5 1>/dev/null 2>/dev/null; fi

;;
...
John

nobaloney
06-26-2004, 01:15 PM
Fwiw, John,

Our RHL 7.3 installations have their own /etc/rc.d/init.d/spamd file.

I don't know why/how it got installed that way, but perhaps before adding your code snippet admins should look for /etc/rc.d/init.d/spamd, and if they have it, check their /etc/rc.d/rc3.d for an *spamd link, and if they don't have one, add one, or if they have one beginning with "K" to rename it so it begins with "S".

Jeff

locateMe
06-26-2004, 02:00 PM
OK - me very confused :)

I did what was suggested by adding the code snippet but got confused by the last comment - I don't have a spamd in etc/rc.d/init.d with or without a k
So do I need one?

I edited etc/init.d/exim as suggested and when I did a manual start of spamd it worked so I guess that it knows where it is.

Steve

nobaloney
06-26-2004, 02:41 PM
Don't get confused...

I just pointed out that some users might have spamd included as a separate daemon in their init.d directory as I did.

Since you didn't, you don't have to do anything, and John's fix should work fine for you.

To make sure you can stop spamd, and then try (as root):

service exim restart

and see if spamd has restarted. If it does, then it will come up automatically whenever exim does.

Jeff

locateMe
06-26-2004, 02:59 PM
It works but what do the extra parameters mean - I normally only had spamd -d but I now have

/usr/bin/spamd -d -a -c -m 5

Is that correct?

Thanks (again)

nobaloney
06-26-2004, 03:32 PM
I have the same as you.

Read "man spamd" to see what the parameters do.

Jeff