<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/styles/rss-style.xsl"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title>troglodyne.net</title>
<link>http://troglodyne.net//posts/b388c948-2d23-11ec-997a-c839673f4c78?format=xml</link>
<description>troglodyne.net : /posts/b388c948-2d23-11ec-997a-c839673f4c78</description>
<language>en</language>
<pubDate>2026-04-16T21:30:22</pubDate>
<lastBuildDate>2026-04-16T21:30:22</lastBuildDate>

<image>
<title>troglodyne.net</title>
<url>/favicon.ico</url>
<link>http://troglodyne.net</link>
<width>32</width>
<height>32</height>
<description>troglodyne.net favicon</description>
</image>
<item>
<title>PTR Records: waving a dead chicken</title>
<link>http://troglodyne.net/posts/b388c948-2d23-11ec-997a-c839673f4c78</link>
<description><![CDATA[<p>
Helping out people with their shared hosting problems inevitably runs into mail issues.
One of the more common ones has to do with being put on an <a href="https://en.wikipedia.org/wiki/Domain_Name_System-based_blackhole_list">RBL</a>, usually a code 550 bounce.
This usually happens for one of three reasons:
<ul>
    <li>The mailserver is configured to do what <em>seems</em> right and <a href="https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#SMTP_transport_example">HELO</a> per the appropriate domain rather than the domain of the server</li>
    <li>The mailserver responds on an IP other than that of the domain returned by the HELO (either lack of a PTR record, or responding on the mail domain's IP)</li>
    <li>The client is <em>actually spamming</em></li>
</ul>
It's rarely the latter, as this is fairly straightforward to prevent with outgoing mail limits, outgoing scanning and so forth.
</p>
<p>
You'd think that this cross-referencing of a domain's <a href="https://en.wikipedia.org/wiki/List_of_DNS_record_types#A">A record</a> to it's <a href="https://en.wikipedia.org/wiki/Reverse_DNS_lookup">PTR</a> would prevent a lot of spam, as this would effectively prevent spoofing.
Unfortunately the reality of shared hosting, IPv4 scarcity and limited ISP tooling has crippled this.
This has resulted in a reality where there are only 2 correct configurations:
<ul>
    <li>No sharing of IPs between domains which emit mail, period.  Not even CNAMEs.  You can then HELO per domain on it's IP.</li>
    <li><em>Never</em> HELO with anything other than the server hostname, and always respond from the server's IP</li>
</ul>
As you can see allowing the latter (which all RBLs <em>must</em>, as it's the Lowest common denominator here) essentially cripples the cross-referencing of the sender domain's A record with it's IP and the corresponding PTR record.
Spammers can spoof any domain they wish as long as their MTA HELOs correctly until they get manually reported.
</p>
<p>
So why is it that we can't share IPs and HELO per-domain/ip?
It's precisely because we are doing this PTR to IP to A record cross-referencing as an automated process over at the RBL makers like spamcop et al.
That, and almost <em>nobody</em> is ever given a /24 block of IPs (0-254 on the <a href="https://en.wikipedia.org/wiki/Bit_numbering#Least_significant_bit">least significant byte</a> of the address).
Instead the ISPs usually assign smaller blocks to multiple customers.
This means that they can't delegate the NS record for *.X.Y.Z.in-addr-arpa (where XYZ is the remainder of your IP, but backwards) to their client.
</p>
<p>
So instead they provide some kind of interface for their clients to add PTR records.
Unfortunately many don't know that a one-to-many PTR relationship is entirely supported by DNS, much like for A records themselves.
As such these interfaces inevitably only allow one domain to be specified per IP.
Which leaves you with only one option: send out mail from your server's hostname and primary IP.
</p>
<p>
Meanwhile, 0 spam is prevented because of this massive hole blown in the entire scheme.
The only practical outcome is that unaware sysadmins get caught up by this and are put on RBLs erroneously.
Which is a pity, as if the system actually worked correctly it would be an ironclad guarantee against spoofed emails.
</p>
<p>
IPv6 <em>could</em> have fixed this, as we could give <em>everyone</em> a /64 IP range until the <em>end of time</em> and never run out.
Delegating NS for the PTR domains could then become standard practice.
IPv6 never really got adopted by the major ISPs though.
Given they haven't updated their tooling for multi-PTR (which has been supported almost <em>since the beginning</em> of DNS), we shouldn't hold our breath that NAT is going away anytime soon either.
</p>]]></description>
<author>george</author>
<guid isPermaLink="true">http://troglodyne.net/posts/b388c948-2d23-11ec-997a-c839673f4c78</guid>
<pubDate>2021-10-14T19:19:50</pubDate>
<enclosure type="text/html" url="http://troglodyne.net/posts/b388c948-2d23-11ec-997a-c839673f4c78" />
</item>
</channel>
</rss>
