On Fri, Oct 04, 2013 at 01:06:35PM -0500, Derek Martin wrote: > Even if the patch was complete garbage, the > point is there was never any discussion from the > devs as to WHY. It was completely ignored for > three and a half years.
Yes, ignoring your patch because of technical/stylistic problems is wrong. Probably there was another reason, like the whole concept of gethostname() being flawed and unclear, so devs decided they had other things to do. > with the trivial exception of having removed the > string.h header. Since strchr() returns an int, Well: > char *strchr(const char *s, int c); ... > > MUA may choose to operate offline, so some > > hacks around libresolv (like reading > > /etc/resolv.conf) are OK instead of just > > returning -1: > > NO, THEY ARE NOT. If your system is not using > DNS for local name resolution, then using anything > in /etc/resolv.conf IS WRONG. PERIOD. If my system is not using DNS for local name resolution, then I can still use /etc/network/interfaces (or whatever) scripts to edit /etc/resolv.conf just for mutt if so desired. On the other hand, your patch breaks some of setups that do use DNS. > gethostname() is NEVER wrong; it always gives > you the configured host name of your host. gethostname() is wrong when you use your own preferred `hostname` on corporate network, not the one the corporate DNS server assigns to you. Or when you connect via GPRS/PPP or any other dialup? > On hosts which frequently move between networks > (and, I would argue, even on hosts which are > fixed to a given network) the configured > hostname should be UNQUALIFIED. The example I've shown you was run on a system with unqualified hostname. If I remove "127.0.1.1 ux280p.ckee" record from /etc/hosts (it's put there by Debian's installer), then /tmp/domainname/gethostname returns nothing at all. You'd prefer empty answer? > The system should determine its qualified name > via whatever host name resolution mechanism it > is configured to use. My system has several IP addresses and several hostnames (depending on interface/network). Its `hostname` never changes though. The one in example is called ux280p. The one I'm currently writing this email from is called x505. > If you want Mutt to use something OTHER than > what the configured name resolution system gives > you, or the system has no qualified domain name, > you MUST configure Mutt to tell it what to use. I could use /etc/resolv.conf just fine. -- With best regards, xrgtn