Re: diplay quota for all users

2006-12-21 Thread Rafael Mahecha

Thanks for the quick answer, Andrew.

what about any data corruption? I mean, is there a quota db?
- Original Message - 
From: Andrew Morgan [EMAIL PROTECTED]

To: Rafael Mahecha [EMAIL PROTECTED]
Cc: Cyrus Info List info-cyrus@lists.andrew.cmu.edu
Sent: Thursday, December 21, 2006 3:13 PM
Subject: Re: diplay quota for all users



On Thu, 21 Dec 2006, 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?


We run the quota command nightly on each of our backends in order to 
generate a list of people that are nearing their email quota.  It takes 
approximately a minute to run, and has no real performance impact on the 
servers.  There are a few options for the quota command, which are 
documented in the manpage.


 Andy 



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


Re: diplay quota for all users

2006-12-21 Thread Rafael Mahecha

sorry... one more thing... is this the man page that are talking about?
http://cyrusimap.web.cmu.edu/imapd/man/quota.8.html
- Original Message - 
From: Andrew Morgan [EMAIL PROTECTED]

To: Rafael Mahecha [EMAIL PROTECTED]
Cc: Cyrus Info List info-cyrus@lists.andrew.cmu.edu
Sent: Thursday, December 21, 2006 3:13 PM
Subject: Re: diplay quota for all users



On Thu, 21 Dec 2006, 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?


We run the quota command nightly on each of our backends in order to 
generate a list of people that are nearing their email quota.  It takes 
approximately a minute to run, and has no real performance impact on the 
servers.  There are a few options for the quota command, which are 
documented in the manpage.


 Andy 



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


Re: diplay quota for all users

2006-12-21 Thread Andrew Morgan

On Thu, 21 Dec 2006, 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?


We run the quota command nightly on each of our backends in order to 
generate a list of people that are nearing their email quota.  It takes 
approximately a minute to run, and has no real performance impact on the 
servers.  There are a few options for the quota command, which are 
documented in the manpage.


Andy

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


Re: diplay quota for all users

2006-12-21 Thread Andrew Morgan

On Thu, 21 Dec 2006, Rafael Mahecha wrote:


Thanks for the quick answer, Andrew.

what about any data corruption? I mean, is there a quota db?


There are individual quota files for each mailbox, stored in:

  {configdirectory}/quota/prefix/mailbox

If these are ever out of sync with the on-disk contents (maybe you 
restored some mail from a backup, for example), then you can run quota -f 
mailbox to recalculate the usage.



sorry... one more thing... is this the man page that are talking about?
http://cyrusimap.web.cmu.edu/imapd/man/quota.8.html


Yep!

Andy

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


diplay quota for all users

2006-12-21 Thread Rafael Mahecha
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?

Any help is greatly appreciated.

Thanks.
:
Rafael Mahecha

Email / Systems Administrator
JSU OIM - Web Services
[EMAIL PROTECTED]
http://www.jsums.edu
:
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

Re: diplay quota for all users

2006-12-21 Thread Mirosław Jaworski
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.


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


Re: IMAP sync tool (rsync for IMAP)

2006-12-21 Thread David Lang

On Thu, 21 Dec 2006, Florin Andrei wrote:

I'm currently using two IMAP accounts, one on Cyrus-2.2 the other on 
Cyrus-2.3.


The one on Cyrus-2.3 will get decomissioned so I need to transfer all my 
email, preserving the folders/subfolders tree, under a specific folder 
(oldmail/foo/bar) on the 2.2 server.
I need to do the bulk of the transfer sometime soon, then sync up again a few 
times after that, until the day the account on the 2.3 server gets nuked.


Essentially, I need a tool that I can point at servers A and B and tell it 
get all the email from my account on server A to a specific folder on my 
account on server B, preserving the subfolders hierarchy.
The tool needs to be smart enough to repeat the operation later on but then 
it must only transfer the new messages.
The tool may run on one or the other IMAP servers, or even on a 3rd machine, 
since it should be network-based. Pretty much all systems are Linux 'round 
here, some Windows stragglers too.


Sort of like rsync for IMAP, if that makes sense.

So far, the only tool I've found is imapsync:

http://freshmeat.net/projects/imapsync/

Anyone tried it with Cyrus? Good/bad experiences?


I just used it to move from 2.1 to 2.3, there were a handful of messages it 
didn't like (~30 out of a few hundred thousand messages) but it appears to have 
worked well enough to fix the last few messages manually.


most of the errors were cases of invalid headers that 2.3 wouldn't accept, but 
2.1 obviously did.


David Lang


Are there any other tools that work better with Cyrus?




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