# script by Wuytens http://www.wuytens.net # put the script in de domain directory. # you can add a cronjob to run this script daily # the quota is in KByte quota=140 # gives al users in the domain list=`ls -l |grep '^d' | cut -f8 -d' '` for d in $list do #gets the domain name domain=`pwd | cut -b 13-` #makes the email adresses email=$d@$domain #checks how big the mailbox is grootte=`du -ks $d | cut -f1` echo $email" heeft "$grootte" KByte in zijn mailbox en dit is" if [ $grootte -gt $quota ] then echo "te groot" #mail user if quota is reached mutt -s "Mail Quota overschreden" $email < /home/vmail/message.txt else echo "ok" fi done