Hawkes Blog
Windows reboot | Linux be root
Hawkes Blog
manipulate exim retry database

Short How-To: edit exim retry db to reset/force/check the next retry

Short How-To: check/reset exims retry database

1. Get the next retry cycle

  • with exim_dumpdb
Usage: exim_dumpdb  <spool-directory> <database-name>
       <database-name> = retry | misc | wait-<transport-name> | callout |
       ratelimit

exim_dumpdb /var/spool/exim4/ retry

18-Nov-2013 12:08:25  19-Nov-2013 12:54:24  19-Nov-2013 18:54:24
T:mx02.quat.net:46.163.67.72 -18 77 Remote host mx02.quat.net [46.163.67.72]
closed connection in response to HELO freund-alter-moebel.de

the next retry for the host mx02.quat.net [46.163.67.72] is 19-Nov-2013 18:54:24

T:mx02.quat.net:46.163.67.72 is the db key which we need later to delete this entry


  • with exinext
Usage: exinext <address>|<domain>|<local-part>


exinext mx02.quat.net

Transport: mx02.quat.net [46.163.67.72] error -18: Remote host
mx02.quat.net [46.163.67.72] closed connection in response to HELO freund-alter-moebel.de
first failed: 21-Oct-2013 20:19:28
last tried:   21-Oct-2013 20:19:28
next try at:  21-Oct-2013 20:34:28



2. delete the entry

  • with exim_fixdb
Usage: exim_fixdb  <spool-directory> <database-name>
                   <database-name> = retry | misc | wait-<transport-name> |
                   callout | ratelimit


exim_fixdb /var/spool/exim4/ retry

Modifying Exim hints database /var/spool/exim4//db/retry
> T:mx02.quat.net:46.163.67.72
21-Oct-2013 20:19:28
0 error number: -18 Remote host mx02.quat.net [46.163.67.72] closed connection in response to HELO freund-alter-moebel.de
1 extra data:   77
2 first failed: 21-Oct-2013 20:19:28
3 last try:     21-Oct-2013 20:19:28
4 next try:     21-Oct-2013 20:34:28
5 expired:      no
> d
deleted
> q

verify

exinext mx02.quat.net

No retry data found for mx02.quat.net



3. reset the retry db regularly

  • with exim_tidydb
Usage: exim_tidydb [-t <time>]  <spool-directory> <database-name>
                                <database-name> = retry | misc |
                                wait-<transport-name> | callout | ratelimit

to delete all entries older 7d

exim_tidydb -t 7d /var/spool/exim4/ retry
Tidying Exim hints database /var/spool/exim4//db/retry
deleted T:mx06.quat.net:195.210.48.11 (too old)
deleted T:gmail-smtp-in.l.google.com:2a00:1450:4001:c02::1b (too old)
Tidying complete

to delete old entries every monday simply add a cronjob (i use the root crontab)

41 5 * * 1 /usr/sbin/exim_tidydb -t 7d /var/spool/exim4/ retry