On 12/18/2009 4:15 PM, Carlos Williams wrote:
On Fri, Dec 18, 2009 at 5:01 PM, Aaron Wolfe<aawo...@gmail.com>  wrote:
I think you might be trying to solve the wrong problem.  Why queue
mail for destinations that don't have MX records (typoed domain part,
etc)?  Better to return undeliverable to senders I would think.  This
is different than mail to domains that exist and do have MX records,
but postfix cannot reach the MX for some reason.

OK.

Did you change smtp_defer_if_no_mx_address_found from its default
setting of 'no'?  Maybe there is a reason to do this, but I don't see
it.  It will cause the problem you are describing.

No I did not 'change it from the default parameter according to Postfix.

[r...@mail ~]# postconf -d | grep "smtp_defer_if_no_mx_address_found"
smtp_defer_if_no_mx_address_found = no

"postconf -d" shows built-in defaults, not the settings currently used. For current settings, use "postconf".

At any rate, that parameter likely has no effect on your problem.

Many common typo domains have valid A or MX records, but the target hosts don't answer on port 25. Another common cause is domains that constantly return "fail" rather than "don't exist".

These are temporary errors that postfix rightfully keeps in the queue. A computer can't tell the difference between a temporary error that is likely to continue forever and a "real" temporary error.

[didn't I just answer this question from another poster a few minutes ago??]

Your choices are to just ignore it and let the mail be returned when $max_queue_lifetime is reached, or you can help postfix out by adding a transport_maps entry for the offending domain. Something like:
# main.cf
transport_maps = hash:/etc/postfix/transport

# transport
# these are some I commonly see; yours may be different
hotmial.com   error:5.1.2 hotmail.com not hotmial.com
hotmai.com    error:5.1.2 hotmail.com not hotmai.com
aoil.com      error:5.1.2 try "aol.com" instead
gmial.com     error:5.1.2 try "gmail.com" instead
comcaste.net    error:5.1.2 try "comcast.net" instead
comcat.net   error:5.1.2 try  "comcast.net" instead
comcost.com   error:5.1.2 try  "comcast.net" instead
comcst.net   error:5.1.2 try  "comcast.net" instead
c0mcast.net     error:5.1.2 try "comcast.net" instead
cherter.net     error:5.1.2 try "charter.net" instead



To answer your earlier question about how to force failure of a single message in the queue, postfix has no built-in function for that. The best work-around is to (temporarily) add a header_checks rule to reject the Message-ID: of that message, then requeue the message with "postsuper -r QUEUEID".


  -- Noel Jones

Reply via email to