External Mail Server Issue

6 posts / 0 new
Last post
#1 Wed, 03/04/2009 - 06:38
webwzrd

External Mail Server Issue

I have a few hosting clients that handle their own email and I route their MX record via my external DNS service. All works fine.

The issue is when any other account I'm hosting, including me tries to send them an email, my server doesn't know to look outside itself for their mail record and bounces the mail. I've tried adding a mail record pointing to their mail server IP, but no go.

So the question is how can I set the account up so that mail sent from my server knows to use the recipients external server?

Brian

Wed, 03/04/2009 - 06:47
Joe
Joe's picture

Turn off mail for that domain. ;-)

Sounds too simple to be true, eh? But, it is. Just look in the Edit Virtual Server page, and open out the "Enabled features" section. Uncheck the box beside "Mail for domain enabled?"

--

Check out the forum guidelines!

Wed, 03/04/2009 - 07:14
webwzrd

lol... OK, works.

I initially tried setting up the virtual server without the email enabled, but that produced this bounce back error: "Diagnostic-Code: X-Postfix; mail for domain.net loops back to myself".

Ultimately what I have done is enable the mail feature, then edited the mail record to point to the external IP and then disable the mail feature and it works.

Thanks Joe.

Wed, 03/04/2009 - 07:37 (Reply to #3)
Joe
Joe's picture

<div class='quote'>&quot;Diagnostic-Code: X-Postfix; mail for domain.net loops back to myself&quot;.</div>

This is usually indicative of one of two things:

You didn't have an MX record pointing somewhere else, or it pointed to yourself (if you don't have an MX record, SMTP falls back to the domain itself--so, if I didn't have an MX record, mail to me would deliver to &quot;virtualmin.com&quot;, which in my case would be right...but in the case of a different mail server, it's obviously wrong).

Or, you had additional configuration in postfix that made Postfix think it was the mail server for this mail--but it had no way to deliver it.

Just for future reference. It sounds like you've gotten it straightened out.

--

Check out the forum guidelines!

Wed, 03/04/2009 - 07:49
webwzrd

You are right...&quot;You didn't have an MX record pointing somewhere else&quot;

I had added the mail.domain.net record, but wasn't sure where to add the MX record itself. When I temporarily enabled the email feature, it added everything for me. I then just edited the IP address and turned the mail feature back off.

Thanks again,
Brian

Wed, 03/04/2009 - 13:09
webwzrd

As I worked out a couple other bugs, I see that this is quite easy to add the needed records. Thanks for the quick response.

Topic locked