On Fri, Jan 29, 2010 at 12:22 PM, Noel Jones <njo...@megan.vbhcs.org> wrote: > On 1/29/2010 11:57 AM, Dan Lists wrote: >> >> When a user mistypes an email address domain (eg @monsant.com), the >> message is sitting in the queue for days before they know about it. >> We'd like to give them immediate feedback instead of making them wail. >> >> I'm trying to have the outbound mail server permanently reject email >> with an invalid sender domain. >> >> I am using postfix 2.7-20100117 on FreeBSD 7.1 p10. >> >> I have: >> >> smtpd_recipient_restrictions = >> reject_non_fqdn_recipient, >> reject_unknown_recipient_domain, >> permit_mynetworks, >> reject_unauth_destination >> unknown_address_reject_code = 550 >> >> This works if the domain exists but the hostname does not, for example >> email to nob...@asdf.gmail.com: >> >> Jan 29 11:49:27 outbound postfix/smtpd[65568]: NOQUEUE: reject: RCPT >> from hostname[12.34.56.78]: 550 5.1.2<nob...@asdf.gmail.com>: >> Recipient address rejected: Domain not found; from=<d...@nowhere.com> >> to=<nob...@asdf.gmail.com> proto=ESMTP helo=<hostname> >> >> If the domain does not exist, it is giving a 450. Here is the log for >> an email to monsant.com: >> >> Jan 29 11:48:23 outbound postfix/smtpd[65568]: NOQUEUE: reject: RCPT >> from hostname[12.34.56.78]: 450 4.1.2<nob...@monsant.com>: Recipient >> address rejected: Domain not found; from=<d...@dan@nowhere.com> >> to=<nob...@monsant.com> proto=ESMTP helo=<hostname> >> >> How can I make postfix issue a 550 error when the domain does not exist? >> >> Thanks, >> >> Dan > > $ host monsant.com > Host monsant.com not found: 2(SERVFAIL) > > This is a temporary error. The name server for monsant.com could not be > contacted. You don't know if the domain exists or not. "whois" shows this > domain does exist, but the listed name servers return an error rather than > an authoritative NXDOMAIN.
I am getting an NXDOMAIN: # host monsant.com Host monsant.com not found: 3(NXDOMAIN)