Linux – Postfix SMTP HELO

linuxpostfixsmtp

There are two parts to my question:

Part 1:

I recently noticed I had been added to SpaumHaus XBL because my server was sending invalid HELO.

I have changed my config so that it now sends from the hostname but I am wondering whether it is possible to get Postfix to send a HELO which matches the sender address for example:

sender1@example1.com sends mail.example1.com
sender2@example2.com sends mail.example2.com

Part 2:

If somebody awesome answers this and I get it working, does my PTR record need to match that? If so, am I better off just using the server hostname. Does it matter if the HELO doesn't match the sending domain and/or PTR?

I hope that makes sense.

Best Answer

The HELO hostname should match the server's hostname; at least with A, but it's even better if the A also has matching PTR. It's also good to have at least some PTR record. Also notice that the receiving MTAs may decide individually how much value they put on these checks, so it's not an absolute truth.

The HELO hostname doesn't need to match the domains on sender email addresses. Instead, Sender Policy Framework (SPF) is designed for evaluating whether the server is allowed to send mail for the domain or not. Just have one hostname for the server and forget this idea completely. Learn how to set up SPF, DKIM and eventually DMARC.

Related Topic