How to make Postfix not retry delivery of failed emails?

1

I don't want postfix to retry failed emails. How can I configure it not to do so?

David MZ

Posted 2012-10-31T06:58:56.770

Reputation: 133

Question was closed 2012-10-31T12:24:28.177

Answers

2

It looks like defer_service_name in Postfix's main configuration file will do what you want. Its default value is defer, and I can't easily find a list of valid settings, but I would hazard a guess that setting it to bounce will do what you are after.

Note that this will only affect mails that are rejected with a 4xx status (transient failure) by the remote server. Mails that are rejected with a 5xx status (permanent failure) are never retried by Postfix; since the remote server has already said that it will not accept the message as-is, there is no point in retrying delivery.

Also note that assuming it works the way I expect, this will break some things, including greylisting (which is fairly commonly used currently), and make your mail server significantly less resilient to intermittent errors as well as highly likely non-standards-conformant (4xx errors are supposed to trigger a later redelivery attempt). Consider the implications carefully before you implement something like this.

a CVn

Posted 2012-10-31T06:58:56.770

Reputation: 26 553