[Comm] сообщения в postfix
Igo
=?iso-8859-1?q?altlinux_=CE=C1_aaanet=2Eru?=
Вт Авг 15 09:17:17 MSD 2006
извиняюсь за большое письмо
[root на localhost /]# cat /home/igo/scripts/checkmail.sh
#!/bin/bash
/usr/sbin/postconf -e always_bcc=
/sbin/service postfix reload
PATHARC="/var/spool/mailarc"
MAXSIZE=100000000
ARCHMBOX="/usr/local/bin/archmbox"
MDIR="/var/spool/mail"
DIRARC="/var/spool/mailarc"
for i in `dir $PATHARC`
do
if [ $i != "gen" ]; then
FILENAME=$PATHARC/$i
FILESIZE=`ls -l $PATHARC/$i | awk '{print $5}'`
if [ $MAXSIZE -le $FILESIZE ]; then
rm -rf $FILENAME | mail igo -s "$FILENAME WAS REMOVED"
fi
fi
done
$ARCHMBOX -a -o 3 $MDIR/director -p $DIRARC
....
$ARCHMBOX -a -o 3 $MDIR/anya -p $DIRARC
echo "---------------General mail reserved "
FILENAME="/var/spool/mail/gen"
PATHARC="/var/spool/mailarc/gen"
FILESIZE=`ls -l $FILENAME | awk '{print $5}'`
GENDIR="/var/spool/mailarc/gen"
CNT=0
DEL=40
for i in `dir -c $PATHARC`
do
FILENAME=$PATHARC/$i
if [ $DEL -le $CNT ]; then
# mail igo -s "$FILENAME - many archives"
rm -rf $FILENAME | mail igo -s "$FILENAME WAS REMOVED"
fi
CNT=$(( $CNT+1 ))
done
FILENAME="/var/spool/mail/gen"
OUT=`date "+%Y%m%d%H"`
if [ $MAXSIZE -le $FILESIZE ]; then
$ARCHMBOX -a --bzip2 -c -e $OUT -o -1 $FILENAME -p $GENDIR
fi
/usr/sbin/postconf -e always_bcc=gen
/sbin/service postfix reload
---------------------------
это отчет от крона , никаких ошибок в нем нет.
djusting environment for postfix: [ DONE ]
Reloading postfix configuration: [ DONE ]
Null message body; hope that's ok
Mailbox /var/spool/mail/director (23978 KB)
Archived 0 messages out of 218 (0 KB)
......
Mailbox /var/spool/mail/anya (7238 KB)
Archived 0 messages out of 69 (0 KB)
---------------General mail reserved
Adjusting environment for postfix: [ DONE ]
Reloading postfix configuration: [ DONE ]
Подробная информация о списке рассылки community