The whole problem is described here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=214741 PostFix uses the value returned by gethostname() as the default hostname. Since that value is not a fully qualified hostname, postfix then adds ".localdomain" to the end. So even on systems where $(hostname -f) returns the right thing, postfix will use $(hostname -s).localdomain as the default hostname. Postfix seems to be simply broken in that regard. The Gentoo ebuilds don't seem to apply the patch that is available for this problem (see the URL above). IMHO they should. The obvious workaround is to set the hostname explicitly in postfix's config. But that shouldn't be necessary. Reproducible: Always
For informational purposes, here's upstream's response to such changes: http://postfix.1071664.n5.nabble.com/Automatically-substitute-FQDN-of-local-system-in-config-td90055.html#none TL;DR: "hostname -f" isn't stable without a network or with a changing network (eg: laptop) therefore they believe it will break mail delivery on such systems. This is why they append the .localdomain on gethostname() values returned without a dot.