How to make sendmail re-read the configuration file

Barry Shein bzs at bu-cs.BU.EDU
Sun Jan 11 11:20:20 AEST 1987


Re: making sendmail re-read cf file on signal...

Assuming it's a hard thing to add, how about just a 10 line C program
which fork/execs sendmail (in a process group) and waits for the signal.
When received kills its child and starts another fresh one.

Not entirely sure what the advantage is over just killing and
rerunning the sendmail unless you're worried about the small window in
which there is no daemon running. I guess the little hack above could
put its pid into a file or something making it easier to find
(mqueue/.pid). Maybe just teaching sendmail to re-exec itself on
receipt of a signal would be sufficient (or have it squirrel away
the change date of the .cf file and re-exec on that updating, have
it check as it starts each q run.)

Just thinking out loud.

	-Barry Shein, Boston University



More information about the Comp.unix.questions mailing list