Re: [Exim] spam assassin router - check if spamd is running…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Dennis Davis
Datum:  
To: Will Prater - quattro
CC: exim-users
Betreff: Re: [Exim] spam assassin router - check if spamd is running?
>From: Will Prater - quattro <datafirm@???>
>To: exim-users@???
>Subject: [Exim] spam assassin router - check if spamd is running?
>Sender: exim-users-admin@???
>Date: Fri, 29 Nov 2002 00:54:09 -0800
>
>I have set up my spam assassin router and transports, they are
>working great, but I am a bit worried if spamd goes down, then
>Exim starts to queue messages as the spam router cannot connect to
>spamd. How have you guys delt with this situation?


...

This is a problem that isn't just peculiar to mail systems. Many
services are in some sense "essential" and are required to be up and
running all the time. For example there's Kerberos servers, DHCP
servers etc. If you're suspicious and have snort running on your
machine, you want it running all the time.

Daemons can often be run in the foreground. Certainly spamd can if
you omit the daemonize argument. I'm a fan of installing Dan Bernstein's
daemontools package from:

http://cr.yp.to/daemontools.html

To quote from the above page:

supervise monitors a service. It starts the service and restarts
the service if it dies. Setting up a new service is easy: all
supervise needs is a directory with a run script that runs the
service.

and the above is exactly what you require. The run script I use for
spamd looks like:


#!/bin/sh

# Script to fire up SpamAssassin's spam daemon (spamd). We'll run
# this as the mail user (mmdf).
# DHD September 2002

spamd=/usr/local/bin/spamd

user=mmdf

spamd_args="-x -L -u $user"

exec $spamd $spamd_args


(The mail user is "mmdf" rather than "exim" as I'm running the MMDF
mail system on the machine as well as exim...don't ask...)