https://bugs.exim.org/show_bug.cgi?id=1788
--- Comment #33 from Alex Presland <exim@???> ---
I've not done any more testing for this. This email is an attempt at detailing
everything that causes this issue.
1) An email is passed to the server. From: alex@???. To:
alex@???, alex.test@???
2) Exim finds testdomain.org.uk in /etc/mail/domains
3) Exim uses the domain alias file /etc/mail/testdomain.org.uk to work out what
to do with the incoming emails
4) The email address alex@??? is routed to the spamcatcher2
account by the following line in /etc/mail/testdomain.org.uk:
alex: spamcatcher2
5) The email address alex.test@??? is also routed to the
spamcatcher2 account by the following line in /etc/mail/testdomain.org.uk:
alex.test: spamcatcher2
6) The spamcatcher2 account processes the email to alex@??? and
sets up a significant delivery to filtered-alex@???, which is
invoked by the following line in the spamcatcher2 account's .forward file:
deliver filtered-$original_local_part@$original_domain
7) The spamcatcher2 account processes the email to alex.test@???
and sets up a significant delivery to filtered-alex.test@???,
which is invoked by the following line in the spamcatcher2 account's .forward
file:
deliver filtered-$original_local_part@$original_domain
8) The spamcatcher2 account's .forward file also instructs an unseen copy of
the email to be saved in its local mailbox, saving a file in the folder
/home/spamcatcher2/Maildir/.testing_archive/, which is done through the
following line:
unseen save $home/Maildir/.testing_archive/
9) Exim finds testdomain.org.uk in /etc/mail/domains
10) Exim uses the domain alias file /etc/mail/testdomain.org.uk to work out
what to do with the outbound email deliveries, which were both set up by the
spamcatcher2 account
11) The email now destined for filtered-alex@??? is now delivered
to the local 'alex' account by the following line in
/etc/mail/testdomain.org.uk.
filtered-alex: alex
12) The local alex account saves a copy to /home/alex/Maildir/ and also
intructs for a copy to be delivered to the local alextest account, which
results in it being saved in /home/alextest/Maildir/. This delivery chain is
now complete, so I guess that the hints file is updated.
13) The email now destined for filtered-alex.test@??? is now
routed to the email address alex@??? on an external mail
host, which was done by the following line in /etc/mail/testdomain.org.uk:
filtered-alex.test: alex@???
14) The host eximtest.testdomain.org.uk is deliberately unavailable (for
testing purposes, the Exim service has been stopped). The logs in
/var/log/exim4/mainlog show:
2016-05-22 20:30:55 1b4Z5S-0007Qq-Lh eximtest.testdomain.org.uk [82.1.147.13]
Connection refused
2016-05-22 20:30:55 1b4Z5S-0007Qq-Lh == alex@???
<alex.test@???> R=dnslookup T=remote_smtp defer (111): Connection
refused
15) The message is in the mailq, as shown by my testing script which queries
and logs the mailq once per minute:
=== MAILQ listing start: Sun May 22 20:32:01 BST 2016
1m 1.1K 1b4Z5S-0007Qq-Lh <alex@???>
alex.test@???
D alex@???
=== MAILQ listing complete: Sun May 22 20:32:01 BST 2016
16) At this point, you can either wait for the queue runner to trigger or
manually trigger another delivery attempt of the message. I opt for the
latter, as I'm then able to do it with full diagnostics. The command used was:
sudo exim4 -d+all -M 1b4Z5S-0007Qq-Lh
17) The detailed output from manually invoking the message to be processed
shows that all is working just fine until the hints file is consulted. Along
the way, the hint has been set relating to the delivery of this email to the
spamcatcher2 account. The email delivery from the queue to
alex.test@??? is discarded:
20:32:21 28740 opened hints database /var/spool/exim4/db/retry: flags=O_RDONLY
20:32:21 28740 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
20:32:21 28740 Considering: spamcatcher2@???
20:32:21 28740 unique = spamcatcher2@???
20:32:21 28740 spamcatcher2@??? was previously delivered:
discarded
20:32:21 28740 alex.test@???: children all complete
20:32:21 28740 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
18) The /var/log/exim4/mainlog records that the message processing is complete:
2016-05-22 20:32:21 1b4Z5S-0007Qq-Lh Completed
19) Soon after this point, my mailq logging script records that the queue is
now empty:
=== MAILQ listing start: Sun May 22 20:33:01 BST 2016
=== MAILQ listing complete: Sun May 22 20:33:01 BST 2016
--
You are receiving this mail because:
You are on the CC list for the bug.