Tuesday, January 25, 2011

Postfix: Problem resolving email addresses when using external DNS

Hi,

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!

  • Here is the section from main.cf 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.

0 comments:

Post a Comment