Problem when shut/start sendmail and mailscanner

Fernando L. M. Gonçalves flmg5855 at TJ.SC.GOV.BR
Mon Aug 19 22:09:13 IST 2002


> >And when there is only "df" files in the mqueue.in directory ?
>
> If there are only df files, you might as well delete them, as you certainly
> don't have enough info to be able to deliver them.
>

This result in lost messages ... alright ?



>
> >I don't found the script in www.sendmail.org.
>
> Here's the relevant bit:
>
> SENDMAIL=/opt/sendmail/current
> QUEUE=/var/spool/mqueue
> INQUEUE=/var/spool/mqueue.in
> CF=$SENDMAIL/etc/sendmail.cf
>
> # Install everything if necessary (needed after careless Sun patching)
> [ -x $SENDMAIL/bin/install.sendmail ] && $SENDMAIL/bin/install.sendmail
>
> # Make placeholders for status files
> [ -d $SENDMAIL/var/status ]      || mkdir $SENDMAIL/var/status
> [ -f $SENDMAIL/var/sendmail.st ] || touch $SENDMAIL/var/sendmail.st
>
> echo "Starting sendmail:\c"
>
> echo " clean up queue\c"
> for queuedir in $QUEUE $INQUEUE
> do
>    cd $queuedir
>
>    # remove zero length qf files
>    for qffile in qf*
>    do
>          if [ -r $qffile ]; then
>                  if [ ! -s $qffile ]; then
>                          rm -f $qffile
>                  fi
>          fi
>    done
>    # rename tf files to be qf if the qf does not exist
>    for tffile in tf*
>    do
>          qffile=`echo $tffile | sed 's/t/q/'`
>          # JKF 15/7/98 Put $qffile in quotes in case tffile = 'tf*'
>          if [ -r $tffile -a ! -f "$qffile" ]; then
>                  mv $tffile $qffile
>          else
>                  if [ -f $tffile ]; then
>                          rm -f $tffile
>                  fi
>          fi
>    done
>    # remove df files with no corresponding qf files
>    for dffile in df*
>    do
>          qffile=`echo $dffile | sed 's/d/q/'`
>          if [ -r $dffile -a ! -f $qffile ]; then
>                  mv $dffile `echo $dffile | sed 's/d/D/'`
>          fi
>    done
>    # announce files that have been saved during disaster recovery
>    for xffile in [A-Z]f*
>    do
>          if [ -f $xffile ]; then
>                  echo " <saved mail spool $xffile>\c"
>          fi
>    done
> done
>
> # Now actually start the damn thing...
> #$SENDMAIL/bin/sendmail -q15m
> #$SENDMAIL/bin/sendmail -bd -ODeliveryMode=queueonly
> -OQueueDirectory=/var/spool/mqueue.in
>

Sorry, but I don't understood this script. Where I put it ?



More information about the MailScanner mailing list