#!/bin/sh
. /usr/local/ifmail/sets
exec >>$LOGDIR/CLEANUP.LOG 2>&1

/usr/sbin/chown -R fnet.fnet $SPOOL
/bin/chmod -R ug+rw $SPOOL

# cleaning zero length files
cd $SPOOL/outb
for i in *.aaa *.mo? *.tu? *.we? *.th? *.fr? *.sa? *.su?
do
  if [ ! -f $i ]
  then
    continue
  fi
  if [ ! -s $i ]
  then
    echo -n Empty:
    ls -la $i
    rm $i
  fi
done
