Get big inbox users

Posted: November 21, 2009 in enism

find /home/virtual/site*/fst/var/spool/mail/ -size +100000k > /root/biginboxes.txt

Code to get the details from the above txt file

for i in `cat biginboxes.txt`
do
SITE=`grep $i biginboxes.txt | cut -d’/’ -f4`
SITEN=`sitelookup -s $SITE | cut -d’,’ -f1`
USERN=`grep $i biginboxes.txt |cut -d’/’ -f9`
DSKS=`du -sh $i |cut -f1`
echo “$SITEN -> user: $USERN = $DSKS”
done

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s