Setting HELO in Postfix

Emails generated by the server are being rejected by gmail, and I understand that HELO on Postfix needs to be set to the reverse DNS, to fix this. How do you do this? I’m running CENT OS.

Many thanks in advance



By default, I believe the HELO Postfix uses would be the hostname of your server. You may want to run the “hostname” command and see what it’s set to.

However, there’s multiple reasons hosts may reject your emails… some of those may appear in your email logs, located in /var/log/maillog.

Also, you may want to check here to make sure your IP address isn’t on an RBL list. There’s a few different tools for searching the RBL’s out there, this is one of those:

Thanks for this. Problem seems to stem from hostname not being set properly. Can I set hostname (matching the reverse lookup) without adversely affecting the whole system?

Have checked that the ip is not on any blacklists. gmail is not rejecting as such, just marking as Spam.


You can indeed change the hostname, but when you do, make sure that:

  • You update your hostname in /etc/hosts, it needs to be set alongside your IP address

  • In the mydestination line of /etc/postfix/, make sure your hostname is listed there, and restart Postfix after you make any changes to that file (/etc/init.d/postfix restart).