This is basically the issue we're dealing with here: the postinst allows the trailing dot through if it gets it from /etc/resolv.conf or `hostname --fqdn`. In the case that it finds "mail.example.com." in there, it would be correct per the documentation to write "mail.example.com" to myhostname, then mydomain would effectively not be used.*
* more complicated than this but that's the jist; see append_dot_mydomain and other options, the variable is used if append_dot_mydomain is true and myhostname does not look like a fqdn.
> myhostname = mail.
That value would not be allowed by postfix
root@lucky-fly:~# postconf -e myhostname=mail. mydomain= example. com main.cf: parameter myhostname: bad parameter value: mail.
root@lucky-fly:~# newaliases
newaliases: warning: valid_hostname: misplaced delimiter: mail.
newaliases: fatal: file /etc/postfix/
This is basically the issue we're dealing with here: the postinst allows the trailing dot through if it gets it from /etc/resolv.conf or `hostname --fqdn`. In the case that it finds "mail.example.com." in there, it would be correct per the documentation to write "mail.example.com" to myhostname, then mydomain would effectively not be used.*
https:/ /sources. debian. org/src/ postfix/ 3.7.5-2/ src/postconf/ postconf_ builtin. c/#L191- L214
* more complicated than this but that's the jist; see append_dot_mydomain and other options, the variable is used if append_dot_mydomain is true and myhostname does not look like a fqdn.