Wietse Venema wrote: > Moe: > [ Charset ISO-8859-1 unsupported, converting... ] >> Wietse Venema wrote: >>> Matt Hayes: >>>> Yes.. I know this has come up quite a bit, but on freenode in #postfix >>>> this discussion once again erupted when someone mentioned a bug in >>>> postfix and referencing this: >>>> >>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=214741 >>> They are talking about an eight-year old version of Postfix. >> I was the guy complaining on IRC, so I'd like to jump in and clarify: >> >> * The bug is still present in 2.7.0, which is not 8 years old >> >> * I think Mike Paul explains the problem pretty well on that ticket. >> >> * The bug is not debian specific and not triggered by doing anything >> "special" other than leaving myhostname and mydomainname out of >> main.cf. >> >> The problem boils down to postfix expecting 'gethostname()' to return >> a FQDN. This not the case on a properly configured linux host, >> regardless of the distribution (this is not debian specific). >> >> I apologize if it's actually a debian patch that introduced this >> behaviour, but from what I gather this is also how mainline postfix does it. >> >> If postfix goes to guess the FQDN when it isn't hardcoded in >> main.cf then it could just as well do it right, no? >> >> The right way, as explained by Mike Paul in that ticket, would be to >> call gethostbyname() on the return value of gethostname() and then split >> the result of *that* into hostname and domainname. > > If this is a non-debian bug then I would like to see a bug report > that can be reproduced on a non-Debian host. > > This is what happens on my non-Debian box when the kernel hostname > is not FQDN: > > # The kernel hostname, as returned by gethostname(2) > tail% uname -n > tail > > # The default mydomain "localdomain" when the kernel hostname is not FQDN. > tail% postconf -d mydomain > mydomain = localdomain > > # The default myhostname, created from gethostname(2) and $mydomain. > tail% postconf -d myhostname > myhostname = tail.localdomain > > As you see there is no guessing at all involved here.
Try to extend your procedure like so: * Make sure /etc/hosts has something like: 127.0.0.1 tail.call tail * 'hostname' should return: tail * 'hostname -f' should now return: tail.call * 'postconf -d mydomain' will still return: localdomain Cheers, Moe