Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 have a quick question. How do I setup postfix to send an email to another server (Exchange Server) when sending to an email address that has a sub-domain of our main server. For example, say our main server is and we have a Exchange server setup to receive emails from We have the MX records setup in our DNS and it receives correctly if we send from a GMail account. However, when we try to send an email from a account we get the following error:

Host or domain name not found. Name service error for type=A: Host not found

I believe Postfix checks for local mailboxes first and if its setup with the domain it delivers to the local account, but in this case the sub-domain accounts are located in another server. Anyone have any thoughts on what I need to do within Postfix so it doesn't look locally for the mailboxes?

Thanks for your help.

share|improve this question
up vote 1 down vote accepted

It sounds more like the machine cannot resolve host names... So use your favorite editor to supply name servers to the system.

sudo vim /etc/resolv.conf

The contents of that file...


And maybe edit /etc/hosts and add the hostname and IP address:

sudo vim /etc/hosts

And the line to add (use the real IP address)... exchange
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.