Email stopped working, 550-Bad HELO

I did some more research, because I cannot use mailgun for our production forum.

In the header of e-mails that come in via mailgun I still see:

Received: from localhost.localdomain

HELO is the first command in the SMTP dialog (source)

It should be something like

HELO discourse.mydomain.tld

Some SMTP servers like the Postfix have an option to check this against the IP-address of the client. localhost.localdomain resolves to the IP-address of the SMTP server, it is probably in its hosts file. It looks like ISP’s are enabling this in their battle against spammers.

It works with mailgun because mailgun does not execute this check. But it still is a “bad HELO”.

To compare, I sent out e-mail using an email client (Sylpheed) on the same system. This works, even with my ISP’s mailbox and it appears to use

HELO HL80L

HL80L is my local network name. That is still no FQDN, but at least it doesn’t appear as an obvious bogus to my ISP’s server.

So maybe this is something that needs to be improved. But disclaimer: I’m not an SMTP expert.