|
From: Jamie C. <jca...@we...> - 2006-07-21 19:37:14
|
On 19/Jul/2006 19:02 Murray Trainer wrote ..
> Hi Jamie,
>
> Thanks for all your modifications to this module to date. I haven't
> asked for anything for a while so here goes :-) The module currently
> has a hard coded IMAP quota value in its config which has been fine
> until now. We now need to create different classes of users with
> different IMAP quotas. We use the Cyrus IMAP module for maintaining
> user mailboxes but want to keep the user creation process to a single
> step. An IMAP quota field in the user creation/edit screen that can
> override the module's default IMAP quota would be really helpful.
>
> 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 could 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
>
> Hope you're not too busy to have a look at this one if you think it's a
> reasonable idea.
That is quite a good idea, and I have just added it to the module. However
I don't actually run a Cyrus IMAP server myself, so I can't fully test it!
But you can, by downloading the module from :
http://www.webmin.com/updates/ldap-useradmin-1.290-4.wbm.gz
Let me know how it goes.
- Jamie
|