Re: [exim] Failover if spamd fails

Página Inicial
Delete this message
Reply to this message
Autor: Brian
Data:  
Para: Marc Perkel
CC: Exim users list
Assunto: Re: [exim] Failover if spamd fails
Marc Perkel wrote:
> Here's what I want to do. I have several spam filtering servers and
> every now and then spamd dies. And that causes the messages to queue up
> until I fix it. Is there a way to pass the message on to another
> router/transport if the transport fails?
>
> What I want to do is if spamd dies and the transport returns an error -
> hand it off to another computer.
>

I use a package called daemontools to control my spamassassin and clamd.

A few months ago I had a problem w/ SA and Clamd stopping for strange
reasons on various boxes.

(this box was up for 250+ days) I added more ram over the weekend..

svstat /var/service/*
/var/service/dnscache: up (pid 619) 174571 seconds
/var/service/mysql: up (pid 620) 174571 seconds
/var/service/clamd: up (pid 616) 174571 seconds
/var/service/spmaassassin: up (pid 615) 174571 seconds
/var/service/spamd: up (pid 612) 174571 seconds
/var/service/lighttpd: up (pid 621) 174571 seconds

  cat -n spmaassassin/run
      1  #!/bin/sh
      2  exec /usr/local/bin/spamd -x -u spamd -H /home/spamd 
--socketpath=/var/run/spamd -m 2


clamd needs one or two options set in the clamd.conf but.

  cat -n clamd/run
      1  #!/bin/sh
      2  exec 2>&1
      3  rm -f /var/run/clamav/clamd
      4  exec setuidgid root /usr/local/sbin/clamd


Again these things work for me and my situation, ymmmv and this might
not work for you. But it works great for me.

I don't have exim in daemontools b/c it never stopped on my for any
reason w/o me stopping it. ;)

This is a FreeBSD 5.3 machine fwiw.

[/var/service]# 10 > grep -c connection\ from /var/log/exim/mainlog
87220
[/var/service]# 11 > grep Mar\ 14 /var/log/clamav/clamd.log | grep -c FOUND
22
[/var/service]# 12 > grep -c got\ connection /var/log/maillog
962
[/var/service]# 13 > grep -c identified\ spam /var/log/maillog
386
[/var/service]# 14 > date
Mon Mar 14 08:47:07 EST 2005

- Brian