Re: diplay quota for all users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.

That's not tue for all systems. Depending on which Cyrus version you use,
quota can be stored using different backend, the one you say is
quota_legacy. Using quota(8) always works and is therefore recommended.

Simon

> 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."
>
> ----
> Cyrus Home Page: http://cyrusimap.web.cmu.edu/
> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux