It will be necessary to start up the
sendmail daemon when your system reboots.
This daemon performs two functions:
it listens on the SMTP socket for connections
(to receive mail from a remote system)
and it processes the queue periodically
to insure that mail gets delivered when hosts come up.
Add the following lines to
/etc/rc.local as appropriate)
in the area where it is starting up the daemons:
rm commands insure that all lock files have been removed;
extraneous lock files may be left around
if the system goes down in the middle of processing a message.
The line that actually invokes
sendmail has two flags:
-bd causes it to listen on the SMTP port,
-q30m causes it to run the queue every half hour.
- if [ -f /usr/sbin/sendmail -a -f /etc/sendmail.cf ]; then
(cd /var/spool/mqueue; rm -f [lnx]f*)
/usr/sbin/sendmail -bd -q30m &
echo -n ' sendmail' >/dev/console
Some people use a more complex startup script,
removing zero length qf files and df files for which there is no qf file.
For example, see Figure 1
for an example of a complex startup script.
# remove zero length qf files
for qffile in qf*
if [ -r $qffile ]
if [ ! -s $qffile ]
echo -n " <zero: $qffile>" > /dev/console
rm -f $qffile
# rename tf files to be qf if the qf does not exist
for tffile in tf*
qffile=`echo $tffile | sed 's/t/q/'`
if [ -r $tffile -a ! -f $qffile ]
echo -n " <recovering: $tffile>" > /dev/console
mv $tffile $qffile
echo -n " <extra: $tffile>" > /dev/console
rm -f $tffile
# remove df files with no corresponding qf files
for dffile in df*
qffile=`echo $dffile | sed 's/d/q/'`
if [ -r $dffile -a ! -f $qffile ]
echo -n " <incomplete: $dffile>" > /dev/console
mv $dffile `echo $dffile | sed 's/d/D/'`
# announce files that have been saved during disaster recovery
for xffile in [A-Z]f*
echo -n " <panic: $xffile>" > /dev/console
- Figure 1 -- A complex startup script
If you are not running a version of UNIX
that supports Berkeley TCP/IP,
do not include the
[Contents] [Previous] [Next]
Questions or problems regarding this web site should be directed to Steve Gielda.
Copyright © 1999 www.cotse.com. All rights reserved.
Last modified: Friday April 02, 1999.