Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Email delivery

SpamAssassin adds SPF_HELO_NONE to mail sent from your Postfix server

ErrorSPF_HELO_NONE

Short answer

The receiver checked SPF for the name your server gave in HELO and found no record. Two things cause that: the HELO name is a short or local name that is not a full domain, or the full name has no SPF record. Set a real hostname in Postfix and publish a TXT record for it.

  • Applies to Postfix 3.8, Postfix 3.9, Ubuntu 24.04
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Find out which name Postfix puts in HELO, then see whether DNS has a TXT record for it.

    postconf myhostname smtp_helo_name
    dig +short TXT mail.example.com
  2. 2Match what you see, then jump to its fix

    1. 1postconf shows localhost, a bare name such as mail, or an IP in smtp_helo_nameThe HELO name is not a full domain nameFix
    2. 2dig returns nothing for the TXT record of the HELO nameThe HELO name has no SPF record in DNSFix

What does the error look like?

  • SPF_HELO_NONE
  • X-Spam-Status lists SPF_HELO_NONE even though SPF for your From domain passes

Cause 1 of 2

The HELO name is not a full domain name

1Check

RFC 7208 says the HELO check only applies when the HELO string is a valid multi-label domain name. For anything else the result is none. smtp_helo_name defaults to myhostname, which defaults to the machine's fully qualified name from gethostname().

hostname -f
postconf myhostname smtp_helo_name

2Fix

Give the machine a fully qualified name that exists in DNS and use it for myhostname, or set smtp_helo_name on its own.

sudo postconf -e 'myhostname = mail.example.com'
sudo postconf -e 'smtp_helo_name = mail.example.com'
sudo systemctl reload postfix

3Verify

Confirm both settings show the full name.

postconf myhostname smtp_helo_name

Confirmed by rfc-editor.org

Did this fix it?

Cause 2 of 2

The HELO name has no SPF record in DNS

1Check

RFC 7208 says the HELO identity is checked on its own, and that a lookup which finds no domain (NXDOMAIN) gives the result none. A record must exist at the HELO name itself, not only at the From domain.

dig +short TXT mail.example.com

2Fix

Publish an SPF TXT record at the HELO name itself. The a mechanism authorises the address the name points to, and -all rejects everything else.

mail.example.com.  IN TXT  "v=spf1 a -all"

3Verify

Wait for DNS to update, then query the record again and send a test message.

dig +short TXT mail.example.com

Confirmed by rfc-editor.org

Did this fix it?

How do I stop it coming back?

  • Use one hostname for the server's A record, reverse DNS, myhostname and the HELO name.
  • Add the HELO-name SPF record when you add a new mail server, not after the first spam score.
  • Keep the SPF record for your sending domain as well; the HELO record does not replace it.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Related fixes

Email

Mail from your own domain keeps landing in the spam folder

dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=example.com

Open a message that went to spam and read its Authentication-Results header: it shows whether SPF, DKIM and DMARC passed, and for which domain.

5 causes, each with a fix

Email

Outlook.com bounces your mail with 550 5.7.515

status=bounced (host hotmail-com.olc.protection.outlook.com[...] said: 550 5.7.515 Access denied

550 5.7.515 means Outlook.com counts your From domain as a high-volume sender (5,000 or more messages a day to Microsoft consumer addresses) and the message failed its authentication rules.

4 causes, each with a fix

Email

Postfix refuses to send with "Relay access denied"

454 4.7.1 <user@example.net>: Relay access denied

Postfix says Relay access denied when a client asks it to deliver to a domain it does not host, and the client is neither listed in mynetworks nor logged in with SASL.

5 causes, each with a fix

Email

PHP mail() returns true but the email never arrives

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing

mail() returning true only means the message was accepted for delivery, not that it arrived.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.