Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 12th January 2010, 19:45
bluebirdnet bluebirdnet is offline
Member
 
Join Date: Dec 2009
Location: Montreal, Canada
Posts: 50
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by mixo View Post
I have written such a script.
I will be glad if anyone uses it
Code:
#!/bin/bash

/usr/sbin/repquota -au |grep web| sed 's/ \+/ /g' | cut -f1,3,4 -d" " | while read LINE
do
USED=`echo $LINE | cut -f2 -d" "`
QUOTA=`echo $LINE | cut -f3 -d" "`
# TO AVOID DIVISION BY NULL LET'S INCREMENT QUOTA
let "QUOTA +=1"
#CALCULATE PERCENT
let RESULT=USED*100/QUOTA
if [ $RESULT -ge 90 ]&&[ $RESULT -lt 150 ]; then
     NAME=`echo $LINE | cut -f1 -d" "`
     # SEND MAIL
      SUBJ="-= Your mailbox is full =-"
      mutt  -s "$SUBJ" $NAME@example.ge < /usr/src/scripts/message.txt
fi
done
that looks good thanks Mixo!
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Quota Notification Email Script asyadiqin Installation/Configuration 14 23rd July 2010 13:35
Help with Email Alert ethanlifka Server Operation 0 26th February 2009 18:02
quota: howto include datatabase space gilas Installation/Configuration 1 8th November 2008 14:28
ISPConfig Installation error linuxuser1 Installation/Configuration 4 26th February 2008 06:38
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! qvindesland Installation/Configuration 22 21st May 2007 16:05


All times are GMT +2. The time now is 11:29.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.