DNS for alias domain with external mailserver

Hi People, happy New Year to you all.

I am having difficulty with a domain alias and email.

I have a client for whom I have been hosting a website (.co.uk) for some years without any problem.

Some time ago he said that he had a new domain (.com) hosted elsewhere and wanted to leave it hosted elsewhere. He wanted me to continue to host the .co.uk and for the .com domain to resolve to the .co.uk on our server. OK, not a problem. I set up am alias for the .com on our server and the hosts of the .com set up their DNS so that web visitors to the .com domain end up at our server. That worked and continues to work.

The problem is with email.

When I set up the alias I used the link “Alias of domain.co.uk, with own email” in “create new server” and I set the MX record using the Bind module to “mx1.mail.hosting-company.com.”

I know that until today email addressed to robert@domain.com was working for email passing through our server because I have been emailing him (my domain and email is hosted on the same server).

Now I get a forwarding loop as here :-

Jan 2 15:12:55 ns1 postfix/local[7373]: 80C991A10CB4: to=robert.domain@ns1.My-Server.co.uk, orig_to=robert@domain.co.uk, relay=local, delay=0.05, delays=0.03/0/0/0.02, dsn=5.4.6, status=bounced (mail forwarding loop for robert.domain@ns1.My-Server.co.uk)

When this problem started I was simply uploading and testing a new form on his co.uk site. I made no changes to Bind or anything else that I can remember.

What a bad start to the year?

Thanks for reading I would appreciate any help you can offer.

CentOS Linux 5.10
Webmin version 1.660
Virtualmin version 4.03 Pro

I’m having a little trouble understanding the basic layout of your domains here. :slight_smile:

You said your customer has the .com “hosted elsewhere and it should stay like so”, but then he wants you to host the zone and point visitors for the .com domain to your server? I don’t see how that makes sense if the .com is “hosted elsewhere”? Can you elaborate on that? What part of the .com exactly is hosted elsewhere, and what part is on your server?

Hi Locutus, thanks for getting back to me.

I guess I wasn’t very clear, apologies.

The other company just host the .com domain name and email for the .com. That is where the client picks up his email. That company has set up DNS so that all website visitors to the .com arrive at our server but email stays on their server.

We host the .co.uk and the website. we need to forward or otherwise redirect all email addressed to the .co.uk domain to the .com addresses. So fred@domain.co.uk is forwarded to fred@domain.com.

Our outgoing mail uses the same server as the .co.uk domain. If I send an email to robert@domain.com I get the forwarding loop described above. Sending email to robert@domain.com from an external account (Hotmail or whatever) the email arrives without issue. That means that the error must be on our server and it’s DNS.

Thanks for reading,


I think I have resolved this now but I won’t be able to fully test until the client is back at work (tomorrow).

I have turned ff “Mail for domain enables” in “Edit virtual server” for the .com domain and no longer get the forwarding loop error.

Makes sense I guess, the local server HAS to look elsewhere to deliver any .com email generated on the server.

Thanks Locutus and everyone for reading.