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

Pàgina inicial
Delete this message
Reply to this message
Autor: Ian Eiloart
Data:  
A: soumya tr
CC: <exim-users@exim.org>
Assumpte: 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