smtp – Exim Defer (-53): Retry Time Not Reached for Any Host

eximsmtp

I'm an exim newbie – and have inherited a system running exim which is misbehaving.

My instance has stopped sending emails. It is accepting messages into the queue, and is running with -q1h – each hour, for each message in the queue, it reports…

defer (-53): retry time not reached for any host

It is configured to use a highly available smart host – so this is not an issue with the remote MTA. Indeed running exim -v from the command line to send an email it is passed off to the smart relay immediately. i.e. there is no issue with the routing, authentication, availability. Exim is simply not attempting to forward these emails.

I see lots and LOTS of people saying that the way to fix this is to reset the retry database either by deleting just the lockfiles, or the lockfles and retry database. Neither method had any impact on my mailq.

NB this is not a retry after a failure – exim has never attempted to pass on the message.

The retry configuration is as per default:

begin retry
* * F,2h,15m; G16h,1h,1.5; F,4d,6h

I imagine that the -q1h is the reason it does not immediately try to relay the message. But why is it not picking up messages from the queue?

Since this is handing off to a smart relay, I have no need to back up the messages for an hour. If I remove the -q1h from the options, will exim keep scanning the queue regularly or just ignore it?

Best Answer

The-q1h means that the daemon will process the queue once every hour. Having it process the queue is sensible, as even though you are sending via a smarthost, even that can be offline / unreachable for whatever reason, and will cause messages to be placed in the queue. Not running the queue would mean those messages are never sent.

The fact that exim is reporting "retry time not reached for any host" means that the smarthost apparently was unreachable at some point. To prevent wasting resources repeatedly trying to access an offline host, a retry time is imposed, and that time has apparently not yet been reached. I'm sure that if you search the logs further you will see where the smarthost was unreachable.

You can force an attempt to deliver a message by running exim -M messageID (you can see the message IDs with exim -bp or mailq if exim has been linked to this name).

Related Topic