I would be really happy to learn how to make Postfix to "remember" that certain host is unreachable at the moment, so it would be good if we didn't perform any new connection attempts to this host for a while.
I know Postfix is following exponential backoff algorythm for recipients, but can the same idea be applied to recipients' hosts?
Thanks!
In the event of a remote server being unreachable, Postfix (and any such MTA) will just queue/spool the message and keep retrying - you can configure the threshold/duration of the retries by changing the
maximal_queue_lifetime
,maximal_backoff_time
,minimal_backoff_time
andqueue_run_delay
settings.If you don't want to force global values, a quite hacky approach is to relay all mail for the specified domains to a separate Postfix server which has been configured with very high values.
Another approach would be to use
header_checks
to drop/discard all messages for the intended recipient domains.