On 06.02.19 02:42, Patton, Matthew [Contractor] wrote:
I learned the hard way that if you don't set $myhostname to a FQDN you
can quickly end up on a black list despite having valid SPF records.

any evidence about this?

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'.

what led you to the conclusion that your non-fqdn hostname caused RBL
listing?

I know servers that refuse non-FQDN helo.
I've seen servers that refuse invalid or generic DNS names
(ip-XXXXXX.aws.internal is both).
But I don't remember a RBL that would immediately list such hosts.

My HELO string was verifiably just $myhostname.

Precisely as documented: $smtp_helo_name defaults to $myhostname
http://www.postfix.org/postconf.5.html#smtp_helo_name

The naked 'smtp' was an
instant blacklist largely as a result of millions of vulnerable Microtek
home routers which have been exploited.

again, how do you know it got to any blacklist?

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.

well, since the $mydomain is by default taken from $myhostname, it should be
obvious you must set $myhostname to a FQDN.

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.

yes, apparently some of the docs could be little more explicit about
$hostname or $smtp_helo_name should be a FQDN.

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Atheism is a non-prophet organization.

Reply via email to