Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have a server configuration that includes Postfix and it is configured to use an external DNS. The domain names involved are configured on the same server but are not live yet (externally they do resolve to their correct OLD IP). Basically we are going to switch externally hosted websites to our server and update name servers.

Performing a ping of one of the domains in question will reveal the correct old IP. However, when postifix attempts to resolve the domain it sees that we have the domains registered on our server and doesn't bother performing a DNS lookup (if it did it would see that they sites actually exist externally).

Is there anyway to force postfix to ignore the locally-created domain names and always perform a DNS looksup until we are ready to 'turn on' (update nameservers) our newly created domains?

Thanks in advance!

share|improve this question
What OS/distro are you running Postfix on? – gravyface Jun 22 '10 at 11:27

Here is the section from which I believe applies to your situation:

# In addition to the above, the Postfix SMTP server by default accepts mail
# that Postfix is final destination for:
# - destinations that match $inet_interfaces or $proxy_interfaces,
# - destinations that match $mydestination
# - destinations that match $virtual_alias_domains,
# - destinations that match $virtual_mailbox_domains.
# These destinations do not need to be listed in $relay_domains.

Make sure that your domain is not listed in those locations. Additionally, $myhostname and $mydomain should be free of the domain in question or it will accept mail for that domain. But, you should add it to the $relay_domains so it knows to relay the mail it receives for that domain.

Edit: Additionally, you may be able to add the mail server hostname to the /etc/hosts file until your nameservers are switched over.

share|improve this answer

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.