Forcing sendmail to flush its host status

If sendmail has a temporary problem delivering mail to another mail server then it will store the email in its queue and record the status of the destination host. When another email is processed that needs to go to the same mail server the status of the host is checked first before attempting delivery. All entries in the host status have a timeout value, which after expiring will allow sendmail to attempt delivery of any queued mail for the hosts listed.

This is make processing problem mail more efficient but can be troublesome if a sysadmin knows that a problem with a destination mail server has been resolved.

To force sendmail to flush host status and process any emails in the queue immediately use the following command:

sendmail -OTimeout.hoststatus=0m -q -v

This will output the details of any emails processed to the terminal.

Last updated: 25/09/2015