Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
IN NS NS01.EXAMPLE.COM.
IN NS NS02.EXAMPLE.COM.
IN NS NS03.EXAMPLE.COM.
IN MX 10 eplace.example.com.
IN A 69.69.69.69
eplace IN A 69.69.69.69
I don't think it worked but I could be wrong my current setup with an mx record in front of the fully qualified domain does work successfully. My reasoning behind this was I was told to just make the mx record point to eplace.example.com rather than mx.eplace.example.com so when people do a dig they will see only eplace.example.com for the mx record rather than mx.eplace.example.com. Is this possible or does the mx need to be in front of the eplace.example.com in order to point to a host.
Thanks
Last edited by keysorsoze; 01-13-2008 at 03:00 PM.
Your proposed change should work fine; your original setup should not work, based solely on the information here. The first zone file requires a host mx.eplace.example.com, and there is no record for such a host in what you have supplied. The proposed zone file requires only eplace.example.com, and you have an A record for that host.
So the following zone file will not work if I understand you correctly. The reason because "eplace.example.com" is the fqdn and without a host record in front of it such as mail, mx, mailhost etc.... and mapping to an IP address to simply "eplace.example.com" will simply not work. We can not simply create a A record map to eplace that points to a physical host for mail.
You misunderstood--sorry if I wasn't clear enough. That zone file will work fine.
Since this is the zone file for example.com, the MX record:
IN MX 10 eplace.example.com.
defines the mail exchanger for the zone example.com. That host is eplace.example.com. You then create an A record that allows that host name to be resolved to an IP address:
eplace IN A 69.69.69.69
Together, you have said that the mail exchanger for example.com is eplace.example.com, and the IP address for eplace.example.com is 69.69.69.69. Provided the host at 69.69.69.69 will accept mail and route it properly for example.com, all should be just fine.
Zaichik, actually this is where my confusion comes in because the zone is not example.com its actually a subdomain of example.com so we have "eplace.example.com" will these rules still apply, if it is a sub-domain? What I am trying to get at is why the previous administrator used an mx.eplace.example.com rather than just placing creating a simple a record pointing to eplace.example.com. Users will have an email address of someone@eplace.example.com. Will this work?
Thanks for all the help and sorry if I am confused.
Last edited by keysorsoze; 01-13-2008 at 03:56 PM.
I see now. You are trying to define the MX record for the subdomain eplace.example.com where users have the address someuser@eplace.example.com. In that case, it was still not quite correct, as nowhere was it indicated that the MX record was for eplace.example.com--based on what was there, the MX record was being defined for just example.com.
Either of these should work:
Code:
@ IN SOA EXAMPLE.COM. ROOT.EXAMPLE.COM. (
2007081500 ; serial
150 ; refresh
900 ; retry
2592000 ; expire
150 ) ; minimum
IN NS NS01.EXAMPLE.COM.
IN NS NS02.EXAMPLE.COM.
IN NS NS03.EXAMPLE.COM.
; Here's the MX for just example.com
IN MX 10 mx.example.com.
IN A 69.69.69.69
mx IN A 69.69.69.69
eplace IN A 69.69.69.69
$ORIGIN eplace.example.com.
; And here's the MX for the subdomain eplace.example.com
IN MX 10 eplace.example.com.
Code:
@ IN SOA EXAMPLE.COM. ROOT.EXAMPLE.COM. (
2007081500 ; serial
150 ; refresh
900 ; retry
2592000 ; expire
150 ) ; minimum
IN NS NS01.EXAMPLE.COM.
IN NS NS02.EXAMPLE.COM.
IN NS NS03.EXAMPLE.COM.
; Here's the MX for just example.com
IN MX 10 mx.example.com.
IN A 69.69.69.69
mx IN A 69.69.69.69
eplace IN A 69.69.69.69
; And here's the MX for the subdomain eplace.example.com
eplace IN MX 10 eplace.example.com.
As far as I know, there is no requirement in the RFCs to have an additional host part in addition to a FQDN. So, while I have never done it,
IN MX 10 mydomain.com.
should be a perfectly acceptable MX for mydomain.com, and sub.mydomain.com should work fine for sub.mydomain.com (see the examples in RFC 974, e.g.). So eplace.example.com should work fine for an MX for eplace.example.com. The previous admin just prepended mx onto the host name, perhaps for clarity.
Oh, and another reason he might have had mx.eplace.example.com is that the actual host name of the host 69.69.69.69 was mx.eplace.example.com. It's always best if the MX record for a domain reflects the actual host name of the host, and that host uses its host name in the HELO, and there is a PTR record pointing the IP address to the host name. If the mail exchanger for eplace.example.com is really mx.eplace.example.com, it would be best to reflect that in the MX record.
I have not tried the example shown above (it looks like it may work).
When it comes to sub domains, I have always added a delegation record to the top level domain zone file and then created a separate zone file (SOA) for each sub domain.
EXAMPLE:
In example.com zone file, add a delegation record (NS):
Code:
eplace IN NS NS01.EXAMPLE.COM.
In the /etc/named.conf on ns01.example.com, add something like:
Code:
zone "eplace.example.com" in {
type master;
file "db.eplace";
};
Now that there is a delegation record in example.com, you now have a separate Start of Authority for eplace.example.com. Just create a the zone file for eplace and add SOA, NS, A and MX records to this zone file. The structure of a sub domain zone file is no different than the upper level zone file (example.com)
NOTE: In my example, I am pointing the delegation (SOA) for eplace to the same name server for example.com. I could have delegated the sub domain SOA to another name server like ns1.linux.com. Then in the named.conf file on ns1.linux.com, you would load eplace.example.com zone file.
IN NS NS01.EXAMPLE.COM.
IN NS NS02.EXAMPLE.COM.
IN NS NS03.EXAMPLE.COM.
IN MX 10 eplace.example.com.
IN A 69.69.69.69
eplace IN A 69.69.69.69
after the zone transferred to all our slaves I started sending messages to someone@eplace.example.com and success it works. I finally cleared up the confusion with the mx. I always thought there needed to be a host that mx record's needed to point to.
Based on the above DNS records, you have not created a sub-domain. You are simply sending an e-mail to the A record eplace.example.com. The MX record will not used by the sending MTA since there is no MX definition for what you refer to in your post as sub-domain eplace.example.com. MTA's (like sendmail) will send directly to the A record (host record).
If this was your goal, then you will not have any problems, but e-mail is being sent to the A record for eplace. The same mail server will be used for both example.com and eplace.example.com. Not very scalable, but it will work.
Thanks for pointing this out, once I got into work today my boss pulled me over and basically explained the same thing to me, stating this was a redundant directive in the zone file and he suggested just putting the mx record used in the parent domain which is mailgw.example.com. We proceeded and removed the a record definition and it worked just was well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.