Mail setup with hostname using external server

I am a bit stuck, I am not familiar with much server internals in details. In short, I have a Virtualmin machine with hostname set to my main web address.

This address however uses an external mail service. So mails from the server was not reaching my inbox. Therefore I changed the general options of postfix to:

What domains to receive mail for "localhost.$mydomain, localhost, localhost.localdomain"

Which means the server will now use the mx server defined by the DNS.

However now I have a second domain and I try to send a test message to that domain’s new mailbox on Virtualmin.

I am then informed this cannot be done:

<> (expanded from <>): host[99.99.999.999] said: 550 5.7.1 recipient
<> unknown #292 (l18Exp094353299400) (in reply to
RCPT TO command)

So my question is… why is postfix forwarding to in order to deliver the mail? What settings can I amend to fix this problem?

Any help would be much appreciated.

This server is on the Virtualmin GPL on EC2.<br><br>Post edited by: lightwisters, at: 2009/02/09 11:17

Answered my own question…

Don’t use main domain as hostname. Use This will avoid this issue.

You also cannot remove $hostname.<br><br>Post edited by: lightwisters, at: 2009/02/09 12:53