To: MkLinux Setup list <mklinux-setup@public.lists.apple.com>
Subject: Re: Sendmail (solution)
From: igor@pobox.com
Date: Sat, 9 May 1998 18:59:37 -0400
Sender: owner-mklinux-setup@public.lists.apple.com
My configuration with sendmail involves a couple of nifty tricks:
First, in /etc/rc.d/init.d/sendmail:
case "$1" in
start)
pppon=`ifconfig ppp0 2> /dev/null | grep UP`
if [ -z "$pppon" ]; then
echo -n "Starting sendmail [queue only mode]: "
daemon /usr/sbin/sendmail -bd -oO HoldExpensive=True
else
echo -n "Starting sendmail [remote send mode]: "
daemon /usr/sbin/sendmail -bd
# Send any queued mail. The -v keeps it from segfaulting (bug!)
/usr/sbin/sendmail -q -v > /dev/null
fi
echo
touch /var/lock/subsys/sendmail
;;
stop)
<rest is the same>
Thus, if I'm not online, sendmail simply queues them all up. When I *do* go
online, it configures for instant sending, and sends any queued mail. (BTW,
does sendmail -q without the -v segfault for anyone else?)
Anyhow, in /etc/ppp/ip-up.local, and ip-down.local, I include the line:
/etc/rc.d/init.d/sendmail restart
This has worked quite well for me.
-igor ddkilzer@earthlink.net |