Re: [exim] Sending out the mail from different transport if …

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Ian Eiloart
Datum:  
To: soumya tr
CC: <exim-users@exim.org>
Betreff: Re: [exim] Sending out the mail from different transport if there exist error at a particular transport
On 1 Mar 2013, at 10:03, soumya tr <soumya.324@???> wrote:
>
>
>
> Is there any way I can send the mail via another transport if the above [bsmtp pipe]
> given transport gives an error.


You could use freeze_exec_fail to freeze the messages in the mail queue, then look there for failed messages. Or, write a script to periodically scan the queue for the frozen messages, add another recipient, and unfreeze them. Something along the lines of

# add alternate recipient to frozen message with
exiqgrep -r <rcpt address pattern> -z -i | xargs -n1 exim -Mar <new recipient address>
# remove original recipient address from message
exiqgrep -r <new rcpt address> -z -i | xargs -n1 exim -Mmd <rcpt address>
# deliver the message
exiqgrep -r <new rcpt address> -z -i | xargs exim -Mff

You might have to do something a bit different if the recipient address isn't a single address. Like just use exim -Mrm to delete the message.

Or, use temp_errors to to prevent message bounce. The messages will be retried.

--
Ian Eiloart
Postmaster, University of Sussex
+44 (0) 1273 87-3148