User Tools

Site Tools


networking:dns:use_reverse_dns_for_mail_delivery

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.

  1. Setup Reverse IP for your mail server with PTR in DNS (needs Dedicated IP)
  2. Setup SPF Record in your DNS
  3. 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.

networking/dns/use_reverse_dns_for_mail_delivery.txt · Last modified: 2021/01/10 21:16 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki