Comment 15 for bug 2019195

Revision history for this message
Iain Lane (laney) wrote :

> myhostname = mail.

That value would not be allowed by postfix

root@lucky-fly:~# postconf -e myhostname=mail. mydomain=example.com
root@lucky-fly:~# newaliases
newaliases: warning: valid_hostname: misplaced delimiter: mail.
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: mail.

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.