Table of Contents
Networking - DNS - Use Reverse DNS for Mail Delivery
For proper mail delivery, the following anti-spam methos are very important to make sure the email is delivered to users inbox. Most public email service providers yahoo, hotmail and gmail do use these parameters to flag email is spam or not.
- Setup Reverse IP for your mail server with PTR in DNS (needs Dedicated IP)
- Setup SPF Record in your DNS
- Setup Domain Keys
If you use a shared hosting plan, most emails do land up in spam/bulk folder in the users inbox. So use a dedicated server.
Set up reverse IPs for Mailserver IPs
In order to setup reverse IP, first you will need to place a request to your hosting provider (since they own IP address) and ask them to setup a reverse IP to your mail server. Once that is done you have to place a line using PTR in your domain zone file.
To test reverse IP lookup:
host <ip-address>
will show the output of reverse dns.
Set up SPF record
SPF record is setup using TXT record in your dns zone file. It looks like what is shown below. Visit http://openspf.org for more information about setup and configuration.
domain.com. IN TXT "v=spf1 a mx ip4:11.33.55.77 -all"
To query SPF record using dig:
dig domain.com TXT
Domain Keys
It basically contains 2 records (with and without selector) placed under TXT using underscore along with generated public key.
The ’sel’ is a selector and can be selector name.