How to make sendmail re-read the configuration file

Paul Sutcliffe Jr. paul at devon.UUCP
Thu Jan 15 23:52:06 AEST 1987


In article <136 at quacky.mips.UUCP>, dce at mips.UUCP (David Elliott) writes:

> I would like to modify sendmail to have it re-read the configuration
> file on some given signal (HUP?), but I am worried that sendmail
> can't handle this without modifications elsewhere. Is there anyone
> with a lot of sendmail experience that can help me out?

Why not do what cron(1) does.  Perform a stat() call on the file's fd
after it is first opened and save the st_mtime value somewhere (the
last modification time of the file).  Then have sendmail re-stat the
file every time it is awakened, compare the new st_mtime value with the
saved one, and if the new one is greater (the config file has been
modified since the original read), re-read the file.

-paul

-- 
Paul Sutcliffe, Jr.	 UUCP: {seismo,ihnp4,allegra,rutgers}!cbmvax!devon!paul
Devon Computer Services  COMPUSERVE: 76176,502
Allentown, Penna.	 "I love work ..."
+1 215 398 3776 	 "... I could sit and watch people do it all day!"



More information about the Comp.unix.questions mailing list