Exim seems to ignore retry configuration shows "retry time not reached for any host" every 15 minutes

Gino Viroli

Well-Known Member
Oct 2, 2007
91
10
58
cPanel Access Level
Root Administrator
According to Exim configuration (WHM > Service Configuration > Exim Configuration Manager) on my VPS, the outgoing mail rules are:

Code:
+secondarymx           *           F,4h,5m; G,16h,1h,1.5; F,4d,8h
*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,8h
it means: retries every 15 minutes for 2 hours, then increasing retry intervals, starting at 1 hour and increasing each time by a factor of 1.5, up to 16 hours, then retries every 8 hours until 4 days have passed since the first failed delivery

Hence I would expect the retry intervel to be 15 minutes for the first 2 hours, then the retry interval should be at least 1 hour, but when I look at the log of a message that was sent to a not existing/working email address, it seems it goes on retrying very 15 minutes forever.

See Exim log below, where sending mail to [email protected] fails, the message is sent at 14:55 for the 1st time, but after 2 hours, Exim is still retyring every 15 minutes at 18:01, 18:14, 18:29 instead of retrying with an interval of 1 hour. o_O

Code:
[email protected] [~]# exigrep "1iuGTy-00026o-A7" /var/log/exim_mainlog
2020-01-22 14:55:46 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1iuGTy-00026o-A7

+++ 1iuGTy-00026o-A7 has not completed +++
2020-01-22 14:55:46 1iuGTy-00026o-A7 <= [email protected] U=me P=local S=1487 [email protected] T="confermato" for [email protected] [email protected] [email protected] [email protected]
2020-01-22 14:55:46 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 14:55:46 1iuGTy-00026o-A7 SMTP connection outbound 1579701346 1iuGTy-00026o-A7 mydomain.it [email protected]
2020-01-22 14:55:46 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 14:55:46 1iuGTy-00026o-A7 SMTP connection outbound 1579701346 1iuGTy-00026o-A7 mydomain.it [email protected]
2020-01-22 14:55:46 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 14:55:46 1iuGTy-00026o-A7 SMTP connection outbound 1579701346 1iuGTy-00026o-A7 mydomain.it [email protected]
2020-01-22 14:55:46 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 14:55:46 1iuGTy-00026o-A7 SMTP connection outbound 1579701346 1iuGTy-00026o-A7 mydomain.it [email protected]
2020-01-22 14:55:46 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 14:55:46 1iuGTy-00026o-A7 [213.209.1.130] SSL verify error: certificate name mismatch: DN="/C=IT/ST=Milano/L=Assago/OU=Information Technology/O=Italiaonline S.p.A./CN=*.libero.it" H="smtp-in.virgilio.it"
2020-01-22 14:55:47 1iuGTy-00026o-A7 => [email protected] R=dkim_lookuphost T=dkim_remote_smtp H=gmail-smtp-in.l.google.com [74.125.143.26] X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=yes C="250 2.0.0 OK  1579701347 ch4si24988759ejb.125 - gsmtp"
2020-01-22 14:55:47 1iuGTy-00026o-A7 => [email protected] R=dkim_lookuphost T=dkim_remote_smtp H=smtp-in.virgilio.it [213.209.1.130] X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=no C="250 uGTyiu7OrahRKuGTzi6igF mail accepted for delivery"
2020-01-22 14:56:06 1iuGTy-00026o-A7 [78.47.57.127] SSL verify error: certificate name mismatch: DN="/OU=Domain Control Validated/OU=PositiveSSL/CN=myhost" H="mail.mydomain.it"
2020-01-22 14:56:28 1iuGTy-00026o-A7 => [email protected] R=dkim_lookuphost T=dkim_remote_smtp H=mail.mydomain.it [1.2.3.4] X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=no C="250 OK id=1iuGUd-0004D1-9t"
2020-01-22 14:59:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 14:59:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 15:14:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 15:14:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 15:29:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 15:29:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 15:44:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 15:44:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 15:59:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 15:59:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 16:14:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 16:14:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 16:29:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 16:29:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 16:44:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 16:44:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 16:59:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 16:59:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 17:14:12 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 17:14:12 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 17:29:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 17:29:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 17:44:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 17:44:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 17:59:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 18:01:18 1iuGTy-00026o-A7 H=HDRedirect-LB5-1afb6e2973825a56.elb.us-east-1.amazonaws.com [23.20.239.12] Connection timed out
2020-01-22 18:01:18 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (110): Connection timed out
2020-01-22 18:14:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 18:14:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 18:29:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 18:29:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'

(END)
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,252
313
Houston
Hello,


Based on the exim retry rules in their documentation this appears to be functioning normally:


8. Retry rule examples
Here are some example retry rules:
Code:
[email protected] quota_5d  F,7d,3h
wonderland.fict.example quota_5d
wonderland.fict.example * F,1h,15m; G,2d,1h,2;
lookingglass.fict.example * F,24h,30m;
* refused_A F,2h,20m;
* * F,2h,15m; G,16h,1h,1.5; F,5d,8h

The first rule sets up special handling for mail to [email protected] when there is an over-quota error and the mailbox has not been read for at least 5 days. Retries continue every three hours for 7 days. The second rule handles over-quota errors for all other local parts at wonderland.fict.example; the absence of a local part has the same effect as supplying “*@”. As no retry algorithms are supplied, messages that fail are bounced immediately if the mailbox has not been read for at least 5 days.

The third rule handles all other errors at wonderland.fict.example; retries happen every 15 minutes for an hour, then with geometrically increasing intervals until two days have passed since a delivery first failed. After the first hour there is a delay of one hour, then two hours, then four hours, and so on (this is a rather extreme example).
The fourth rule controls retries for the domain lookingglass.fict.example. They happen every 30 minutes for 24 hours only. The remaining two rules handle all other domains, with special action for connection refusal from hosts that were not obtained from an MX record.

The final rule in a retry configuration should always have asterisks in the first two fields so as to provide a general catch-all for any addresses that do not have their own special handling. This example tries every 15 minutes for 2 hours, then with intervals starting at one hour and increasing by a factor of 1.5 up to 16 hours, then every 8 hours up to 5 days.
We really only want to look at the final rule:

Code:
* * F,2h,15m; G,16h,1h,1.5; F,5d,8h
This indicates that the rule will try:
  • every 15 minutes for 2 hours
  • then with intervals starting at one hour and increasing by a factor of 1.5 up to 16 hours
  • then every 8 hours up to 5 days.
Looking at the retry times you've got listed

Initial send time:

2020-01-22 14:55:46 - 2020-01-22 14:59:11


  • 1st Retry:
    Code:
    2020-01-22 15:14:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
  • Last Retry for first rule (2h:15m):
    Code:
    [*]2020-01-22 17:14:12 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
  • 1st retry of second rule:
  • Code:
    2020-01-22 18:14:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
  • Logged Retry:
    Code:
    2020-01-22 18:29:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'

Retries done at:
  • 15:14:11 through 17:14:12 - are F,2h,15m
Retry done at:
  • 18:14:11 is G,16,1h,1.5
    • Specifically 1h
    • This takes place one hour after the last retry was attempted at the same time the initial sending of the 1st retry was attempted on the F,2h,15m which finalized at 17:14:12
Final Retry at:
  • 18:29:11 is G,16,1h,1.5
    • Specifically 1.5
    • This is where this gets a bit complicated - the 1.5h retry took place at 1.5 hours after the first message delivery attempt (14:59:11) following the final retry of the first rule (this rule isn't used until the 1st set have been exceeded)
Now what would be interesting to know is, how is this being handled for further retries? Is it still continuing with 15m intervals?

Also good to note from Exim's documentation:
Retry times are hints rather than promises. Exim does not make any attempt to run deliveries exactly at the computed times. Instead, a queue runner process starts delivery processes for delayed messages periodically, and these attempt new deliveries only for those addresses that have passed their next retry time.
Another good note is they do have a retry db at /var/spool/exim/db/
The data in the retry hints database can be inspected by using the exim_dumpdb or exim_fixdb utility programs (see chapter 54). The latter utility can also be used to change the data. The exinext utility script can be used to find out what the next retry times are for the hosts associated with a particular mail domain, and also for local deliveries that have been deferred.
You can find information on that here: 54. Exim utilities

Basically the following should get you some information on the retry hints and what exim is translating the rules as:

Code:
exim_dumpdb /var/spool/exim retry
 
  • Like
Reactions: Gino Viroli

Gino Viroli

Well-Known Member
Oct 2, 2007
91
10
58
cPanel Access Level
Root Administrator
Hello,


Based on the exim retry rules in their documentation this appears to be functioning normally:

[...]

Initial send time:

2020-01-22 14:55:46 - 2020-01-22 14:59:11


  • 1st Retry:
    Code:
    2020-01-22 15:14:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
  • Last Retry for first rule (2h:15m):
    Code:
    [*]2020-01-22 17:14:12 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
  • 1st retry of second rule:
  • Code:
    2020-01-22 18:14:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
  • Logged Retry:
    Code:
    2020-01-22 18:29:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
Thanks but what about the retries made at 17:29 and 17:44? :confused:
If the last retry of first rule is at 17:14 and the 1st retry of second rule is at 18:14 why does he makes two more retries at 17:29 and 17:44?

Code:
2020-01-22 17:29:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 17:29:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 17:44:11 1iuGTy-00026o-A7 Sender identification U=me D=mydomain.it [email protected]
2020-01-22 17:44:11 1iuGTy-00026o-A7 == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (-53): retry time not reached for any host for 'somedomain.com'
2020-01-22 17:59:11 ...