🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.sendmail
Article #3542

Re: logging sendmail with syslogd

#3542
From: Christoph Rimek
Date: Thu, 22 Feb 1996 00:00
67 lines
2634 bytes
Hello

In article <62v6T2voo$B@rimki.toppoint.de>, chrimek (chrimek@rimki.toppoint.de) wrote:

> > [...]
> > dont forget to give SIGHUP i.e,
> >
> > kill -HUP `cat syslog.pid`
>
> I don't know how Linux handles this, but my sendmail 8.6.12 on a
> NetBSD 1.1 machine has a two-lines file /var/run/sendmail.pid.
> The first line holds the proces ID, the second one repaets the
> command line used to invoke sendmail.
>
> $ cat -n /var/run/sendmail.pid
> 1: 27731
> 2: sendmail -bd -q15m
>
> So I have to call
> $ kill -HUP `head -1 /var/run/sendmail.pid`
        ^^^^^^^

Oh, my mistake, I do not use HUP but KILL signals for this.
Mr. Soren Dayton told (mailed) me that sendmail 8.6.12 does not accept
HUP signals.

The short script I use to restart sendmail follows:
(/usr/local/sbin/restart_sendmail)

---------------------cut here------------------------------
#!/bin/sh
#
# restart sendmail daemon
# 07-feb-96 (chrimek)

PATH=/sbin:/bin:/usr/sbin:/usr/bin
PIDFILE=/var/run/sendmail.pid

if [ ! -f $PIDFILE ]; then
        echo "Error: No file $PIDFILE found, cannot continue."
        echo "       Maybe sendmail daemon not running at all ?"
        echo ""
        exit 1
fi

SM_PID=`head -1 $PIDFILE`
SM_CMD=`tail -1 $PIDFILE`

echo -n "Terminate running sendmail ...."
kill -KILL $SM_PID && rm -f $PIDFILE
sleep 3

echo -n " and restarting new daemon"
eval $SM_CMD
echo "."
sleep 3

echo "New sendmail process ID= `head -1 $PIDFILE`."
exit 0
---------------------cut here-------------------------------


The sleep statements are nessessary !
-cr

--
Christoph Rimek, Kiel, Germany  (+49 431 57601)      chrimek@toppoint.de
Technical Details
Message-ID: <63MIWCq3o$B@rimki.toppoint.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <4f8seo$oe0@ngriffin.itc.gu.edu.au> <4fb440$k0o@isg.hboc.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c696,94a1fef176403b9b
X-Google-Attributes: gid10c696,public
X-Google-Thread: 102983,94a1fef176403b9b
X-Google-Attributes: gid102983,public
X-Google-Thread: 10de99,94a1fef176403b9b
X-Google-Attributes: gid10de99,public
X-Google-Thread: 10669a,94a1fef176403b9b
X-Google-Attributes: gid10669a,public
X-Google-Thread: f9b51,94a1fef176403b9b
X-Google-Attributes: gidf9b51,public
From: chrimek@rimki.toppoint.de (Christoph Rimek)
Subject: Re: logging sendmail with syslogd
Date: 1996/02/22
Message-ID: <63MIWCq3o$B@rimki.toppoint.de>
X-Deja-AN: 141030067
references: <4f8seo$oe0@ngriffin.itc.gu.edu.au> <4fb440$k0o@isg.hboc.com>
organization: Toppoint Mailbox e.V.
keywords: sendmail linux syslog syslogd
reply-to: chrimek@toppoint.de
newsgroups: comp.mail.sendmail,aus.computers.linux,comp.os.linux.development.apps,comp.os.linux.networking,comp.os.linux.setup