<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br>HHmmm....<br><br>Maybe I'm not understanding this, we have two domains. inksystems.com and inksystemsinc.com They both point to the same IP address using A records, and point to the same MX records as well. <br><br>The web server, does not, but can destingwish based on the domain name (Apache), and for email, it is simply a matter of changing the sendmail configuration to forward all domain A to domain B by using the alias files. I'm sure exchange has that same kind of feature. Where the SMTP portion can simply forward (relay) other domains to the primary email domain. <br><br>I'm not sure what the point of the CNAME is in that case since you can point everything to the same records and have the server software do the parsing? <br><br>I'm a nooooob too, so maybe I'm missing something :)<br><br><br><br><div><hr id="stopSpelling">Date: Sun, 7 Aug 2011 14:08:07 -0400<br>From: dmiller@tiggee.com<br>To: bind-users@lists.isc.org<br>Subject: Re: CNAME / MX Record question<br><br>
  
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
    
  
  
    On 8/7/2011 9:05 AM, Scott Hughes wrote:
    <blockquote cite="mid:CANJopPB0sa6AhabXsHTkW70YcM8roqy11ZZ3o+rL3Tzqk_XVjQ@mail.gmail.com">All,
      <div><br>
      </div>
      <div>I have Googled and searched the archives for two days and
        cannot find an answer to this question... just more confusion!
         Please forgive me ahead of time as I run two name servers for
        my mid-sized company and am by no means an expert in using bind
        DNS. We have about eight domains but don't have a lot of records
        for each zone.  Here is my issue:</div>
      <div><br>
      </div>
      <div>We are moving to a two Exchange server / two data center
        model for auto-failover reasons. Both data centers are in to
        different locations and have multiple internet pipes and tier 1
        providers coming into their data centers.</div>
      <div><br>
      </div>
      <div>Here is what I'm trying to do:</div>
      <div><br>
      </div>
      <div>For example, our email domain name on the Exchange servers
        is: <a href="http://mail.blahblah.us" target="_blank">mail.blahblah.us</a>
           Our spam filtering device is: <a href="http://spam.blahblah.us" target="_blank">spam.blahblah.us</a> and is the
        MX record.  In the <a href="http://blahblah.us" target="_blank">blahblah.us</a> zone file I have A
        records pointing to both correctly.</div>
      <div><br>
      </div>
      <div>Our problem comes in on our other domains. I am trying to
        point <a href="http://mail.company1.com" target="_blank">mail.company1.com</a>
        to <a href="http://mail.blahblah.us" target="_blank">mail.blahblah.us</a>
        and <a href="http://spam.company1.com" target="_blank">spam.company1.com</a>
        to <a href="http://spam.blahblah.us" target="_blank">spam.blahblah.us</a>
        using CNAME records.  I'm obviously doing this wrong or trying
        to do something that can't or shouldn't be done.  Like I said, I
        am fairly new to bind9 but I'd sure rather use it than something
        link MS DNS servers!</div>
      <div><br>
      </div>
      <div>What I am attempting to do is make it so that if an outside
        email server or inside user goes to <a href="http://mail.company1.com" target="_blank">mail.company1.com</a>  or  <a href="http://spam.company1.com" target="_blank">spam.company1.com</a>
        they are 'redirected' to the <a href="http://blahblah.us" target="_blank">blahblah.us</a> domain where our UCC
        cert covers both of the Exchange servers.</div>
      <div><br>
      </div>
      <div>Please let me know if I've left anything out that would be
        helpful in answering these questions.</div>
      <div><br>
      </div>
      <br>
    </blockquote>
    <br>
    blahblah.us and company1.com are actual registered domain names.  If
    they are registered to you, then using these domains in examples is
    fine... if not, then better to use RFC2606 names...<br>
    <br>
    If I understand your environment correctly:<br>
    <br>
    Your "main domain" - example.com - looks (in part) like this:<br>
    <br>
    // Begin example.com<br>
    <pre>$TTL 86400

@       IN      SOA     ns1.example.com.      contact.example.com. (
                        2011080701      ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
                        )

                NS      ns1.example.com. 
                NS      ns2.example.com. 

                MX      10 spam.example.com.
                MX      20 spam2.example.com.

$ORIGIN example.com.

spam    IN      A       192.0.2.25 
spam2   IN      A       192.0.2.26 
mail    IN      A       192.0.2.30 </pre>
    // End example.com<br>
    <br>
    There is no reason that example.net (another of your domains) can't
    look like this:<br>
    <br>
    // Begin example.net<br>
    <pre>$TTL 86400

@       IN      SOA     ns1.example.com.      contact.example.net. (
                        2011080701      ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
                        )

                NS      ns1.example.com. 
                NS      ns2.example.com. 

                MX      10 spam.example.com.
                MX      20 spam2.example.com.

$ORIGIN example.net.

// End example.net

</pre>
    ^^^ MX records in example.net point to example.com hosts (which are
    A records).<br>
    <br>
    If you have a 'requirement' that the users for example.net configure
    their mail clients with example.net mail server hostnames, then you
    can create a CNAME record in example.net that aliases
    mail.example.net to mail.example.com.<br>
    <br>
    If, however, you have a 'requirement' to make it 'seem' that
    example.com and example.net have 'independent' mail servers at a DNS
    level - i.e. you want to use MX records in example.net that are in
    example.net, then you need to add A records for spam & spam2 in
    example.net that point to the IP addresses of these hosts (and you
    need to do this for all domains 'like' example.net as well -and-
    update the A records in all of these domains if the IP addresses of
    these hosts change in the future... c'est la DNS).  Like so:<br>
    <br>
    // Begin example.com<br>
    <pre>$TTL 86400

@       IN      SOA     ns1.example.com.      contact.example.com. (
                        2011080701      ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
                        )

                NS      ns1.example.com. 
                NS      ns2.example.com. 

                MX      10 spam.example.com.
                MX      20 spam2.example.com.

$ORIGIN example.com.

spam    IN      A       192.0.2.25 
spam2   IN      A       192.0.2.26 
mail    IN      A       192.0.2.30 </pre>
    // End example.com<br>
    <br>
    // Begin example.net<br>
    <pre>$TTL 86400

@       IN      SOA     ns1.example.com.      contact.example.net. (
                        2011080701      ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
                        )

                NS      ns1.example.com. 
                NS      ns2.example.com. 

                MX      10 spam.example.net.
                MX      20 spam2.example.net.

$ORIGIN example.net.

spam    IN      A       192.0.2.25 
spam2   IN      A       192.0.2.26 
mail    IN      CNAME   mail.example.com. </pre>
    // End example.net<br>
    <br>
    // Begin example.org<br>
    <pre>$TTL 86400

@       IN      SOA     ns1.example.com.      contact.example.org. (
                        2011080701      ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
                        )

                NS      ns1.example.com. 
                NS      ns2.example.com. 

                MX      10 spam.example.org.
                MX      20 spam2.example.org.


$ORIGIN example.org.

spam    IN      A       192.0.2.25 
spam2   IN      A       192.0.2.26 
mail    IN      CNAME   mail.example.com.</pre>
    // End example.org<br>
    <br>
    <br>
    <br>
    HTH,<br>
    <br>
    -DMM<br>
    <br>
    <br>
  

<br>_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users</div>                                     </div></body>
</html>