RE: [Exim] acl_smtp_predata

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Tony Finch
Data:  
Para: Jan-Peter Koopmann
CC: exim-users
Asunto: RE: [Exim] acl_smtp_predata
On Thu, 15 Jul 2004, Jan-Peter Koopmann wrote:
>
> > (3) One of the tests we do in the RCPT ACL is to check if
> > MailScanner is keeping up with the load and defer if it
> > isn't. It'd be better to do this once at predata time.
>
> How exactly are you checking this? Just curios.


For background info: MailScanner works with an altered MTA configuration
in which incoming messages are placed in one queue, and queue runners and
delivery processes work from another queue. MailScanner moves the messages
from the first to the second after scanning -- it knows about the MTA's
queue format.

To support this my Exim configuration includes the following lines which
allow the spool directory to be overridden on the command line:

SPOOL            = /spool/exim
spool_directory        = SPOOL


Our Exim start script starts the listening daemons in queue-only mode
using the incoming spool, and a queue-running daemon using the standard
spool.

SPOOL="/spool/exim"
PIDFILE="$SPOOL/exim-daemon.tls.pid"
exim -bd -odq -tls-on-connect -oX 465 -oP $PIDFILE -DSPOOL=$SPOOL.in

PIDFILE="$SPOOL/exim-daemon.in.pid"
exim -bd -odq -oX 25:587 -oP $PIDFILE -DSPOOL=$SPOOL.in

PIDFILE="$SPOOL/exim-daemon.pid"
exim -q5m -oP $PIDFILE

The RCPT ACL includes this clause right at the end just before we finally
agree that we'll accept the address (to minimise the load imposed by junk
mail):

  defer message   = Sorry, too busy. Try again later.
        condition = ${run {/opt/exim/sbin/exim_incount} \
                          {${if >{$value}{300} {yes} {no} }} {no} }


The exim_incount script just counts the incoming queue:

exim -bpc -DSPOOL=/spool/exim.in

There's one tricky thing to note: why is there a separate exim_incount
script instead of just getting Exim to run itself directly? The problem is
that the SPOOL macro definition in the command line gets expanded to
produce a bogus command "exim -bpc -D/spool/exim.in=/spool/exim.in".

Tony.
--
f.a.n.finch <dot@???> http://dotat.at/
RATTRAY HEAD TO BERWICK ON TWEED: WEST BACKING SOUTHWEST 3 OR 4 THEN VEERING
WEST 3 OR 4 AGAIN. A FEW SHOWERS. MAINLY GOOD. MAINLY SLIGHT.