<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MXFend Email Security]]></title><description><![CDATA[Practical guides to SPF, DKIM, DMARC, BIMI, SMTP, DNS, and email deliverability. Written by the creator of MXFend.]]></description><link>https://mxfend.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>MXFend Email Security</title><link>https://mxfend.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 09:56:35 GMT</lastBuildDate><atom:link href="https://mxfend.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[HELO vs EHLO: Why Your SMTP Greeting Can Send Email to Spam]]></title><description><![CDATA[Your SPF, DKIM, and DMARC records may all look correct while your mail server still introduces itself as:
EHLO localhost

or:
EHLO server1.internal

That greeting happens before the message body is tr]]></description><link>https://mxfend.hashnode.dev/helo-vs-ehlo-smtp-greeting-email-delivery</link><guid isPermaLink="true">https://mxfend.hashnode.dev/helo-vs-ehlo-smtp-greeting-email-delivery</guid><category><![CDATA[email dns devops security]]></category><category><![CDATA[email]]></category><category><![CDATA[dns]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Petr Michal]]></dc:creator><pubDate>Tue, 04 Aug 2026 16:29:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a72110b99895fd200835d09/d2b6354d-8473-4fce-9111-83dcdb729027.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Your SPF, DKIM, and DMARC records may all look correct while your mail server still introduces itself as:</p>
<pre><code class="language-text">EHLO localhost
</code></pre>
<p>or:</p>
<pre><code class="language-text">EHLO server1.internal
</code></pre>
<p>That greeting happens before the message body is transmitted and can become one of the first identity signals a receiving server evaluates.</p>
<h2>What HELO and EHLO actually do</h2>
<p>When one mail server connects to another, the receiving server first sends an SMTP banner:</p>
<pre><code class="language-text">220 mx.receiver.example ESMTP
</code></pre>
<p>The sending server then identifies itself:</p>
<pre><code class="language-text">EHLO mail.sender.example
</code></pre>
<p><code>HELO</code> is the older SMTP greeting.</p>
<p><code>EHLO</code> is the modern Extended SMTP greeting. It also allows the receiving server to advertise capabilities such as:</p>
<ul>
<li><p><code>STARTTLS</code></p>
</li>
<li><p><code>SIZE</code></p>
</li>
<li><p><code>8BITMIME</code></p>
</li>
<li><p><code>PIPELINING</code></p>
</li>
<li><p><code>DSN</code></p>
</li>
</ul>
<p>Modern mail servers normally try <code>EHLO</code> first and fall back to <code>HELO</code> only when necessary.</p>
<h2>What a valid EHLO hostname should look like</h2>
<p>A good EHLO identity is normally a publicly resolvable fully qualified domain name:</p>
<pre><code class="language-text">mail.example.com
</code></pre>
<p>It should not be:</p>
<pre><code class="language-text">localhost
server1
mail.local
127.0.0.1
</code></pre>
<p>A strong configuration creates a consistent identity chain:</p>
<pre><code class="language-text">Sending IP
    ↓ PTR
mail.example.com
    ↓ A or AAAA
Same sending IP
    ↓ EHLO
mail.example.com
</code></pre>
<p>This is commonly described as forward-confirmed reverse DNS.</p>
<h2>Why PTR and EHLO should agree</h2>
<p>Suppose the sending connection comes from:</p>
<pre><code class="language-text">203.0.113.20
</code></pre>
<p>Its PTR record returns:</p>
<pre><code class="language-text">mail.example.com
</code></pre>
<p>But the SMTP session announces:</p>
<pre><code class="language-text">EHLO host123.provider.example
</code></pre>
<p>The server may still deliver mail, but the identity is inconsistent.</p>
<p>Receiving systems can combine that inconsistency with other signals:</p>
<ul>
<li><p>IP reputation</p>
</li>
<li><p>blocklist status</p>
</li>
<li><p>SPF, DKIM, and DMARC results</p>
</li>
<li><p>TLS configuration</p>
</li>
<li><p>complaint history</p>
</li>
<li><p>sending patterns</p>
</li>
</ul>
<p>A HELO mismatch is rarely the only reason a message lands in spam, but it can make an already marginal sender look less trustworthy.</p>
<h2>Common HELO and EHLO mistakes</h2>
<h3>Using <code>localhost</code></h3>
<p>This often happens after installing Postfix, Exim, or another MTA without setting the public hostname.</p>
<h3>Using an internal hostname</h3>
<p>Names such as <code>mail.internal</code> or <code>server1.lan</code> cannot be verified through public DNS.</p>
<h3>Missing forward DNS</h3>
<p>The PTR points to <code>mail.example.com</code>, but that hostname does not resolve back to the sending IP.</p>
<h3>Using the wrong identity on a multi-IP server</h3>
<p>A server sends from several IP addresses but announces the same hostname for all of them, even though each IP has a different PTR record.</p>
<h3>Assuming the From domain must match</h3>
<p>The EHLO hostname does not necessarily need to equal the visible From domain.</p>
<p>For example, this can be valid:</p>
<pre><code class="language-text">EHLO mail.example.net
From: billing@example.com
</code></pre>
<p>What matters most at this layer is that the server identity is valid, resolvable, and consistent with the sending infrastructure.</p>
<h2>How to check your configuration</h2>
<p>Start with the actual outbound IP address, not only the domain used in the From header.</p>
<ol>
<li><p>Find the IP used for outbound SMTP.</p>
</li>
<li><p>Resolve its PTR record.</p>
</li>
<li><p>Resolve the returned hostname back to an IP.</p>
</li>
<li><p>Inspect the EHLO value used by the sending server.</p>
</li>
<li><p>Verify that the complete identity chain is consistent.</p>
</li>
<li><p>Check STARTTLS and the server certificate.</p>
</li>
<li><p>Then verify SPF, DKIM, and DMARC separately.</p>
</li>
</ol>
<h2>Example commands</h2>
<p>Check reverse DNS:</p>
<pre><code class="language-bash">dig -x 203.0.113.20 +short
</code></pre>
<p>Check forward DNS:</p>
<pre><code class="language-bash">dig mail.example.com A +short
</code></pre>
<p>Inspect an SMTP greeting:</p>
<pre><code class="language-bash">openssl s_client -starttls smtp -connect mail.example.com:25
</code></pre>
<p>The exact tests available depend on whether the remote server accepts connections from your network and whether port 25 is blocked.</p>
<h2>HELO is not a replacement for email authentication</h2>
<p>A correct EHLO identity does not replace:</p>
<ul>
<li><p>SPF</p>
</li>
<li><p>DKIM</p>
</li>
<li><p>DMARC</p>
</li>
</ul>
<p>These mechanisms work at different layers.</p>
<p>HELO/EHLO and PTR describe the connecting server.</p>
<p>SPF, DKIM, and DMARC authenticate domains and messages.</p>
<p>For reliable delivery, both layers should be configured correctly.</p>
<h2>Check the complete server identity</h2>
<p>I wrote a more detailed guide covering HELO, EHLO, DNS identity, and common configuration mistakes:</p>
<p><a href="https://mxfend.com/helo-ehlo-email/">Read the complete HELO and EHLO guide on MXFend</a></p>
<p>You can also use the <a href="https://mxfend.com/smtp-tls-checker/">MXFend SMTP TLS Checker</a> to inspect STARTTLS and related mail-server configuration.</p>
<blockquote>
<p>Disclosure: I built MXFend. The diagnostic tools are free to use and do not require an account.</p>
</blockquote>
]]></content:encoded></item></channel></rss>