TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [TCLUG:3606] sendmail crash





> -----Original Message-----
> From: Sandipan Panigrahi [mailto:pani@frontiernet.net]
> Sent: Thursday, January 21, 1999 12:46 PM
> To: tclug-list@listserv.real-time.com
> Subject: [TCLUG:3606] sendmail crash
>
>
> Hi,
> I am having trouble with the sendmail daemon on a RedHat 5.1
> installation. sendmail dies sometimes and I would like to be
> able to restart it automatically if it does. Right now it gets
> started as a part of the /etc/rc.d/rc*/ boot time initialization.
>
> To make it restart if it fails can I modify the /etc/inittab and add
> an entry for sendmail ? Or can I have /etc/inetd.conf handle this ?
> Or is there any other option that I have.
>

	First and foremost, try and figure out why it's crashing -- every sendmail
crash I've ever encountered was traceable to bad configuration or system
problems somehow.  I'm sure the list can give you some help if you can dig
the relevant info out of the system logs.  Sendmail has all kinds of debug
flags you can turn on, and if you really want to see what's happening, you
could always run it in the foreground on a spare virtual terminal and see
what happens when it dies.  While you're at it, run "mailq" to see if
there's a message that's been hanging around for a long time -- that may be
your culprit. "sendmail -q -v" will show you what happens when sendmail
tries to process it.
	Running sendmail from inetd might work, but it's a bad idea unless you have
very little mail traffic.  This is a strongly discouraged tactic.
	However, it should be easy to run a shell script thru cron every five
minutes that looks to see if sendmail is still in the list of running
processes, and if it doesn't find it, runs '/etc/rc.d/init.d/sendmail
restart'.  You might also want to have that script drop you a line somehow
to let you know that "it happened again at HH:MM dd/mm/yyyy", so you can
check the system logs to see what was going on around that date and time.