Re: [exim] limiting attempts made by transports

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Phil Pennock
Datum:  
To: Oliver Howe
CC: exim-users
Betreff: Re: [exim] limiting attempts made by transports
On 2012-10-08 at 10:34 +0100, Oliver Howe wrote:
> Is it possible to limit the number of attempts a transport (with
> driver=pipe to an external command) makes? For example , if I have one
> that is temporarily failing for a certain message but not others (with
> error code 75) , is it possible to fail over to a different transport
> if this one fails, say 10 times, for this particular message?


There's no count kept of number of delivery attempts, only
"first_delivery" vs "not".

You can do it based on _time_, using a calculation based on:
${eval10:$tod_epoch - $received_time}

You'd have two routers, the first using the pipe transport you want to
protect, the second not; look at your retry rules and queue-runner
interval, decide how long N retries should take, then add to the first
router:

condition = ${if <{${eval10:$tod_epoch - $received_time}}{3600}}

to limit the first router to only being used for the first hour.

This falls down if the queue runners aren't active, etc.

-Phil