https://bugs.exim.org/show_bug.cgi?id=3148
Bug ID: 3148
Summary: Processing a retry can discard email as previously
delivered that was not
Product: Exim
Version: 4.98.2
Hardware: x86
OS: Linux
Status: NEW
Severity: bug
Priority: medium
Component: Routing
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
When an email is retried, each redirect router is checked in turn for hints and
delivery. This processes differently than a first run delivery. In some
scenarios, exim will discard an email as being previously delivered when it was
not.
Our layout is a redirect router that does a lookup in a file for virtual
domains. It is possible for the result to come back as '%1'. In first delivery,
this is reprocessed through another redirect router that translates the %1 into
the parent_local_part. Duplication is handled after the final rewrite.
If multiple addresses resolve as %1, then on a retry, we see:
opened hints database /var/spool/exim/db/retry: flags=O_RDONLY
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering: %[email protected]
unique = %[email protected]
%[email protected] was previously delivered: discarded
[email protected]: children all complete
EXIM_DBCLOSE(0x557328d0c010)
closed hints database and lockfile
I should note that it isn't actually checking it against the db file according
to exim_dumpdb but using the information from the queue files.
The workaround is to set one_time = true in the redirect router that rewrites
%1 to a unique address so that the retry will not see the %1 address.
With one_time, the queue changes to:
D [email protected]
D [email protected]
[email protected]
Here is how the addresses are processed. You can see where it gets confused
easily here. As long as we don't hit retry, delivery is fine. I had a tls
failure on my smarthost and expected it to just stick in queue but it vanished
is how I noticed it.
R: local_user for [email protected]
[email protected]
<-- %[email protected]
<-- [email protected]
router = lmtpuser, transport = dovecot_lmtp
[email protected]
<-- [email protected]
<-- %[email protected]
<-- [email protected]
router = smarthost, transport = smarthost_smtp
host mail.example.net [192.168.0.2]
--
You are receiving this mail because:
You are on the CC list for the bug.
--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/