Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
01-16-2011, 11:19 AM
|
#1
|
|
Member
Registered: Jul 2007
Location: Portsmouth, Hants
Distribution: Mint 13
Posts: 261
Rep:
|
MX Records / A Records / CNAME Records - Advice Please
Hi all,
I will give you a short background on what I currently have and what I am attempting to do.
So far I have a server sitting in the cupboard which does the following:
Quote:
1. Hosts a website using www.myserver.net address via apache
2. Acts as an FTP site when I enter ftp myserver.com in filezilla for example
3. Acts as an SSH server from putty for example
4. Hosts my mail using my ISP's smtp servers but using fetchmail/postfix/dovecot/spamd/freshclam etc etc
5. Able to use squirrelmail to check my mail when not at home
|
I have had this setup for over 2yrs now and its been running like a dream until my ISP has announced its shutting shop and I will have to look for a new broadband provider.
So... The story so far is, I have now been connected to my new ISP but they do not host any email. So no smtp servers to connect to.
This has now given me an idea to add to/reconfigure my existing mail server but adding a new domain name to it to use strictly only for mail.
ie
I have now got the domain registered. I have found a suitable site in the UK to host the DNS and all is happy. The only thing I am not sure about now is how to setup the mail side of things on the DNS site.
Im sure they are kinda all the same so I will have a stab at the setup and hopefully someone can correct me if I talking rubbish
Quote:
NS1 - mymail.com - Works Fine!
NS2 - mymail.com - Works Fine!
NS3 - mymail.com - Works Fine!
NS4 - mymail.com - Works Fine!
mymail.com - A record -> Static IP provided by ISP
www.mymail.com - CNAME -> mymail.com
mail.mymail.com - MX record (10)-> mymail.com
smtp.mymail.com - MX record (5) -> mymail.com
|
Any suggestions would be a great help indeed.
Thanks in advance
|
|
|
|
01-16-2011, 11:49 AM
|
#2
|
|
Member
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows xp
Posts: 776
Rep:
|
You need a . after ever fQD or otherwise it is read like this
smtp.mymail.com MX 5 mymail.com
would look something like this
smtp.mymail.com.smtp.mailmail.com.mymail.ocm.mymail.com
Be sure to add the period (.) after every FQD so it doesn't repeat it self like its meant to be a subdomain
|
|
|
|
01-16-2011, 12:04 PM
|
#3
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,391
|
Quote:
mail.mymail.com - MX record (10)-> mymail.com
smtp.mymail.com - MX record (5) -> mymail.com
|
With the above snippet, I guess you mean that the MX records for the domain mymail.com are mail.mymail.com with priority 10 and smtp.mymail.com with priority 5.
In this case you need to add the A records for the 2 hosts (mail.mymail.com, smtp.mymail.com)
Regards
|
|
|
|
01-16-2011, 12:37 PM
|
#4
|
|
Member
Registered: Jul 2007
Location: Portsmouth, Hants
Distribution: Mint 13
Posts: 261
Original Poster
Rep:
|
Hey thanks for the replies!!
JMC - All I need to do in the webpage of the DNS management company is add the names in. There is a box to enter the name in. I am guessing that the webpage will add the "." after the name is saved. It basically looks like this on the webpage:
Code:
[ mail ].mymail.com
or
[ smtp ].mymail.com
In the example above I have entered manually the word "mail" and "smtp" in the box provided and the DNS company has filled in the blanks for me.
Hope that makes sense?
bathory - Yes you are correct in your guess. I basically have the 2 MX records that point to the single A record. So I now need to create 2 extra A records for the mail and smtp hosts and point them to??? The domain name mymail.com? or the static IP? Or doesnt it really matter?
Thanks all
|
|
|
|
01-16-2011, 12:41 PM
|
#5
|
|
Member
Registered: Jul 2007
Location: Portsmouth, Hants
Distribution: Mint 13
Posts: 261
Original Poster
Rep:
|
Actually I have just tried entering in the new A records and it only lets me point to the static IP so ignore my last comment. Still learning this stuff 
|
|
|
|
01-16-2011, 12:43 PM
|
#6
|
|
Member
Registered: Jul 2007
Location: Portsmouth, Hants
Distribution: Mint 13
Posts: 261
Original Poster
Rep:
|
So this now my setup on the DNS management site:
Quote:
NS1 - mymail.com - Works Fine!
NS2 - mymail.com - Works Fine!
NS3 - mymail.com - Works Fine!
NS4 - mymail.com - Works Fine!
mymail.com - A record -> Static IP provided by ISP
mail.mymail.com - A record -> Static IP provided by ISP
smtp.mymail.com - A record -> Static IP provided by ISP
www.mymail.com - CNAME -> mymail.com
mail.mymail.com - MX record (10)-> mymail.com
smtp.mymail.com - MX record (5) -> mymail.com
|
What do you think??
|
|
|
|
01-16-2011, 12:50 PM
|
#7
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,391
|
You don't need 2 MX RRs since they both actually point to the same host. You use 2 MXs for redundancy, so if the 1st goes down, the 2nd will take over. Since you have only one public IP, it's useless.
Other than that the setup looks OK.
Regards
|
|
|
|
01-16-2011, 01:01 PM
|
#8
|
|
Member
Registered: Jul 2007
Location: Portsmouth, Hants
Distribution: Mint 13
Posts: 261
Original Poster
Rep:
|
I was under the impression that I would need the MX records as that is what transports my mail to my server once configured?
I had this picture in my head (basically):
Quote:
User sends new mail --> Mail goes to their ISP's MTA etc etc --> Flies through the internet cloud --> Looks up my DNS MX for the domain name --> Gets pointed to my IP and handshakes --> Mail comes to my server --> First part of the mail "bignose@mymail.com" gets picked up with postfix and then placed in a holding area (mailbox) for the user.
|
Can you maybe break it down for me.
Thanks
|
|
|
|
01-16-2011, 01:26 PM
|
#9
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,391
|
Maybe I didn't make myself clear. You need a MX record to define the mail server that will accept mail for your domain.
Quote:
|
I basically have the 2 MX records that point to the single A record
|
If you want to use a 2nd MX as a backup, it has to use a different IP
So the 2nd MX record in your case is useless as it points to the same host (mail.mymail.com and smtp.mymail.com are actually different hostnames for a single box listening on your unique public IP).
|
|
|
|
01-16-2011, 01:40 PM
|
#10
|
|
Member
Registered: Jul 2007
Location: Portsmouth, Hants
Distribution: Mint 13
Posts: 261
Original Poster
Rep:
|
OK so now I'm a little confused as to what to point the MX record to.
Can you advise please using the below setup I now have:
Quote:
NS1 - mymail.com - Works Fine!
NS2 - mymail.com - Works Fine!
NS3 - mymail.com - Works Fine!
NS4 - mymail.com - Works Fine!
mymail.com - A record -> Static IP provided by ISP
mail.mymail.com - A record -> Static IP provided by ISP
smtp.mymail.com - A record -> Static IP provided by ISP
www.mymail.com - CNAME -> mymail.com
|
How about :
Quote:
|
smtp.mymail.com - MX record (10) -> mymail.com
|
Sorry and thanks for your assistance
|
|
|
|
01-16-2011, 01:56 PM
|
#11
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,391
|
What I mean is that your domain should have a MX RR, but a 2nd one is useless in your case, as in practice both MXs will point to the same IP.
So the setup should look this this:
Code:
NS1 - mymail.com - Works Fine!
NS2 - mymail.com - Works Fine!
NS3 - mymail.com - Works Fine!
NS4 - mymail.com - Works Fine!
mymail.com MX record -> mail.mymail.com
mymail.com - A record -> Static IP provided by ISP
mail.mymail.com - A record -> Static IP provided by ISP
smtp.mymail.com - A record -> Static IP provided by ISP
www.mymail.com - CNAME -> mymail.com
|
|
|
|
01-17-2011, 03:25 PM
|
#12
|
|
Member
Registered: Jul 2007
Location: Portsmouth, Hants
Distribution: Mint 13
Posts: 261
Original Poster
Rep:
|
As per the website I can do the following:
Quote:
|
mail.mymail.com MX record -> mymail.com
|
But it wont let me do...
Quote:
|
mymail.com MX record -> mail.mymail.com
|
As you suggested because it has an empty box that has ".mymail.com" filled in afterwards as I said above to jmc1987. This is what it looks like:
Code:
Host:
[ ].mymail.com
Points to:
[ ]
MX Priority:
[10]
TTL:
[1 Hour]
So all I do is fill in the blanks in effect and below is a snippet of my new DNS layout. I hope this is now correct!?!
Code:
Host Type Points to
mymail.com NS ns1.cloudns.net
mymail.com NS ns2.cloudns.net
mymail.com NS ns3.cloudns.net
mymail.com NS ns4.cloudns.net
mymail.com A 81.92.143.66
mail.mymail.com A 81.92.143.66
smtp.mymail.com A 81.92.143.66
mail.mymail.com MX 10 mymail.com
www.mymail.com CNAME mymail.com
Thanks
|
|
|
|
01-17-2011, 04:55 PM
|
#13
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,391
|
It's not correct.
You should define the MX RR for the whole domain mymail.com. From the snippet posted you define mymail.com as the MX RR for the subdomain mail.mymail.com. The configuration should look like this:
Code:
mymail.com MX 10 mymail.com
Didn't use a trailing dot after mail.com because you said that it's added by the panel software. Otherwise you need a trailing dot after every FQDN
|
|
|
|
01-18-2011, 03:10 AM
|
#14
|
|
Member
Registered: Jul 2007
Location: Portsmouth, Hants
Distribution: Mint 13
Posts: 261
Original Poster
Rep:
|
Code:
It's not correct.
You should define the MX RR for the whole domain mymail.com. From the snippet posted you define mymail.com as the MX RR for the subdomain mail.mymail.com. The configuration should look like this:
Code:
Code:
mymail.com MX 10 mymail.com
Didn't use a trailing dot after mail.com because you said that it's added by the panel software. Otherwise you need a trailing dot after every FQDN
I'm sorry I posted the wrong snippet. I was mean't to post this instead but by what you have said in your last post it is still incorrect but I followed your previous advice and pointed my domain to my mail.mymail.com host.
Code:
Host Type Points to
mymail.com NS ns1.cloudns.net
mymail.com NS ns2.cloudns.net
mymail.com NS ns3.cloudns.net
mymail.com NS ns4.cloudns.net
mymail.com A 81.92.143.66
mail.mymail.com A 81.92.143.66
smtp.mymail.com A 81.92.143.66
mymail.com MX 10 mail.mymail.com
www.mymail.com CNAME mymail.com
So this is also incorrect and it should be this???
Code:
Host Type Points to
mymail.com NS ns1.cloudns.net
mymail.com NS ns2.cloudns.net
mymail.com NS ns3.cloudns.net
mymail.com NS ns4.cloudns.net
mymail.com A 81.92.143.66
mail.mymail.com A 81.92.143.66
smtp.mymail.com A 81.92.143.66
mymail.com MX 10 mymail.com
www.mymail.com CNAME mymail.com
Thanks
|
|
|
|
01-18-2011, 03:48 AM
|
#15
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,391
|
Yes the 2nd one:
Code:
Host Type Points to
mymail.com NS ns1.cloudns.net
mymail.com NS ns2.cloudns.net
mymail.com NS ns3.cloudns.net
mymail.com NS ns4.cloudns.net
mymail.com A 81.92.143.66
mail.mymail.com A 81.92.143.66
smtp.mymail.com A 81.92.143.66
mymail.com MX 10 mymail.com
www.mymail.com CNAME mymail.com
is ok.
You have define a MX RR (mymail.com) for your domain and the MX host has an A RR.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:51 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|