Fixing Exim retry errors

We’ve been experiencing a problem sending mails between application servers, one server’s mail server has been unavailalbe for a number of days and as such all new mails to that box bounce. Even now that the server is available the same behaviour is being experienced. We need to clear the exim retry database for this particular server. The first problem is actually seeing the retry rules exim_dumpdb is used here.

root@server1:/# exim_dumpdb /var/spool/exim4 retry
  T:www.zombification.net:83.244.152.145 111 65 Connection refused
01-Aug-2008 12:26:13  06-Aug-2008 09:22:37  06-Aug-2008 15:22:37 *
  T:backup.zombification.net:83.244.152.146 113 77 No route to host
31-Jul-2008 17:20:22  05-Aug-2008 17:43:21  05-Aug-2008 23:43:21 *

Here we can see that retry times need to be cleared. Here I’ve used exim_tidydb to clear any rules that have been in place for more than one hour.

root@server1:/# exim_tidydb -t 1h /var/spool/exim4 retry
Tidying Exim hints database /var/spool/exim4/db/retry
deleted T:backup.zombification.net:83.244.152.146 (too old)
deleted T:www.zombification.net:83.244.152.145 (too old)