#!/sbin/sh # # Copyright (c) 1992, 1995, 1997 - 1999 by Sun Microsystems, Inc. # All rights reserved. # #ident "@(#)sendmail 1.15 99/01/28 SMI" ERRMSG1='WARNING: /var/mail is NFS-mounted without setting actimeo=0,' ERRMSG2='this can cause mailbox locking and access problems.' case "$1" in 'start') if [ -f /usr/lib/sendmail -a -f /etc/mail/sendmail.cf ]; then if [ ! -d /var/spool/mqueue ]; then /usr/bin/mkdir -m 0750 /var/spool/mqueue /usr/bin/chown root:bin /var/spool/mqueue fi MODE="-bd" if [ -f /etc/default/sendmail ]; then . /etc/default/sendmail fi # # * MODE should be "-bd" or null (MODE= or MODE="") or # left alone. Anything else and you're on your own. # * QUEUEINTERVAL should be set to some legal value; # a sanity check is done below. # * OPTIONS is a catch-all; set with care. # if [ -z "$QUEUEINTERVAL" ]; then QUEUEINTERVAL="15m" fi case $QUEUEINTERVAL in *s | *m | *h | *d | *w) ;; *) QUEUEINTERVAL="15m" ;; esac if [ $QUEUEINTERVAL -le 0 ]; then QUEUEINTERVAL="15m" fi /usr/lib/sendmail $MODE -q$QUEUEINTERVAL $OPTIONS & fi if /usr/bin/nawk 'BEGIN{s = 1} $2 == "/var/mail" && $3 == "nfs" && $4 !~ /actimeo=0/ && $4 !~ /noac/{s = 0} END{exit s}' /etc/mnttab; then /usr/bin/logger -p mail.crit "$ERRMSG1" /usr/bin/logger -p mail.crit "$ERRMSG2" fi ;; 'stop') /usr/bin/pkill -x -u 0 sendmail ;; *) echo "Usage: $0 { start | stop }" exit 1 ;; esac exit 0