home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / mail / sendmail / 2691 < prev    next >
Encoding:
Internet Message Format  |  1992-11-05  |  3.3 KB

  1. Path: sparky!uunet!ogicse!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxc.cso.uiuc.edu!paul
  2. From: paul@uxc.cso.uiuc.edu (Paul Pomes - UofIllinois CSO)
  3. Newsgroups: comp.mail.sendmail
  4. Subject: Re: Problems with IDA on SunOS 4.1.3
  5. Message-ID: <Bx9386.7xB@news.cso.uiuc.edu>
  6. Date: 5 Nov 92 16:02:28 GMT
  7. Article-I.D.: news.Bx9386.7xB
  8. References: <1992Nov5.051344.5323@schbbs.mot.com>
  9. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  10. Reply-To: Paul-Pomes@uiuc.edu
  11. Organization: University of Illinois at Urbana
  12. Lines: 97
  13.  
  14. mmuegel@next3.corp.mot.com (Michael S. Muegel) writes:
  15.  
  16. >I have been using 5.65c+IDA-1.4.4.1 on our two Internet gateways for
  17. >a few weeks now with very few complaints. In fact, it has helped us
  18. >to significantly improve the quality of our SMTP mail service.
  19. >
  20. >So tonight it came time to upgrade one of our two internal WAN SMTP
  21. >gateways. Everything looked good for a few minutes until I started
  22. >seeing processes wth identifiers like this:
  23. >
  24. >   -gethostbyname(pobox) failed, sleeping (sendmail)
  25.  
  26. The problem is that pobox can't contact a DNS server to determine its
  27. canonical name (pobox.mot.com).  The second problem is that setproctitle()
  28. should not be called at this point within sendmail.  Try replacing the
  29. myhostname() routine with the following in daemon.c:
  30.  
  31. char **
  32. myhostname(hostbuf, size)
  33.     char hostbuf[];
  34.     int size;
  35. {
  36.     struct hostent *hp;
  37.  
  38.     if (gethostname(hostbuf, size) < 0)
  39.         (void) strcpy(hostbuf, "localhost");
  40. # ifdef NAMED_BIND
  41.     /*
  42.     ** See note in makeconnection() above for why we disable
  43.     ** recursive domain matching.   We need it here too.
  44.     */
  45. #  ifdef apollo
  46.     /* Only needed with the 6.8 compiler */
  47.     {
  48.         int     ii;
  49.  
  50.         for (ii = 0; ii < 16; ii++)
  51.             if (((~RES_DNSRCH & 1<<ii) == 0) &&
  52.                 ((_res.options & 1<<ii) != 0))
  53.                 _res.options -= 1<<ii;
  54.     }
  55. #  else /* !apollo */
  56.     _res.options &= (~RES_DNSRCH & 0xffff);
  57. #  endif /* apollo */
  58.  
  59.     /*
  60.     ** But make sure default domain qualification is enabled -
  61.     ** it may have been disabled in deliver.c.
  62.     */
  63.     _res.options |= RES_DEFNAMES ;
  64.     h_errno = 0;
  65.     while ((hp = gethostbyname(hostbuf)) == NULL ||
  66.            (UseNameServer && h_errno == TRY_AGAIN))
  67.     {
  68. # ifdef LOG
  69.         syslog(LOG_WARNING, "%s: gethostbyname(%s) failed, sleeping",
  70.             CurEnv->e_id, hostbuf);
  71. # endif /* LOG */
  72.         Xsleep(30);
  73.         h_errno = 0;
  74.     }
  75.  
  76.     /* Now turn RES_DNSRCH back on. */
  77.     _res.options |= RES_DNSRCH ;
  78.  
  79. # else /* !NAMED_BIND */
  80. #  ifdef sun
  81.     /*
  82.      *    An ugly hack.
  83.      *    This routine is mainly called to assign a default value
  84.      *    to $w .  As such it must be called before the config file
  85.      *    is processed.  On Sun systems this involves calls to some
  86.      *    of the yp lookup routines.  They apparently leave state
  87.      *    information lying around which is inconsistent with the
  88.      *    use of frozen configurations.  Since the standard Sun
  89.      *    setup leaves hostnames unqualified anyway, omitting the
  90.      *    gethostbyname() call should have little effect.
  91.      */
  92.  
  93.     hp = NULL;
  94. #  else /* !sun */
  95.     hp = gethostbyname(hostbuf);
  96. #  endif /* sun */
  97. # endif /* NAMED_BIND */
  98.     if (hp != NULL)
  99.     {
  100.         (void) strcpy(hostbuf, hp->h_name);
  101.         return (hp->h_aliases);
  102.     }
  103.     else
  104.         return (NULL);
  105. }
  106. -- 
  107. "The feminist agenda is not about equal rights for women.  It is about a
  108.  socialist, anti-family political movement that encourages women to leave
  109.  their husbands, kill their children, practice witchcraft, destroy capitalism,
  110.  and become lesbians."  --Pat Robertson on Iowa's proposed ERA
  111.