Installing new sendmail version(s)

Barry Shein bzs%bu-cs.bu.edu at CSNET-RELAY.arpa
Mon Jul 7 07:35:46 AEST 1986



From: Barbara Graham <bgrm at MITRE-BEDFORD.ARPA>

>This should be an easy question (for somebody).  I've installed a fix to
>sendmail that was posted to the net some time ago.  Now I want to install the
>new version, but since I have a sendmail daemon running, I can't just move the
>new sendmail into place.  It seems that if I kill the daemon, I'll hang the
>socket, so a new sendmail daemon won't be able to create the (already
>existing) socket.
>
>Has anybody out there managed to install a new version of sendmail without
>rebooting?

I do this all the time (unfortunately.) I am not sure what the problem
is or what version you might be running but it really should work.

The only thing I can think of off-hand is that a child sendmail is
running, try:

	ps agx|grep sendmail

and see if other sendmails are running, if so make sure to kill them
all or wait for quiescence (a sendmail killed in the middle of a
transfer SHOULD recover and resend later, either way, but this
might cause problems, like the message getting sent twice, nothing
catastrophic, I actually wouldn't guarantee it's ever caused a
problem, just a little healthy paranoia.) Another possibility is to
kill the parent (lowest PID probably, the one that 'ps' shows the -bd
arg for) and wait for any children to die off [finish, that is] tho
this will of course put your mail system out of service for incoming
connections until you restart.

This is with 4.2bsd, if you are running something else then this may
not apply. Another thing to do is 'netstat' to see what it is holding
the socket open. It is possible you have a child hung I suppose (maybe
one of those FIN_WAIT_2 problems? netstat should reveal this.)

To just move the sendmail into place RENAME the old sendmail as in
'mv /usr/lib/sendmail /usr/lib/sendmail.old', then move the new one.
Remember that the freeze file (sendmail.fc) has to be rebuilt by
the new sendmail image (-bz) or great indigestion will result. After this
you can just wait till the system goes through a reboot, which will
automatically start the new sendmail (also, all new invocations of
sendmail will refer to the new one.) I don't love this but if the
fix you made is not that critical it should be OK, use your common
sense (is this true folks? I don't see why not but I always just kill
them all off and restart.)

	-Barry Shein, Boston University



More information about the Comp.unix.wizards mailing list