Код: Выделить всё
#!/bin/sh
file=`/usr/bin/du /cgate/CommuniGate/Accounts/quarantine.macnt/INBOX.mbox | /usr/bin/awk '{ print $1 }'`
mfs=1892352 #1848Mb
cm=$file
if [ "$file" -ge "$mfs" ]; then
echo "Current mailbox size is $(("$cm"/1024)) Mb , maximum mailbox size 2048 Mb. Starting rename mailbox script." | mailx -s "MAIL SERVER: quarantine mailbox quota exceeded" it@mail.ru
/usr/local/adm/cg/cg_move
else
echo "Current mailbox size is $(("$cm"/1024)) Mb" | mailx -s "MAIL SERVER: Quarantine" it@mail.ru
fi
df -h |grep -ie '\(Size\|data\|cgate\)' | mailx -s "MAIL SERVER: Statistics" it@mail.ru