#3298: Mutt's way to get the FQDN is broken
---------------------+----------------------
  Reporter:  vinc17  |      Owner:  mutt-dev
      Type:  defect  |     Status:  reopened
  Priority:  major   |  Milestone:
 Component:  mutt    |    Version:  1.5.20
Resolution:          |   Keywords:
---------------------+----------------------
Changes (by invalid@…):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 {{{
 Michael,

 This patch misses half the point of this bug, which is that if DNS is
 not configured to be the primary host resolution service on the host
 in question, using anything found in /etc/resolv.conf is *incorrect*,
 as Vincent originally pointed out.

 If DNS isn't the configured service, anything in that file may be
 vastly out of date, or simply contain whatever the OS puts there by
 default, which may have no relation to the actual hostname.  In such
 cases, using what's there will not only cause "incorrect" message IDs,
 but may in fact cause outgoing mail to break, depending on how the
 SMTP gateway is configured.

 Furthermore, it's entirely unnecessary.  The resolver library will
 already read /etc/resolv.conf *if* DNS is configured to be used, and
 will determine the hostname using that info, if it is appropriate to
 do so; thus using getaddrinfo() will correctly use that if it is
 appropriate to do so, and will correctly NOT do so if it is not.

 In the event that the machine is configured via DHCP to a hostname
 that does not resolve on that machine, it is *broken*.  It's extremely
 likely other things will also be broken.  A mutt user on such a host
 should be forced to configure Mutt to use the correct hostname (and
 should probably be told to do so).  However, Mutt should not assume
 that anything in the system config files should be useful in such a
 case.  Instead it should:

   - Use whatever the user set, if anything
   - perform the getaddrinfo(), if that failed
   - use the value returned by gethostname(), if that failed
     (unqualified host names may still be perfectly valid, if your
     network is not using DNS, e.g. host files, etc.)
   - give up and exit, if that failed.

 }}}

 [attachment:"untitled-part.pgp"]

-- 
Ticket URL: </ticket/3298#comment:25>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to