Mailing List Archive

[Bug 2408] Exim 4.92 generating spurious "Delay reason:" for delayed messages
https://bugs.exim.org/show_bug.cgi?id=2408

--- Comment #1 from Jeremy Harris <jgh146exb@wizmail.org> ---
> lookup of host "ms1.ad.csx.cam.ac.uk" failed in internal_redirect_two router

Do you have a router named "internal_redirect_two" in your configuration?

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2408] Exim 4.92 generating spurious "Delay reason:" for delayed messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2408

--- Comment #2 from David Carter <dpc22@cam.ac.uk> ---
(In reply to Jeremy Harris from comment #1)
> > lookup of host "ms1.ad.csx.cam.ac.uk" failed in internal_redirect_two router
>
> Do you have a router named "internal_redirect_two" in your configuration?

Yes, and it appears to be working correctly for other email addresses where the
target domain is correct.

Probably way more detail than you want or need right now:

uis.cam.ac.uk is effectively a large alias file, but the expansions can contain
tokens which redirect email onto other hosts without exposing the internal
names.

For example:

lapwing:lapwing@ad.cam.internal-redirect

Relevant clauses from our Exim configure file, which relate to these
"internal_redirect" tokens:

DB = /opt/exim-4.92-0.el7/etc/db
domainlist internal_redirect = cdb;DB/internal_redirect.cdb

# The following router expands addresses which are then processed by
# internal_redirect_one and internal_redirect_two:
virtual_aliases:
driver = redirect
domains = +virtual_domains
local_parts = cdb;DOMAINS/db/${domain}.cdb # Includes
uis.cam.ac.uk
address_data = internal=yes
data = $local_part_data
forbid_blackhole
forbid_file
forbid_include
forbid_pipe
check_ancestor

# Verify addresses later processed by internal_redirect_two router
# (inout => after internal_redirect_one has expanded MMD internal_redirects)
internal_redirect_one:
driver = redirect
domains = +internal_redirect
condition = ${extract {internal}{$address_data} }
data = ${quote_local_part:$local_part}@${extract
{domain}{$domain_data} }
address_data = $domain_data inout=yes

# Second stage: route to external host.

internal_redirect_two:
driver = manualroute
condition = ${extract {inout}{$address_data} }
route_data = ${extract {target}{$address_data} } bydns
host_find_failed = defer
self = fail
transport = smtp

where /opt/exim-4.92-0.el7/etc/db/internal_redirect.cdb contains:

ad.cam.internal-redirect domain=uis.cam.ac.uk target=ms1.ad.csx.cam.ac.uk
uis-admin.internal-redirect domain=uis.cam.ac.uk
target=mailgate.admin.cam.ac.uk

the key/value pairs stored in that file haven't changed:

$ md5sum /opt/exim-4.91-0.el7/etc/db/internal_redirect.cdb
/opt/exim-4.92-0.el7/etc/db/internal_redirect.cdb
27ccf5bbd7ad7936971fcd6d83419236
/opt/exim-4.91-0.el7/etc/db/internal_redirect.cdb
27ccf5bbd7ad7936971fcd6d83419236
/opt/exim-4.92-0.el7/etc/db/internal_redirect.cdb

(all installed by Ansible).

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2408] Exim 4.92 generating spurious "Delay reason:" for delayed messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2408

--- Comment #3 from Jeremy Harris <jgh146exb@wizmail.org> ---
> correspond to a different @uis.cam.ac.uk email address, which is
> indeed broken as it expands to a hostname which has now disappeared.

Would this different address have been involved in the expansion of the
original that ended up with the delay-warning DSN?
I'm trying to guess if the message could have been generated, left lying
around,
and picked up and used incorrectly by the later processing.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2408] Exim 4.92 generating spurious "Delay reason:" for delayed messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2408

--- Comment #4 from David Carter <dpc22@cam.ac.uk> ---
(In reply to Jeremy Harris from comment #3)
> > correspond to a different @uis.cam.ac.uk email address, which is
> > indeed broken as it expands to a hostname which has now disappeared.
>
> Would this different address have been involved in the expansion of the
> original that ended up with the delay-warning DSN?
> I'm trying to guess if the message could have been generated, left lying
> around,
> and picked up and used incorrectly by the later processing.

I don't believe so.

"csirt@uis.cam.ac.uk" has always expanded to the same set of six people

None of these people were ever associated with or used ms1.ad.csx.cam.ac.uk

I do have a collection of messages stuck on each of our mail hubs because the
hostname ms1.ad.csx.cam.ac.uk no longer exists.

However these are all addressed to another person (who left the University a
couple of years back, and we clearly failed to clean up correctly).

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2408] Exim 4.92 generating spurious "Delay reason:" for delayed messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2408

--- Comment #5 from Jeremy Harris <jgh146exb@wizmail.org> ---
Baffled. Would it be possible to engineer the quota situation for test
purposes? I'd love to see a full debug run for the six-way expansion case of
source mail. Or, instrument that one address to enable targeted debug:

ACL, early in rcpt:

warn domains = uis.cam.ac.uk
local_parts = csirt
control = debug/tag=.csirt/opts=+all

... sit back and wait for the next one. Debug goes to file in the logdir.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2408] Exim 4.92 generating spurious "Delay reason:" for delayed messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2408

--- Comment #6 from David Carter <dpc22@cam.ac.uk> ---
(In reply to Jeremy Harris from comment #5)
> Baffled. Would it be possible to engineer the quota situation for test
> purposes? I'd love to see a full debug run for the six-way expansion case of
> source mail. Or, instrument that one address to enable targeted debug:
>
> ACL, early in rcpt:
>
> warn domains = uis.cam.ac.uk
> local_parts = csirt
> control = debug/tag=.csirt/opts=+all
>
> ... sit back and wait for the next one. Debug goes to file in the logdir.

The individual with the quota problems has (rather unsportingly) cleared out
some space, so I don't have any stuck messages to play with any more.

I will see if I can engineer the same effect on a test system.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2408] Exim 4.92 generating spurious "Delay reason:" for delayed messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2408

--- Comment #7 from David Carter <dpc22@cam.ac.uk> ---
(In reply to Jeremy Harris from comment #5)
> Baffled. Would it be possible to engineer the quota situation for test
> purposes? I'd love to see a full debug run for the six-way expansion case of
> source mail.

I can send you the output of:

/opt/exim/bin/exim -d+all -bt csirt@uis.cam.ac.uk

if that is what you are after here.

I'd rather not attach this directly to this bug report as there is some
personal data (email addresses and the like).

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2408] Exim 4.92 generating spurious "Delay reason:" for delayed messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2408

--- Comment #8 from David Carter <dpc22@cam.ac.uk> ---
I can reproduce the effect on a test system.

I think that it must in some way related to:

$ /opt/exim/bin/exim_dumpdb /spool/exim retry

R:XXXX@hermes.cam.ac.uk -44 13377 H=cyrus-7a-intramail.csi.cam.ac.uk
[192.168.128.7]: SMTP error from remote mail server after RCPT TO:
<XXX@hermes.cam.ac.uk>: 452 4.2.2 Over quota

14-Jun-2019 18:09:14 14-Jun-2019 19:17:18 14-Jun-2019 19:32:18

R:uis.cam.ac.uk -32 0 lookup of host "ms1.ad.csx.cam.ac.uk" failed in
internal_redirect_two router

14-Jun-2019 19:17:18 14-Jun-2019 19:17:18 14-Jun-2019 19:47:18

The retry database only contains two entries in total.

The delay_warning message picks the wrong one of the two.

I note that one of these is for:

R:uis.cam.ac.uk.

which would appear to be some form of wildcard entry. The other is for:

R:XXXX@hermes.cam.ac.uk

which is used by one of the six target addresses for "csirt@uis.cam.ac.uk".

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##