Closed link2xt closed 4 years ago
for understanding: is ClientId::hostname()
that references DEFAULT_DOMAIN_CLIENT_ID
(="localhost.localdomain") used anywhere?
@r10s DC does not use it. It would be nice to remove this function and hostname dependency. If someone wants to use their machine hostname, they can use this or some other package directly and set their hostname with ClientId::new()
and hello_name
.
I would suggest making it a feature instead of removing it entirely
@dignifiedquire This feature would only allow to use
.hello_name(ClientId::hostname())
instead of
.hello_name(ClientId::new(get_hostname().unwrap_or_else(|| "localhost.localdomain".to_string())))
I can only imagine it being used in some rust MTA, and it will probably want to determine its hostname once at startup, not every time it makes a connection to other system. And it probably wants to log the hostname it found during startup.
fair enough
This commit fixes formatting of IPv4 and IPv6 address literals. Both are enclosed in brackets and IPv6 is prefixed with
IPv6:
.Default trait is derived for ClientId.
Default ClientId is
[127.0.0.1]
now, because it passes the most strict Postfixsmtpd_helo_restrictions
checks.Fallback domain ClientId is replaced with
localhost.localdomain
, because a domain must be an FQDN according to RFC 5321.