diplay quota for all users
Mirosław Jaworski
mjaw at ikp.pl
Thu Dec 21 16:57:12 EST 2006
On Thu, 2006-12-21 at 14:39 -0600, Rafael Mahecha wrote:
> I would like to see the quota for all my users and output that to a
> file... I tried the command bellow in a test server, but I'm still a
> little reluctant to try it on my production server.
>
> su - cyrus -c "/usr/lib64/cyrus-imapd/quota"
> > /mailstore/quotas_list.txt
>
>
> Is there anything to keep in mind while running the command?
> Is there are quota database (I did not see one)?
> Should cyrus be stopped while doing this?
> Are teh any flags/options to the cyrus quota command?
Quotas are stored in plain text files in /var/imap/quota.
Directory is hashed by user's login first character ( 'q' if it's
not in 'a'-'z' range ).
Filename is user's mailbox name ( eg. 'user.<login>' ).
First line is current usage in bytes
Second line is user's quota in kilobytes.
Example:
mail1# pwd
/var/imap/quota
mail1# cat m/user.mjawimap
866269772
1024000
mjawimap user has 1GB quota and uses about 825MB out of it
( 84% usage ).
Bottomline is you can play with these files without any restrictions.
You can change it, generate manually or from robot and it will all
be seen properly by cyrus.
Mentioned everyday quota warning checker can be a simple oneliner
then.
M.
--
Mirosław "Psyborg" Jaworski
GCS/IT d- s+:+ a C++$ UBI++++$ P+++$ L- E--- W++(+++)$ N++ o+ K- w-- O-
M- V- PS+ PE++ Y+ PGP t 5? X+ R++ !tv b++(+++) DI++ D+ G e* h++ r+++ y?
"I didn't fight my way to the top of the food chain to be a vegetarian."
More information about the Info-cyrus
mailing list