> If that's what you want, and you're setting myhostname explicitly, then it is > your > responsibility to do that. This allows users who do want dotless hostnames to > have those if that's right for them.
In Internet-connected SMTP (which is something like 99.99999% of installations) if $myhostname is not a FQDN or at least a properly registered domain in DNS as it concerns HELO, bad things are *likely* to happen. The number of people who run mail servers isolated from the Internet is vanishingly small. Why cater to the oddball environment where anything goes? So what if they have to suffer the ignominy of a warning message about a arguably mis-configured server? > You misunderstood the documentation, the domain is only appended when > computing the *default* value No I didn't misunderstand the documentation. I provided both pieces of information via main.cf and I damn well expected Postfix to do the *self-evidently correct* thing. Much to my annoyance It did not. >, when the name returned by > gethostname() is dotless. Technically that is a violation. The hostname is and always has been defined as being UPTO the first dot. So Postfix is re-defining the term 'hostname' contrary to 40 years of Unix tradition if not specification? Legions of sysadmins set the hostname as a singleton and domain name is derived from other sources at the OS level. 'hostname -s' and 'hostname -f' etc. do the right thing. Sure Linux and friends have been known to play fast and loose with the terminology (eg. Redhat's HOSTNAME=FQDN in /etc/sysconfig/network) but that doesn't make it right. One could read https://www.ietf.org/rfc/rfc2821.txt sections 3.2 and 4.1.1.1, the latter of which *CLEARLY* establish that the proper string to send is the FQDN if at all possible. By setting $mydomain and $myhostname I had provided that information. Therefore by any reasonable reading Postfix should foremost define 'smtp_helo_name=$myhostname.$mydomain' (or if you rather '$fqdn') and amend that to just $myhostname should it have dots. Or if that's too big a change, then if there is no dot in $myhostname, tacked on $mydomain if it was available. Both behaviors can be overridden should the admin explicitly set 'smtp_helo_name'. (aside, I didn't even know about 'smtp_helo_name' before this incident.) Even if we don't update Postfix to "second guess the all-knowing admin insistent on running an invalid environment" (I mean seriously, even Windows AD forces you to behave - this isn't the 80's), then it should have at least issued a warning during configuration load. No, I'm not about to suggest that every time a HELO command is issued, a warning message get emitted. I won't belabor the point any further. Clearly this is a case of WONTFIX and if the admin is foolish enough to override a default then he had better have read the source code first. I don't consider that a defensible position. But oh well...