Score:0

Email DNS Setup: How do I make HELO publish an SPF record? SPF_HELO_NONE - SPF: HELO does not publish an SPF Record

us flag

My environment: hMailServer 5.6.8 on Windows Server 2022 Standard

Let's say I have two domains (I don't really own these domains, they're just examples), www.myblog.com and www.mailserver.com. They are both hosted on the same machine and have the same IP address 1.2.3.4.

The blog site www.myblog.com uses www.mailserver.com to send emails. The site www.mailserver.com only serves as a mail server; it is not accessible from a browser. I have set it up so that when www.myblog.com sends an email to someone, the recipient's email server receives SENT: EHLO www.mailserver.com, but sees SENT: MAIL FROM:<[email protected]> message, so the recipient sees that the email came from myblog.com.

Like mentioned before, the current EHLO message is SENT: EHLO www.mailserver.com

Everything is working fine so far. Recently I decided to check the "spam rating" of my setup at https://www.mail-tester.com. I sent an email to the spam tester using the setup described above, and I saw a warning under the SpamAssassin section that says

SPF_HELO_NONE        SPF: HELO does not publish an SPF Record

My question is, how do I get rid of this warning? Are the DNS records as they should be? See below for the DNS records for each domain.

enter image description here

The DNS records for each domain are as follows (note the PTR record for 1.2.3.4):

IP address 1.2.3.4
PTR www.mailserver.com

myblog.com
Name            Type    Value
@               A       1.2.3.4
*               A       1.2.3.4
@               MX      10 myblog.com.
@               TXT     v=spf1 ip4:1.2.3.4 ~all
dkim._domainkey TXT     v=DKIM1; t=s; k=rsa; p=[super long public key string]

mailserver.com
Name            Type    Value
@               A       1.2.3.4
*               A       1.2.3.4
@               MX      10 mailserver.com.
@               TXT     v=spf1 ip4:1.2.3.4 ~all
Score:0
us flag

I was able to get rid of the warning by adding an extra TXT record with the name "www" to the www.mailserver.com DNS:

mailserver.com
Name            Type    Value
@               A       1.2.3.4
*               A       1.2.3.4
@               MX      10 mailserver.com.
@               TXT     v=spf1 ip4:1.2.3.4 ~all
www             TXT     v=spf1 ip4:1.2.3.4 ~all <-- adding this record fixed the warning
vidarlo avatar
ar flag
Why do you use `www.mailserver.com`? That's just strange. But yes, the spf record must match the domain name present. @ matches `mailserver.com` in this case, *not* `www.mailserver.com`.
user3163495 avatar
us flag
@vidarlo The PTR record for the IP is `www.mailserver.com`, so I had to make HELO/EHLO domain match the PTR record with "www"
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.