|
From: Craig W. <cra...@az...> - 2006-01-24 16:30:17
|
On Tue, 2006-01-24 at 14:44 +0800, Murray Trainer wrote:
> On Mon, 2006-01-23 at 18:49, Jamie Cameron wrote:
> > On Mon, 2006-01-23 at 18:19, Murray Trainer wrote:
> > > On Thu, 2006-01-19 at 17:24, Murray Trainer wrote:
> > > > On Thu, 2006-01-19 at 16:11, Jamie Cameron wrote:
> > > > > On Thu, 2006-01-19 at 18:25, Murray Trainer wrote:
> > > > > > Hi Jamie,
> > > > > >
> > > > > > Just setting up the latest version of the module. We haven't used IMAP
> > > > > > quotas yet. I want a default Cyrus quota of 1GB for new users - what
> > > > > > format(s) do I enter that in the IMAP quota field - Bytes ,MB, GB?
> > > > > > Maybe which ever one(s) it is could be put in brackets - eg. Default
> > > > > > quota for new Cyrus users (MB).
> > > > >
> > > > > I am not 100% sure actually, as that value is just passed directly to
> > > > > the IMAP server via an IMAP command. However, I would guess that the
> > > > > size is in the bytes.
> > > > >
> > > > > As you might guess from looking at the module, I don't run a Cyrus IMAP
> > > > > server myself, so those parts of it that deal with IMAP are not too well
> > > > > tested :)
> > > >
> > > > I just noticed that the Cyrus IMAP Server module manages Cyrus mailbox
> > > > quotas - it uses Kb. I will let you know if I figure out what your
> > > > modules uses.
> > > >
> > > > Murray
> > >
> > > Hi Jamie,
> > >
> > > Just confirmed your module creates IMAP quotas in Kb.
> >
> > Thanks ..
> >
> > > It would be a useful for our company to have a quota field appear in the
> > > LDAP Users module containing the user's current quota so we can give
> > > them a larger one than the default if required.
> >
> > That would be nice .. but I don't know which IMAP command to use to
> > query the current quota. In fact, I don't think there is one ..
> >
> > - Jamie
>
> Hi Jamie,
>
> I looked into it and it appears you use the NET::IMAP perl module in
> ldap-useradmin-lib.pl. The code you use to set the user's quota in
> save_user.cgi is:
>
> if ($config{'quota'}) {
> # Set his IMAP quota
> $rv = $imap->setquota("user.".$user,
> "STORAGE", $config{'quota'});
> $rv->{'Status'} eq 'ok' ||
> &imap_error($text{'usave_eiquota'}, $rv);
> }
>
> I would assume you would use the getquota function described below to
> get the current quota on the mailbox.
>
> http://search.cpan.org/~kjohnson/NetxAP-0.02/Net/IMAP.pm#getquota_%24quotaroot
>
----
Murray - have you checked out Roberto Tecchio's Cyrus IMAPd module
(listed in 3rd party modules)?
http://www.tecchio.net/webmin/cyrus/
It's truly awesome and provides a lot more utility for
repair/reconstruct/quota stuff.
Craig
|