How to set PTR-records for mail server? (Bind9 & Webmin)

11,243

Solution 1

First of all: A PTR record is most often set by your ISP. Probably nothing you can set yourself. It a record under your IP number not your domain name. Contact your ISP and ask them to set up the PTR record.

You should also look up SPF records and DKIM. If you are experiencing that sent mails end up in the trash can!

Some good reading on the subject: http://www.allaboutspam.com

Some other reading on PTR records: http://www.itworld.com/networking/362601/how-setup-reverse-dns-and-ptr-records

EDIT

The PTR record should point to the domain name sending the mail. for example: if you are sending mail from [email protected] the PTR record should point to example.com

Solution 2

For DigitalOcean you would need to set the droplet name the same as the domain name and the PTR will be configured automatically

Reverse DNS (PTR) records are automatically created based on the name that you give your droplet in the Control Panel. If you want to rename a droplet, go to its page in the Control Panel, click directly on the existing Droplet name, and enter a new name there.

There are two things to keep in mind. That new name has to be a fully-qualified domain name - that means that "example.com" will generate a valid PTR record, but a name like "my-ubuntu-droplet" will not generate a PTR record. Also, if you're using IPv6 on your droplet, a PTR record will only be generated for the first IPv6 address assigned to the droplet, not all 16 IPv6 addresses which are available to the droplet.

Share:
11,243
user3378380
Author by

user3378380

Updated on June 04, 2022

Comments

  • user3378380
    user3378380 almost 2 years

    I have dedicated Ubuntu LAMP-server with Bind9, Webmin and Mail server.

    My IP:
    12.345.678.900
    My host: (domain is pointed to this as 1. nameserver)
    ns999999.ip-12-345-678.eu
    My domain:
    www.examp.le
    My second nameserver:
    ns.nameserver.com

    I have successfully set master (Forward zone) record to Bind like that:

    examp.le.   IN  SOA ns999999.ip-12-345-678.eu. webmaster.examp.le. (
            1394802155
            10800
            3600
            604800
            38400 )
    examp.le.   IN  NS  ns999999.ip-12-345-678.eu.
    examp.le.   IN  MX  10 mail.examp.le.
    examp.le.   IN  NS  ns.nameserver.com.
    examp.le.   IN  A   12.345.678.900
    *.examp.le. IN  A   12.345.678.900
    

    That zone is working and when I put examp.le to my browser it works. I have mail server running in the same server in host mail.examp.le. I have had some problems with sending and receiving mail and I think that one reason is the PTR-record. I mean I don't have any PTR-records. Also some public DNS-tests say: "THERE ARE NO PTR RECORDS FOR YOUR MAIL SERVER 'mail.examp.le' IN 'ns999999.ip-12-345-678.eu'"

    My problem is that I don't know how to set those PTR records for mail.examp.le. I have tried to google many hours and so on but I can't set it.

    Thank you very much for your help.

  • user3378380
    user3378380 about 10 years
    Thank you! Actually I have in my ISP control panel a tool for that. I can set "Reverse for my IP". Should I reverse it to "ns999999.ip-12-345-678.eu" or "www.examp.le"? Btw it's still showing me the same error only with different host. :(
  • Philip G
    Philip G about 10 years
    www.examp.le IF thats the domain name you are sending your mail from!