[exim] Re: Errors in transport filters

Pàgina inicial
Delete this message
Reply to this message
Autor: Felix Schwarz
Data:  
A: exim-users
Assumpte: [exim] Re: Errors in transport filters
Kjetil Torgrim Homme wrote:
> well, that's what your configuration asks for, isn't it? any non-zero
> exit code is a temporary error which means Exim will retry delivery
> later. if your script sends the e-mail even it returns a non-zero code,
> you'll need to change temp_errors to be more specific, or just remove
> the line.


My script does not send any mails. It is just a filter that changes a
mail in certain way. After that the output (RFC 822 email) should be
handed over to Exim again. Exim will handle the actual delivery.

What Exim does is: It takes the mail, calls the transport filter script.
This script will return a non-zero exit code and (as a savety measure)
will return the original email without any changes. Exim will take that
mail and deliver it. *Additionally* the original mail will stay in the
queue and the queue runner will try to deliver it on the next run.

Mostly the transport filter will fail again because a database is down
and manual intervention by a human operator is needed (our transport
filter script will notify an administrator). The problem is that Exim
duplicates the mail on every queue run that means within one hour there
are 12 duplicate mails!

My problem is not about (at least I like to think that) my script not
being idempotent.

Thanks for your help, if I left out any question please do not hesitate
to ask again.

fs