0

I have a A record for example.com mapped to an ec2 linux instance binded to an elastic ip where I run an apache webserver and where I want to run the sendmail mail server too.

I have currently set the MX record to example.com which is not good practice I believe.

I want to do the right thing and have the MX record as mail.example.com or smtp.example.com

If I change my MX record what will map the mail. part?

What do I have to do so that mail.example.com means actually example.com:25 Is there a host file on my server that I must set?

2 Answers 2

5

I have currently set the MX record to example.com which is not good practice I believe.

You're wrong. You can set the MX record to whatever you want as long as there's an SMTP server there that's willing to accept mail for your domain.


I want to do the right thing and have the MX record as mail.example.com or smtp.example.com

You can certainly do that if it makes you happy. It's no more "right" or "wrong" though.


If I change my MX record what will map the mail. part?

You need to create a DNS entry for mail.example.com.
Best practices dictate that this should be an A (or AAAA) record.


What do I have to do so that mail.example.com means actually example.com:25

DNS and MX records have ABSOLUTELY NOTHING TO DO WITH PORT NUMBERS.
An MX record simply says "when sending mail to this domain (example.com) talk to this server (mail.example.com). The MTA sending the message decides what port to use.

1
  • Okay, so if I keep thing that way which is not a bad idea afaiu, I could still connect to my sendmail client on example.com using the mail.example.com address? Jun 3, 2013 at 17:49
1

Just creat an A record for mail.example.com, point to IP address of example.com, i.e:

example.com      --> 1.2.3.4
mail.example.com --> 1.2.3.4

Then creat a MX record which point to mail.example.com. All work will be fine.

1
  • create a A record for mail.example.com ? I have doubt about that. Jun 3, 2013 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .