How should I set up the PTR Record

domain-name-systemptr-recordspam

I am trying to properly set up my ptr record as I have noticed that some email notifications sent from my website have gone to spam for certian people, and I am having trouble figuring out exactly what it should point to.

My website is example.com, which is a service that frequently sends out email notifications etc. My website lives on a specific dedicated IP address, let's call it 1.1.1.1. In addition to sending email notifications, all of my employees have @example.com email addresses, we use google apps for this.

I have created an SPF record for my domain, which basically authorizes, google's mail servers to send email, as well as my web server, which lives on 1.1.1.1. However, I am unclear as to how to set up the PTR record.

It is MUCH more important for me that the notifications from my website are not flagged as spam vs. the emails that are sent by my employees through google apps.

Should I simply set up an a record in my DNS called ptr? And point ptr.example.com to 1.1.1.1, and then create a ptr record for 1.1.1.1 and point that to ptr.example.com?

Thanks in advance.

Best Answer

It does not matter what domain you're sending e-mail for. Explicitly, it does not matter what your employee's e-mail addresses are, it does not matter if they're joe@eample.com. I need to make that point 100% clear because everyone assumes it has something to do with this.

Now, your e-mail server has a hostname. For many companies it something like mail.example.com. This is what matters in regards to the PTR record. DNS for the mail server must match forward, backward, and with regards to the SMTP communications.

That means:

  1. Your forward host name must resolve to the correct IP.
    mail.example.com must resolve to 1.1.1.1
  2. Your reverse pointer must resolve to the correct host name.
    1.1.1.1 must point to mail.example.com
  3. When your server connects to another server, it must connect from IP 1.1.1.1 and announce itself as mail.example.com (the HELO or EHLO message).

If you have more than one server they each get their own host name (eg mail1.example.com and mail2.example.com), and the above has to be true for each server.