mail records and cname

  • Thread starter Thread starter LC
  • Start date Start date
L

LC

I have the following...

domain1.com (which I don't own) set to cname domainA.com (which I own). This
is so when I go to domain1.com in my browser, I actually view the page
hosted on domainA.com that resides on my server.

My question is...

Can I create a host record mail.domainA.com and MX record on domainA.com and
expect to receive emails sent to (e-mail address removed) to arrive at
mail.domainA.com due to the cname translation? I'm not sure if this is
allowed usage for cname.

Thanks for the help
 
In
LC said:
I have the following...

domain1.com (which I don't own) set to cname domainA.com
(which I own). This is so when I go to domain1.com in my
browser, I actually view the page hosted on domainA.com
that resides on my server.

My question is...

Can I create a host record mail.domainA.com and MX record
on domainA.com and expect to receive emails sent to
(e-mail address removed) to arrive at mail.domainA.com due to the
cname translation? I'm not sure if this is allowed usage
for cname.

Your mail server will have to handle this. DNS can publish an MX record in
domainA.com and domain1.com going to the same mail server. You would simply
create an MX record in domainA.com with mail.domain1.com listed as its SMTP
server. DNS could not do what you want, if the mail goes to (e-mail address removed)
the sending server will look up the MX record for domain1.com and send it to
that server. It would have to be up to the receiving server to direct it to
the mail box of your choice, just about any mail server can do this.
 
I have the following...

domain1.com (which I don't own) set to cname domainA.com (which I own). This
is so when I go to domain1.com in my browser, I actually view the page
hosted on domainA.com that resides on my server.

My question is...

Can I create a host record mail.domainA.com and MX record on domainA.com and
expect to receive emails sent to (e-mail address removed) to arrive at
mail.domainA.com due to the cname translation? I'm not sure if this is
allowed usage for cname.

No (well, it's not supposed to but you may luck out in some instances,
at best it would probably still trigger spam filters and the like).
You'd need a MX record in domain1.com to handle the mail exchange.
But it could be a MX record that points to mail.domainA.com, assuming
the SMTP server was set up to accept the mail.

Jeff
 
L> I have the following...
L> domain1.com (which I don't own) set to cname domainA.com

You have something that won't work. A domain name cannot be both a
delegation point and a client-side alias simultaneously. At most, it
can be either one or the other. Correct your data so that the domain
name is only a delegation point. If you want it to map to the same IP
address as another domain name does, put that mapping in explicitly,
using a server-side alias if possible. Don't try to use a client-side
alias.

L> Can I create a host record mail.domainA.com and MX record on
L> domainA.com and expect to receive emails sent to (e-mail address removed) to
L> arrive at mail.domainA.com due to the cname translation?

If the domain name were a client-side alias and not a delegation point

example.com. IN NS 86400 a.ns.example.com.
sub.example.com. IN CNAME 86400 example.net.
example.net. IN MX 86400 a.mx.example.net.
example.net. IN NS 86400 a.ns.example.net.
a.mx.example.net. IN AAAA 86400 2001:0DB8::1

then it would work. Mail to <[email protected]> would be received by
the SMTP Relay server at 2001:0DB8::1 (which would, of course, have to
be configured to recognise <*@sub.example.com> mailbox names as well as
<*@example.net> mailbox names). If you had configured server-side
aliasing (such as aliasing the two "zones" together by having them
compiled from a single source file)

$ORIGIN example.com.

@ IN MX 86400 a.mx
a.mx IN AAAA 86400 2001:0DB8::1

$ORIGIN example.net.

@ IN MX 86400 a.mx
a.mx IN AAAA 86400 2001:0DB8::1

then the same would be true. Mail to <[email protected]> would be
received by the SMTP Relay server at 2001:0DB8::1 (which would, of
course, have to be configured to recognise <*@example.com> mailbox names
as well as <*@example.net> mailbox names).

But you've tried to make a domain name into both a client-side alias and
delegation point simultaneously; and so nothing will work.
 
You can do a horrible ugly work around potentially. If you do not specify
any MX record in a DNS zone file and have the zone pointing to an A record
all mail will be directed to that A record. So you can change your
domain1.com cname to an A record to your mail server's IP address. If you
need website redirection do a www.domain1.com cname to www.domainA.com.

Some reading for you:
http://www.faqs.org/rfcs/rfc2821.html
RFC2821 Section "5. Address Resolution and Mail Handling" Paragraph 1 (which
obsoletes RFC 974 but is still a Proposed Standard) specifies basically the
same idea:
"If no MX records are found, but an A RR is found, the A RR is treated as
if it was associated with an implicit MX RR, with a preference of 0,
pointing to that host."

Some DNS implementation do not support this so it may not work in every case
but it seems to work for many of the mis-configured zones I have seen out
there. There are far better ways of doing this if you can work with the
owner of the other domain. If not, give that a shot.

Regards,
Ed Horley
Microsoft MVP Server-Networking
 
Back
Top