LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-13-2008, 02:50 PM   #1
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Rep: Reputation: 30
A record required for MX record?


Hello,

I have a question regarding DNS and MX records. Our current zone file looks like the following:

@ 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.

IN MX 10 mx.eplace.example.com.

IN A 69.69.69.69
mx IN A 69.69.69.69



My question is could it be possible to remove the mx A record and just replace it with it with an A record for eplace would this work?


@ 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.

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.
 
Old 01-13-2008, 03:16 PM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
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.
 
Old 01-13-2008, 03:28 PM   #3
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Thanks zaichik,

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.

@ 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.

IN MX 10 eplace.example.com.

IN A 69.69.69.69
eplace IN A 69.69.69.69

Last edited by keysorsoze; 01-13-2008 at 03:29 PM.
 
Old 01-13-2008, 03:42 PM   #4
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
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.
 
Old 01-13-2008, 03:46 PM   #5
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
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.
 
Old 01-13-2008, 06:24 PM   #6
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
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.
 
Old 01-13-2008, 06:29 PM   #7
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
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.
 
Old 01-13-2008, 08:27 PM   #8
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
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.
 
Old 01-13-2008, 09:10 PM   #9
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Thanks guys, I took your advice and updated our name servers to the following

@ 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.

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.

Thanks for all the help.
 
Old 01-14-2008, 07:32 AM   #10
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Quote:
IN MX 10 eplace.example.com.

IN A 69.69.69.69
eplace IN A 69.69.69.69
In the above quote, you have:

1) defined an MX record for the domain example.com. It points to the A record eplace.example.com

2) defined an A record for the domain example.com

3) defined an A record for eplace.example.com

Quote:
after the zone transferred to all our slaves I started sending messages to someone@eplace.example.com
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.
 
Old 01-14-2008, 05:49 PM   #11
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Scowles,

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.

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating A record and PTR record daemonkl *BSD 3 10-03-2007 04:50 PM
Unable to record mic-in with SoundBlaster Live! while able to record other sources max76230 Linux - Newbie 2 03-14-2005 04:31 AM
record tv tochkopf Linux - Software 2 03-16-2004 01:00 PM
what goes in the mx record? ziggie216 Linux - General 1 11-14-2003 03:50 PM
MX Record minor Linux - General 3 07-23-2001 06:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration