> Returning to the OP's question, Postfix does append $mydomain to the > automatically derived value of $myhostname when the latter is not explicitly > set > in main.cf and is not fully qualified.
Except that it doesn't. (or I misunderstood what you wrote) I set $myhostname = 'smtp'. $mydomain was also set. I had to set both since gethostbyname() would have returned a value of 'ip-XXXXXX.aws.internal'. My HELO string was verifiably just $myhostname. The naked 'smtp' was an instant blacklist largely as a result of millions of vulnerable Microtek home routers which have been exploited. If Postfix had instead used $myhostname.$mydomain IFF $myhostname is not FQDN (has no dots at all) then 'smtp'.$mydomain would have been perfectly fine since there was an A record for it for quite some time. > The above assumes that the system hostname is stable, and not derived via > DHCP. In the latter case do set an explicit stable FQDN for $myhostname. Fair enough. But I still think that at the very least the docs should be a little more explicit, and furthermore a warning is merited during valid_hostname() and with SLOPPY_VALID_HOSTNAME we can continue without error. If nothing else HELO should really scream if there are no dots or should be revised to always default to doing the reasonable thing. On the Internet it can't be valid not to have at least 2 dots in $myhostname.$mydomain or 1 dot in $mydomain. RBL are getting increasingly aggressive (or stupid, depending on viewpoint) such that any non-dot value of HELO could easily wind up (if it isn't already) a criteria by which to blacklist an IP. Whatever shenanigans are permitted internal to an organization is not important but as "good netizens" shouldn't the program at least complain even if it allows you to still shoot oneself in the foot? It's also a good idea not to surprise software users with unexpected outcomes. I had every expectation that setting both $myhostname and $mydomain was sufficient for proper behavior. I had to go read the code to discover that such was not the case.