Simple Question regarding CName and MX

M

Mike Cox

I run my own name servers for a small web-hosting service. All sites on
my server are set up so that "theirdomain.com" and "www.theirdomain.com"
will resolve to their site. I also add an MX record and a mail alias so
that they can reach my mail server using mail.theirdomain.com.

The way I do this is by adding a blank "A" record pointing to their IP:
@ A 66.11.178.116
@ MX 10 mail.mrcccox.ca.
mail CNAME mail.mrcccox.ca.
www CNAME theirdomain.com.

The way I would like to do this is different: I want to have
"theirdomain.com" an alias and "www.theirdomain.com" an alias, this way
if my IP address ever changes, I only have to change it in one zone
instead of all zones. This would work but I also need an MX record and
I am not allowed to create a blank CNAME and a blank MX record in the
same zone.

How can I have my MX record and still be able to make "theirdomain.com"
resolve to an alias?

Thanks

Mike
 
A

Ace Fekay [MVP]

In
Mike Cox said:
I run my own name servers for a small web-hosting service. All sites
on my server are set up so that "theirdomain.com" and
"www.theirdomain.com" will resolve to their site. I also add an MX
record and a mail alias so that they can reach my mail server using
mail.theirdomain.com.
The way I do this is by adding a blank "A" record pointing to their
IP: @ A 66.11.178.116
@ MX 10 mail.mrcccox.ca.
mail CNAME mail.mrcccox.ca.
www CNAME theirdomain.com.

The way I would like to do this is different: I want to have
"theirdomain.com" an alias and "www.theirdomain.com" an alias, this
way if my IP address ever changes, I only have to change it in one
zone instead of all zones. This would work but I also need an MX
record and I am not allowed to create a blank CNAME and a blank MX
record in the same zone.

How can I have my MX record and still be able to make
"theirdomain.com" resolve to an alias?

Thanks

Mike

ou can't do that because if you think about it, the MX record is a blank
host CNAME anyway.

The way I did it when I used to host, I tried to avoid CNAMES. I created a
mail A record under their domain pointing back to my mail server's IP, but
it sounds like you don't want to do it this way in case you needed to change
your mail server IP.

mydomain.com
(same as parent) MX mail.mydomain.com
mail A 192.168.10.5

theirdomain.com
mail A 192.168.10.5
(same as parent) MX mail.theirdomain.com

These days, this leads to problems with the reverse lookup, which is almost
becoming a defacto with fighting spam. I only had a PTR for 192.168.10.5
pointing to mail.mydomain.com, and if anyone is doing a*strict* check, this
wouldn't pass, only on a loose check just to make sure the IP has a PTR. But
you want to make it so you just change it in one spot and keep their domain
name.

Curious, how often, if ever, do you expect your mail server IP to change?

--
Regards,
Ace

Please direct all replies ONLY to the Microsoft public newsgroups
so all can benefit.

This posting is provided "AS-IS" with no warranties or guarantees
and confers no rights.

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft Windows MVP - Windows Server - Directory Services

Paramount: What's up with taking Enterprise off the air??
Infinite Diversities in Infinite Combinations.
=================================
 
M

Mike Cox

I am not so worried about my mail server changing, it is pretty stable.
I have a server that I run from my Brother's house and want to
move it to my house and put it on my Cable connection. The Cable
company does not provide a static IP, but they do have an FQDN for me.
SO I have an alias in one of my zones that points to this FQDN so if the
Cable company changes my IP, my cname is still good. The server has
about 20 sites and most have multiple domain names. So if the Cable
company changes the IP and I use an A record for every zone, there will
be a lot of changes to make and some downtime while I make the changes.

My www for all zones is a cname that resolves my cable fqdn. So www
will always work for reaching the sites. I want domainname.com to work
the same way and still have an MX record for every domain that gets mail.

If I cannot resolve this issue with DNS, I guess I will have to look at
writing a script on the mail server that redirects traffic to the right
place.
 
K

Kevin D. Goodknecht Sr. [MVP]

In
Mike Cox said:
I run my own name servers for a small web-hosting service. All sites
on my server are set up so that "theirdomain.com" and
"www.theirdomain.com" will resolve to their site. I also add an MX
record and a mail alias so that they can reach my mail server using
mail.theirdomain.com.

The way I do this is by adding a blank "A" record pointing to their
IP: @ A 66.11.178.116
@ MX 10 mail.mrcccox.ca.
mail CNAME mail.mrcccox.ca.
www CNAME theirdomain.com.

The way I would like to do this is different: I want to have
"theirdomain.com" an alias and "www.theirdomain.com" an alias, this
way if my IP address ever changes, I only have to change it in one
zone instead of all zones. This would work but I also need an MX
record and I am not allowed to create a blank CNAME and a blank MX
record in the same zone.

How can I have my MX record and still be able to make
"theirdomain.com" resolve to an alias?

Do not point an MX record to a CNAME, the MX record must point to the mail
server's host name on its A record and in its HELO name.

Example.
mydomain.com
@ MX mail.mydomain.com
mail A 123.456.123.456

theirdomain.com
@ MX mail.mydomain.com
mail CNAME mail.mydomain.com

You can add the CNAME for the users in theirdomain.com to access your mail
server using mail.theirdomain.com. This is only for client access and cannot
be used in the MX.
 
A

Ace Fekay [MVP]

In
Mike Cox said:
I am not so worried about my mail server changing, it is pretty
stable. I have a server that I run from my Brother's house and want to
move it to my house and put it on my Cable connection. The Cable
company does not provide a static IP, but they do have an FQDN for me.
SO I have an alias in one of my zones that points to this FQDN so if
the Cable company changes my IP, my cname is still good. The server
has about 20 sites and most have multiple domain names. So if the
Cable company changes the IP and I use an A record for every zone,
there will be a lot of changes to make and some downtime while I make
the changes.
My www for all zones is a cname that resolves my cable fqdn. So www
will always work for reaching the sites. I want domainname.com to
work the same way and still have an MX record for every domain that
gets mail.
If I cannot resolve this issue with DNS, I guess I will have to look
at writing a script on the mail server that redirects traffic to the
right place.

As Kevin pointed out, CNAMES and MX records can be problematic. You may need
to use a script as you pointed out to get this to work.

Also, I am surprised that your cable company is allowing you to run DNS,
mail and web services on their line. I thought that at least Comcast will
not allow this even on their business lines. Maybe yours is different.

Ace
 
M

Mike Cox

Ace said:
In


As Kevin pointed out, CNAMES and MX records can be problematic. You may
need to use a script as you pointed out to get this to work.

Also, I am surprised that your cable company is allowing you to run DNS,
mail and web services on their line. I thought that at least Comcast
will not allow this even on their business lines. Maybe yours is different.

Ace

My Cable company allows some services now, but I am not sure that I
trust them to keep their promise. I now run everything on DSL and I use
Cable as a backup line in the house. I am not going to run DNS on the
cable line because the IP is not static. If I move the server onto the
Cable, it will only be for Web hosting on port 80 and FTP on 21...
Nothing else. I am just not sure if my Cable will work well enough and
if my inexpensive router will handle it. I am going to give it a shot
but not until I have a good contingency plan in place. I use Rogers Cable.
 
A

Ace Fekay [MVP]

In
Mike Cox said:
My Cable company allows some services now, but I am not sure that I
trust them to keep their promise. I now run everything on DSL and I
use Cable as a backup line in the house. I am not going to run DNS
on the cable line because the IP is not static. If I move the server
onto the Cable, it will only be for Web hosting on port 80 and FTP on
21... Nothing else. I am just not sure if my Cable will work well enough
and if my inexpensive router will handle it. I am going to give it a shot
but not until I have a good contingency plan in place. I use Rogers
Cable.

You'll have to post in a forum asking if Rogers will allow web services.
Most cable companies I am aware of do not.

Good luck!

Ace
 
M

Mike Cox

I asked them up front when I got the line and they said no problem. I
am paying for a corporate account.
 
A

Ace Fekay [MVP]

In
Mike Cox said:
I asked them up front when I got the line and they said no problem. I
am paying for a corporate account.

Good deal. I wish Comcast would do that around here!

Ace
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MX Linux 21 5
CNAME Questions 1
mail records and cname 4
DNS Verification 2
MX-17 a very very useful Distro. 6
MX Record Question 2
Can't create CNAME Record 4
DNS and MX records problem 4

Top