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 having an issue with one of my Postfix/Dovecot mail servers and I'm unsure how to fix the problem. I will try to explain it in detail, here it goes:

I have an Ubuntu server setup using Virtual hosting with Postfix, Dovecot and MySQL. We have one domain setup as a virtual domain, for this example I am going to use Under that domain we have one email address. I have another server (MS Exchange) setup using another one of my sub-domains,

The problem is that when I SMTP into the account on and try to send an email to an account on, I get the email returned back to us with an "unknown host" error.

Now, I know that the server can resolve the domain because I can ping/dig while SSH'd into it. I can also log into Postfix via Telnet and send an email to an mailbox.

I'm guessing that it has something to do with Postfix/Dovecot looking locally for the domain in the virtual domain list because of the tld domain (

If that's the case, how do I get Postfix/Dovecot to only look locally for the entire URL ( and if it doesn't find it, send it to the correct server by looking up the MX/A records (which I know exist and are setup correctly)?

I have been working on this all day and any guidance would be GREATLY appreciated!

Thanks for your time!

share|improve this question
up vote 0 down vote accepted

Go figure, right after I posted this question I was able to figure out the cause of the problem.

For some reason there was an "ALL" domain in the MySQL virtual domain table, once I deactivated that record and now it works!

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.