[906] in SIPB_Linux_Development

home help back first fref pref prev next nref lref last post

sendmail

daemon@ATHENA.MIT.EDU (Jim Haynes)
Thu Jan 19 20:56:34 1995

From: haynes@cats.ucsc.edu (Jim Haynes)
Date: Thu, 19 Jan 1995 17:56:14 -0800
To: linux-dev@MIT.EDU

We're running about 50 Linux PCs here as public Athena workstations.  I'm
making a lot of use of the Linux-Athena packages you built at MIT, changing
here only those that I have to.

I've been getting some mail, as postmaster, where sendmail on the workstation
doesn't seem to know who the user is.  I previously got some of that from our
dialup machines here.  Now it's not my style to really figure out what is
going on; I just make a guess and throw in a hack and see what happens.  The
guess is that people log out, get removed from the passwd file, and then
sendmail gets around to sending their mail.

I compiled sendmail 8.6.9 here for the rest of our Athena complex after the
latest security scares.  I found that it worked OK without any messing with
sendmail.cf.  OK, some day I'll have to read the manual about all the spiffy
new features, but for right now things are working.  So I just compiled
8.6.9 on Linux, with hardly any trouble at all, just a few tweaks to the
Makefile.Linux that comes with it.  I used -DHESIOD which comes with it;
I don't know what that does.  Then there are my hacks which seem to greatly
reduce if not eliminate the problem of mail and people not in the passwd
file.  All this seems to be working fine on Linux under Athena, with all of
five minutes testing.  Herewith:


*** 1.1	1994/05/02 22:06:40
--- conf.c	1994/05/02 22:36:56
***************
*** 42,47 ****
--- 42,50 ----
  # include <sys/param.h>
  # include <netdb.h>
  # include <pwd.h>
+ #ifdef UCSC_HESIOD
+ # include <hesiod.h>
+ #endif
  
  /*
  **  CONF.C -- Sendmail Configuration Tables.
***************
*** 399,404 ****
--- 402,411 ----
  		if (myname == NULL || myname[0] == '\0')
  		{
  			pw = getpwuid(RealUid);
+ #ifdef UCSC_HESIOD
+ 			if (pw == NULL)
+ 				pw = hes_getpwuid(RealUid);
+ #endif
  			if (pw != NULL)
  				myname = newstr(pw->pw_name);
  		}
***************
*** 409,416 ****
--- 416,431 ----
  			myname = newstr(myname);
  			if ((pw = getpwnam(myname)) == NULL ||
  			      (uid != 0 && uid != pw->pw_uid))
+ #ifdef UCSC_HESIOD
+ 			if ((pw = hes_getpwnam(myname)) == NULL ||
+ 			      (uid != 0 && uid != pw->pw_uid))
+ #endif
  			{
  				pw = getpwuid(uid);
+ #ifdef UCSC_HESIOD
+ 				if (pw == NULL)
+ 					pw = hes_getpwuid(uid);
+ #endif
  				if (pw != NULL)
  					myname = newstr(pw->pw_name);
  			}
***************
*** 917,923 ****
  
  /* Non Apollo stuff removed by Don Lewis 11/15/93 */
  #ifndef lint
! static char  rcsid[] = "@(#)$Id: conf.c,v 1.1 1994/05/02 22:06:40 haynes Exp $";
  #endif /* !lint */
  
  #ifdef apollo
--- 932,938 ----
  
  /* Non Apollo stuff removed by Don Lewis 11/15/93 */
  #ifndef lint
! static char  rcsid[] = "@(#)$Id: conf.c,v 1.2 1994/05/02 22:36:25 haynes Exp $";
  #endif /* !lint */
  
  #ifdef apollo

home help back first fref pref prev next nref lref last post