Link to home
Start Free TrialLog in
Avatar of garry_m
garry_m

asked on

MX records for mail server

I'm pretty new to DNS, so please bear with me.  I've just bought a VPS package for hosting a couple of websites.  I've found that my server comes with MailEnable mail server, so I would like to manage the mail for the websites too.

I want to ensure my DNS information has been set up correctly.  I have set up the following domains and DNS information:

Type - Domain - Type - Target

A - mydomain.com - 1.2.3.4
A - mydomain.co.uk - 1.2.3.4
MX - mydomain.com - mail.mydomain.co.uk
MX - mydomain.co.uk - mail.mydomain.co.uk
A - mail.mydomain.co.uk - 1.2.3.4

Reverse DNS for 1.2.3.4

1.2.3.4      servername.mydomain.co.uk

My question is, for my mail server to work correctly, do I need to change the PTR record servername.mydomain.co.uk to be mail.mydomain.co.uk?  Or do I need to create an A record for IP 1.2.3.4 to point to servername.mydomain.co.uk?  Does this general setup look solid or seeing as though I am using the .co.uk domain as the main one, should hte .com be a CNAME to the .co.uk version?

Thanks very much for your help.

ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of briandunkle
briandunkle

PTR records are for reverse lookup, A for forward lookup, so if you tried to do an A record for 1.2.3.4 it would choke; you can only have one PTR record per IP.

One question is why do you even need the MX records if it's all on the same server? Or are the 1.2.3.4 different in the actual entries? i.e. is this all one box?

If it's a different box, put in a reverse for the mail server, send things out as that server, all is good.
If it's the same box, just send mail out as that box, and the MX records will pretty much not matter.
the "you can have only one" was in case you thought of putting 1.2.3.4 as going mail.whatever also.

I would still strongly advise adding MX Records, even if it's for no other reason than clarity.

Chris
Avatar of garry_m

ASKER

Thanks very much, i've set up the mail server to use the same name as the PTR record and all works perfectly.
Avatar of garry_m

ASKER

Sorry I forgot to ask previously, would it be wise/good practice to have the PTR record for my server to be mail.mydomain.co.uk?  Even though it is a web server too?

Nothing on the web server side will care about the PTR record. It's more important to have it set correctly for mail if that's what the server is used for.

Chris