Users with maximum utilisation of quota

Hi,I have some query regarding utilisation of mail store space.- How can I get the list of users who are utilsing maximum mailbox space.- How can I delete mails of those users which are old enough by specifying the date.TIA.Nawaz
[271 byte] By [Nawaz_ita] at [2007-11-27 5:28:17]
# 1
Hi,What version of messaging server are you running. The available quota commands and message expiration commands has changed across the major version releases.Regards,Shane.
shane_hjortha at 2007-7-12 14:50:26 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 2
Hi Shane,Please find the required info below:Sun Java(tm) System Messaging Server 6.2-3.04 (built Jul 15 2005)libimta.so 6.2-3.04 (built 01:43:03, Jul 15 2005)SunOS rmail.rilinfo.net 5.9 Generic_118558-25 sun4u sparc
Nawaz_ita at 2007-7-12 14:50:27 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 3

Hi,

The ./imquotacheck command provides an output of the quota usage per-user on the mail-store. With some simple scripting you can get the top-10 users per-quota usage e.g.

./imquotacheck | awk '{print $3 " " $1}' | grep '[0-9]' | sort -k1 -nr | head -10

*NOTE*

YOU NEED TO TEST THE FOLLOWING YOURSELF VERY CAREFULLY ON A TEST SERVER

INCORRECT USAGE COULD DELETE LOTS OF MAIL ON YOUR SYSTEM

To expire (delete) old messages for the users listed you could do something like the following:

1. Create an expire rule file; messagedays specifies that emails older then this are deleted - in this case 6 months e.g.

# cat /tmp/expire.rule

Rule1.regexp: 1

Rule1.folderpattern: user/.*

Rule1.messagedays: 180

2. Run the imexpire command in trial-run only using the rule file above for one of the users who you want to clean up:

./imexpire -n -v 3 -f /tmp/expire.rule -u <high quota user ID>

e.g.

./imexpire -n -v 3 -f /tmp/expire.rule -u user001@domain1.com

3. Once you are happy that the files being removed are correct and only for that single user, run the command in 'active' mode (no -n option):

./imexpire -v 3 -f /tmp/expire.rule -u <high quota user>

e.g.

./imexpire -v 3 -f /tmp/expire.rule -u user001@domain1.com

4. Run the same command for the other users who you want to clean up (delete) old emails.

Regards,

Shane.

shane_hjortha at 2007-7-12 14:50:27 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 4
Hi Shane,A tons of thank to you.Regards,Nawaz
Nawaz_ita at 2007-7-12 14:50:27 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...