Configure HELO/EHLO names¶
The sending MTA uses a resolvable hostname you control.
Setup¶
Prepare your values and Debian packages. Replace the example domain and IP.
set -euo pipefail
. /root/mailserver.env
postconf -e "myhostname=$MAILHOST" 'smtp_helo_name=$myhostname'
postfix check
systemctl reload postfix
Test¶
set -euo pipefail
. /root/mailserver.env
test "$(postconf -h myhostname)" = "$MAILHOST"
test "$(postconf -xh smtp_helo_name)" = "$MAILHOST"
swaks --server 127.0.0.1 --port 25 --quit-after EHLO --timeout 15
dig "$MAILHOST" A +short | grep -Fx "$PUBLIC_IPV4"
The local SMTP test confirms the server greeting; the DNS query checks the published A mapping. To confirm outgoing HELO, also inspect the receiving log of an external test recipient you control.