: Configuring an MX record for Amazon's Route 53 I am using Amazon Route 53 and have a correctly functioning A record pointing to an EC2 instance at mydomain.com.au with a Django stack running.
I am using Amazon Route 53 and have a correctly functioning A record pointing to an EC2 instance at mydomain.com.au with a Django stack running.
My problem is, I tried to setup a Postfix mailserver but I could not receive mail, so I figured my problem is with the MX record (since local mail worked).
This is what I have got for my MX record and just wanted to confirm if it is correct, or if it's nonsense:
(Settings as per AWS interface)
Name: left it blank (mydomain.com.au)
Value: 10 titan.mydomain.com.au
I have used "titan" because it's the hostname of my server - should I use "mail" instead? I keep seeing this on the web but can't find an explanation of if it's arbitrary.
I want the e-mails to work such that user@mydomain.com.au gets delivered to the server.
I have looked at this question and this one too, but didn't find an answer in them.
More posts by @Candy875
2 Comments
Sorted by latest first Latest Oldest Best
I'm afraid I couldn't help you with the complications of setting up a Postfix mailserver, however with regards to your questions about the DNS records:
The MX record you have created looks fine, provided that you have checked that (a) you have no other MX records with a priority less than 10, and (b) you have definately also got an A record setup for titan.mydomain.com.au.
MX records at the top domain level (i.e. not for subdomains) are first checked for where to deliver mail to for email addresses ending in @mydomain .com.au, and if no MX records are present sometimes a mailserver will check to see if there is a working mailserver behind the A record that will receive messages (note: not all mailservers will try this).
Since MX records are specified as domains and not IP addresses, they always rely upon an A record existing for the domain specified, and so often this is where people would create a mail.mydomain.com.au A record behind the mydomain.com.au MX record since although even if both initially may point to the same IP address, this means that should any circumstances change the IP address for the mailserver or the IP address for the website could be changed independently without affecting the other. It's also relatively common for larger websites to have multiple A records for load balancing/resilience however each webserver would not necessarily provide any mail services and so this separation can be considered best practice. If the same A record is shared for both the website and the mailserver (e.g. by using an MX record of just mydomain.com.au) then often downtime to one service or the other results when any changes are made.
If you had setup an MX record for mail.mydomain.com.au for example then this would be checked only for identifying the mailserver to receive messages sent to youralias@mail.mydomain.com.au, which provides a capability to have different mailservers behind different subdomains.
To test if your email server is working correctly I would recommend you try the MX Lookup and follow-on Mailserver Test tools at mxtoolbox.com.
I generally set up a sub-domain name, though it is not necessary. The sub-domain name does not matter. I use mail, but titan is perfectly fine. You want to either set up your sub-domain name using either a CNAME pointing to mydomain.com.au or as an A record just like mydomain.com.au. Either way you chose, it does not matter. Next you would set up a MX record to point to titan.mydomain.com.au just like you probably have already. The numeric value does not matter when you have only one MX record.
Now, before we get too far, you will need an SMTP gateway. I am not sure about your install, but for most Postfix users, they use Dovecot which can handle POP and SMTP. It may be that one is already installed. It may not be Dovecot. You may need to check.
I mentioned this because if it appears that your DNS records are set right, then that would be the next thing I would check for and configure. You can test this by opening up a telnet session to port 25. You should see an MTA announcement. Test this using both the titan.mydomain.com.au and then the IP address with a little time in between. If you do not see the announcement, test the domain name resolution by pinging your server using titan.mydomain.com.au. If the ping works, then you have a gateway issue and that is another question. ;-)
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.