Reverse DNS

Discussion in 'Server Operation' started by joel_griego, Apr 17, 2010.

  1. joel_griego

    joel_griego New Member

    Hi Guys!

    I just followed the virtual users virtual domains postfix guide. Im just wondering, for example: i have the following configuration:

    IP Address: 192.168.10.10
    Domains: 1. example1.com
    2. example2.com
    3. example3.com

    I only have one IP address for the three domains. Is it possible to have multiple reverse record for a single IP? Because reverse DNS is really important for an email server.
     
  2. zetnsh

    zetnsh New Member

    This has been a question I've had for years, but I've come to the conclusion that the answer is "no", it seems a PTR record can only map back to a single host.

    If you're in the webhosting business, your usual reason for wanting to do this is because you are setting the primary MX record of the domain in question (eg. mydomain.com) to mail.mydomain.com which often makes migrating it easier later. Unless you have lots of IP addresses to spare, you are generally going to be stuck with a single IP address for your mailserver, and for a mailserver it's really important that reverse and forward DNS match. I just set up the Reverse DNS to something specific to my business, eg. mail.businessname.com, make sure the PTR record for it's IP matches that, and set that as the primary MX for all your domains.

    One last thing though, the example you quoted is on a private subnet, so you possibly have lots of IPs to play with, so you could perhaps add some extra IPs and have them reverse map properly. But I suspect it's WAN IPs that count here!

    Thanks,

    Neil
     
  3. joel_griego

    joel_griego New Member

    Thank you very much sir. Actually that IP address is really public IP address. I just put private IP address for an example. So its not really possible to have multiple reverse record for a single IP address. Thank you very much again Mr. Neil.
     
  4. matty

    matty Member

    The forward and reverse dns entries of your mail server don't necessarily have to have anything to do with the domains the server handles mail for. They just have to match each other. The main stickler is that your mail server should announce itself as whatever you set the forward name to.

    For example, if you handle mail for domain1.com, domain2.net, & domain3.org, the DNS for the server itself can be mail.domain999.biz, with a matching reverse record. When your server sends mail, it should announce itself as mail.domain999.biz to the remote server/s. Set that in the postfix/sendmail/exim/qmail/whatever config.

    Hope that clears the muddy waters a little.
     
  5. joel_griego

    joel_griego New Member

    No what i meant is not for the domain but for the reverse record which is provided by the ISP which is the owner of the IP Address. i mean about the hostname of the server. because for example, the hostname of the mail server is mail.example.com and its ip address 222.212.21.20, the ip address 222.212.21.20 should reverse only to mail.example.com with Top Level Domain: example.com. Im asking if the 222.212.21.20 can reverse to many hostnames and Top Level domains? Because if im using one IP address for server with multiple domains and users.
     
  6. matty

    matty Member

    Technically, yes. But it's not the solution you are looking for. What will happen is the DNS server will return each in turn in a round robin fashion. It's best practice to simply have one PTR record for each IP, and it should be the match for the A record.

    Yep. What I was trying to point out is you can handle as many domains and users with one IP as your hardware can cope with. To make things happy with other admins' anti-spam systems, you should set up your mailserver the way I mentioned (you yourself said reverse dns is important for mailservers, I'm telling you how it's done). The names can be anything, so long as they follow the guide I mentioned. :)
     

Share This Page