Re: [exim] Exim discards email to unreachable smarthost with…

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim-users
Subject: Re: [exim] Exim discards email to unreachable smarthost with no DSN
On 20/09/16 21:00, Simon Arlott wrote:
> I'm using Exim 4.86.2-2ubuntu2 and it has some unusual behaviour when
> the configured smarthost is unreachable for several hours.
>
> I've managed to capture the email submission and the queue run for an
> email that was discarded as if it was delivered when no delivery had
> succeeded, and no DSN was generated.
>
> See the attached files:
> "krull-example-com.simon@??? was previously delivered: discarded"


That sure is some convoluted routing, and badly inefficient.

- the batv-add router runs three times in total, and every time
(since it generates an errors-to) it does a verify (of that errors
address) which is in itself a full routing run

- the routing sequence goes

root@???
(oof_add)         root@???
(batv_add)        root@???
(system_aliases)  sa@???
(batv_add)        sa@???
(system_aliases)  krull-example-com.simon@???
(batv_add)        krull-example-com.simon@???
(smarthost)       -> tsort.example.com


----

I think what has happened here is thanks to the batv_add
router being a redirect which returns its original,
combined with somewhere along the chain being a
one-time redirect. The one-time implementation marks
the parent address as delivered, and adds a child
address as undelivered. Here, they are textually the
same. Then, on the later attempt to deliver, we
discover that the address has already been delivered.

It's certainly a bug - but I do wonder whether you
should be doing the errors_to manipulation
once only, and possibly in the final router that
calls a transport (smarthost, for this case)
rather than an an identity-redirect.

Please do raise a bug at bugs.exim.org - but don't
expect a quick fix.
--
Cheers,
Jeremy