How to fix a Postfix/MySQL/Dovecot Unknown Host Issue?
        Posted  
        
            by 
                thiesdiggity
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by thiesdiggity
        
        
        
        Published on 2012-03-22T03:18:36Z
        Indexed on 
            2012/03/22
            5:32 UTC
        
        
        Read the original article
        Hit count: 648
        
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 mail.example.com. Under that domain we have one email address. I have another server (MS Exchange) setup using another one of my sub-domains, ex.example.com.
The problem is that when I SMTP into the account on mail.example.com and try to send an email to an account on ex.example.com, I get the email returned back to us with an "unknown host" error.
Now, I know that the mail.example.com server can resolve the ex.example.com 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 ex.example.com 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 (example.com)?
If that's the case, how do I get Postfix/Dovecot to only look locally for the entire URL (mail.example.com) 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!
© Server Fault or respective owner