On Fri, 24 Mar 2023 20:32:31 -0400 Greg Wooledge <g...@wooledge.org> wrote:
> On Sat, Mar 25, 2023 at 08:28:03AM +0800, f...@dnsbed.com wrote: > > Greetings, > > > > as you see this PTR, > > > > $ dig -x 1.1.1.1 +short > > one.one.one.one. > > > > so 2.2.2.2 can have the PTR two.two.two.two? and 3.3.3.3 can have > > three.three.three.three? > > Any IP address can have any PTR value. You just have to petition the > owner of the IP address range to set it. > > I didn't know .one was a valid TLD. It looks like .two is not, so if > someone were to assign "two.two.two.two" as the PTR value of an IP > address, that PTR would not resolve back to any IP address. (An IP > address block owner might reject such a petition.) > In general, at this time, a mail server will look at the IP address of a potential sender, check the PTR, then check for an A record matching the PTR, pointing back to the IP address. The PTR does not (currently) need to be related to an email domain using the address. A competent ISP will have set up its IP addresses with complementary PTR-A record pairs. Unfortunately, many use PTRs in the form xxxxx-11-22-33-44 which is perfectly valid, but may be rejected by mail servers as likely spammers (mine does). If you already have a PTR-A pair that doesn't look like this (e.g. is some form of your user name or account reference) you're probably OK. The relevant RFC allows (or did when I last looked) multiple PTR records for one IP address, but I don't think there's much software which can deal with that, or will return more than one. On the other hand, it's quite common for a single mail server to deal with many domains, so it's not reasonable to expect a sender or HELO/EHLO to match the PTR. My email server checks for a complementary PTR-A pair that can both be found in public DNS, and goes no further. I believe that is a typical setting. -- Joe