I have an internal management app for a small company, written in Python and running on a Linode VPS, with which users can send occasional emails to their customers. The emails are quite straightforward: a text part (i.e. not HTML) with a PDF invoice attachment, created with the
Everything has been running quite smoothly for a while, but then lately I've been receiving complaints that the emails are often classified as spam by the receiving mail servers. I sent a test email to http://www.mail-tester.com and discovered that adding a few missing headers (
Message-ID in particular) helped to reduce the "spaminess" level of my messages. However there is one SPF-related SpamAssassin problem that still eludes me:
SPF_HELO_SOFTFAIL SPF: HELO does not match SPF record (softfail)
I tried sending the test email to my Gmail account and here are the relevant headers that can be found when I do "Show Original":
Received-SPF: pass (google.com: domain of <sender_address> designates <ip_smtp_server> as permitted sender) client-ip=<ip_smtp_server>; Received: from [<ip_linode_vps>] (helo=<domain_name_linode_vps>)
From this and some additional informations I gathered here and there, I'm pretty sure that this problem could be fixed by somehow modifying the SPF record of the SMTP server domain (which already exists, as a TXT record with a
"v=spf1 a mx... ~all" string containing an
ip4 reference to
<ip_smtp_server>), but my current understanding is not enough to do so, so I'd appreciate any help.
<ip_linode_vps> = 22.214.171.124 <domain_name_linode_vps> = li131-89.members.linode.com <ip_smtp_server> = 126.96.36.199 <domain_name_smtp_server> = mail.roucet.com <already_existing_spf_record> = "v=spf1 a mx ip4:188.8.131.52 ip4:184.108.40.206 ip4:220.127.116.11 ~all"