How to get rid of "defer (-52): Retry time not yet reached" exim4 logs?

I have such a logs in mainlog of exim4. All I do with exim4 is learn only so all mails are fake. Now I try to manage theese logs that appear frequently:

2016-12-20 14:28:01 1cJ2UW-0006Yq-3m == [email protected] R=manualrouteadam T=maildir_home defer (-52): Retry time not yet reached
2016-12-20 14:28:01 1cJ8rt-0001Ur-Qj == [email protected] R=manualrouteadam T=maildir_home defer (-52): Retry time not yet reached
2016-12-20 14:28:01 1cJ2YZ-0000W9-W5 == [email protected] R=manualrouteadam T=maildir_home defer (-52): Retry time not yet reached
2016-12-20 14:28:01 1cIsqP-0002Xn-KY == [email protected] R=dnslookup T=remote_smtp defer (-53): retry time not reached for any host
2016-12-20 14:28:01 1cJE0z-00028i-Ve == [email protected] R=manualrouteadam T=maildir_home defer (-52): Retry time not yet reached
2016-12-20 14:28:01 1cIrmt-0002Hz-Td == [email protected] R=dnslookup T=remote_smtp defer (-53): retry time not reached for any host
2016-12-20 14:28:01 1cIsS3-0002Rj-MM == [email protected] R=dnslookup T=remote_smtp defer (-53): retry time not reached for any host
2016-12-20 14:28:01 1cJ2X1-0000R4-EY == [email protected] R=manualrouteadam T=maildir_home defer (-52): Retry time not yet reached
2016-12-20 14:28:01 End queue run: pid=11801

How to remove that since I do not need that?


Solution 1:

From time to time you may notice that some addresses give a defer error: retry time not reached for any host.

1Ruz3Y-0005TQ-Ek == [email protected] R=dnslookup T=remote_smtp defer (-53): retry time not reached for any host

So, you need to find out what smtp server is used to manage address.com’s email. To do this — use the host command or more advanced dig, whatever you like best. This command should be issued on your mail server:

host domain.com
domain.com has address X.X.X.X
domain.com mail is handled by 50 remote.smtp.server.

First of all make sure that remote smtp server is accepting connections on 25/tcp and is operating without any unpredictable errors.

telnet remote.smtp.server 25
Trying x.x.x.x...
Connected to remote.smtp.server.
Escape character is '^]'.
220 remote.smtp.server bla-bla-bla

Next step is to tidy up exim retry database:

/usr/sbin/exim_tidydb -t 1d /var/spool/exim retry > /dev/null

In some cases you may want to delete all the retry entries:

rm -rf /var/spool/exim/db/retry
rm -rf /var/spool/exim/db/retry.lockfile

Source : https://linuxnlenux.wordpress.com/2013/08/11/exim-defer-53-retry-time-not-reached-for-any-host/

Solution 2:

Run the command:

strings /var/spool/exim/db/retry

To see which hosts are unreachable by exim, you will get output like the following:

No route to host
T:mail.siemens.com:138.162.19.16
Permission denied
T:mail.siemens.com:2a01:7a01::f05c:91cf:feb8:b2e1

Fix the errors, see whats wrong.

Make sure it is not a DNS old cache entries issue, to handle this, edit the file /etc/resolve.conf and place the following line at the top just before the first nameserver entry:

# File: /etc/resolve.conf
nameserver 8.8.8.8

This instructs to use the google DNS so that exim is doing the checks correctly.

Additional optional step, remove all messages from the exim queue that might be frozen:

 exiqgrep -i | xargs exim -Mrm

Restart exim:

 systemctl restart exim