|
From: Murray T. <mtr...@ce...> - 2006-07-20 02:02:06
|
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.
Thanks
Murray
|