Clint Miller wrote: > I have emails that accumulate in the Postfix deferred queue with > messages like: > > * (connect to comcat.net <http://comcat.net>[216.3.71.208]:25: No > route to host) > * (connect to schollnet.com <http://schollnet.com>[208.73.210.27]:25: > Connection refused) > * (Host or domain name not found. Name service error for > name=oasis.org.au <http://oasis.org.au> type=MX: Host not found, try > again) > * (connect to a34-mta04.direcpc.com > <http://a34-mta04.direcpc.com>[66.82.4.105]:25: Operation timed out) > > These examples above are just a snapshot of the type of error messages > I see in the deferred queue- I'm not asking for specific information > about these messages. > > The error messages all make sense as to what happened or what's not > configured correctly on the receiving end. I know Postfix will try to > deliver them again at increasing intervals (as configured). How long > will that retry process go on? Will they eventually be moved into the > hold queue? Will they ever actually bounce back to the SMTP MAIL FROM > (return-path) sender? > > I know how to clean them out and I even wrote a little script to help > me with that, but I couldn't find a lot of detailed documentation that > described what would happen in these types of undeliverable cases.
All messages stay in the queue until maximal_queue_lifetime is reached. By default, this is 5 days. This prevents transient errors, such as connection loss on either end, from affecting mail delivery. Do not set this to anything insane like 2 hours or you may get angry users. No less than 3 days is recommended. You can enforce checks in Postfix using reject_unknown_recipient_domain. Note: this can be affected by DNS failure. A local caching DNS server is recommended for this. This will catch some, but not all of bad spellings.