How to stop deferred emails

postfix

I have a Postfix mail gateway. At the same time, every other host is set to use this gateway as the relay.

We have some automated outgoing emails sent from some hosts. I believe the gateway tries to send a deferred status back to the system started this. But that system is a null client, which sends but not receive any email

Is there anyway to stop sending the deferred status?

Example log output:

postfix/smtp[35725]: 2F6A155C256: to=, relay=none, delay=260862, delays=260862/0.01/0/0, dsn=4.4.1, status=deferred (connect to orange.mydom.com[192.168.1.5]:25: Connection refused)

Best Answer

"Deferred" means that Postfix tried to deliver the message but failed (in this case because the MX server rejected the SMTP connection), and so it is going to wait a while and try to deliver it later. Postfix isn't sending a status report, it is simply trying to deliver a message which it was asked to deliver. That message may have been generated by Postfix (e.g. a bounce notification regarding the failed deliver of a different message), or it may have been generated by another client altogether. You need to figure out where that message came from, and fix whatever is generating it to either not generate it, or to send it elsewhere.