Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up a perimeter spam and malware filter using CentOS/Postfix/SpamAssassin. Unfortunately, I am still stuck on the PostFix part. I've setup a new subdomain DNS with its own A/MX record (the MX points to the A), and that's working fine. I've also setup a basic PostFix conf using Webmin and editing the file according to, with an entry for relay_domains = I send an email to expecting it to recognize as a relay domain, and at least get to the point of trying to figure out how to relay it (maybe there would be a failure in terms of looking up whether it is allowed to be relayed, where it's relayed to, the receiving host barfs, etc.) However, it never gets that far, and in my maillog I see:

Apr  5 16:06:59 localhost postfix/smtpd[13518]: NOQUEUE: reject: RCPT from mailout-[]: 550 5.1.1 <>: Recipient address
rejected: User unknown in local recipient table; from=<> to
<> proto=SMTP helo=<> I can conclude it's still trying to deliver locally.

Now, I have not disabled local delivery, mainly because I do not know how to do so. I would think however that it would at least try to relay it and match it against a domain.

One line in the main conf file that troubling to me was the following

# NOTE: Postfix will not automatically forward mail for domains that
# list this system as their primary or backup MX host. See the
# permit_mx_backup restriction description in postconf(5).

Where am I going wrong?

share|improve this question
up vote 2 down vote accepted

That's not "not getting that far", it's getting past there by recognizing it as a local hostname, which obviously doesn't need to be relayed. You do not want the mailer to consider the relay domain local; you want it to have its own local hostname, with the MX pointing to it (i.e. not MX and A being the same; that's actually quite meaningless as it implies relaying to itself).

share|improve this answer
Forgive me if this is thick, but what do you suggest I do to resolve the problem? The local hostname of my CentOS vm != dns name... I just it to sit "in front of" my Exchange server and forward all mail for relay_domains to it at this point. – tacos_tacos_tacos Apr 5 '12 at 20:38
Nevermind... you were right! My host name was NOT the same as the DNS name, BUT I had specified the relay domain as an accepted domain for local delivery, effectively the same effect... – tacos_tacos_tacos Apr 5 '12 at 20:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.