I needed to setup reverse DNS for our mailserver, for obvious reasons. Having done so for 1.1.1.1 > mail.example.com I expected to be able to do
$ nslookup 1.1.1.1
1.1.1.1.in-addr.arpa name = mail.example.com
But instead get
... name = weird.example.com
Ok, ehm, weird? Doing ping mail.example.com gives me 1.1.1.1 as expected, but with a hostname weird.example.com. /etc/hostname contains "mail", so huh?
ping weird.example.com gives me 2.2.2.2, which makes sense as that is our load balancer and *.example.com points there.
Where else could the weird weird.example.com hostname be coming from? And how on earth could it be returned by the reverse DNS lookup if that's not at all what I specified? For completeness' sake, I grepped through /etc on all machines involved, but no mention of 'weird' anywhere... Also, no, I have no mention of 'weird' subdomains in my DNS entries ANYWHERE. I do however have an A record for mail.example.com pointing to the correct machine, as well as an MX record for example.com pointing to mail.example.com.
Note: sorry if this is all n00b, I know a lot about programming and quite a bit about server maintainance, but too little about DNS and all its intricacies...
1.1.1.1 > mail.example.com
reverse DNS mapping, like you mention in the first paragraph?