[Web-cyradm] updated quota is not seen on the web-cyradm interface

Marcel Hartmann mail at marcel-hartmann.com
Fri Dec 14 20:42:08 CET 2007


Hi Leon,

> > I've used the following simple perl script to change users quota from
> > 100MB
> > to 1GB:
> > -----------------------------------------
> > #!/usr/bin/perl -w
> >
> > use Cyrus::IMAP::Admin;
> >
> > #
> > # CONFIGURATION PARAMS
> > #
> > my $cyrus_server = "localhost";
> > my $cyrus_user = "admin";
> > my $cyrus_pass = "secret";
> >
> > # 1 GB
> > my $quota_size = "1048576";
> >
> > my $mechanism = "login";
> >
> > #
> > # EOC
> > #
> >
> > if (!$ARGV[0]) {
> > 	die "Usage: $0 [user to add] \n";
> > } else {
> > 	$newuser = "$ARGV[0]"
> > }
> >
> > sub setQuota {
> >
> > 	my ($user) = @_;
> >
> > 	my $cyrus = Cyrus::IMAP::Admin->new($cyrus_server);
> >
> > $cyrus-
> > >authenticate($mechanism,'imap','',$cyrus_user,'0','100000',$cyrus_pa
> > ss);
> > 	$mailbox = "user/". $user;
> > 	$cyrus->setquota($mailbox,"STORAGE",$quota_size);
> > 	if ($cyrus->error) {
> > 		print STDERR "Error: ", $mailbox," ", $cyrus->error, "\n";
> > 	} else {
> > 		print "Setting Quota: $mailbox at $quota_size \n";
> > 	}
> >
> > }
> >
> > print "Setting quota for user: ", $newuser, "\n";
> >
> > setQuota($newuser);
> > -------------------------------------
> >
> > My usernames are of form "leon" and not "leon.domain.com".
> >
> > I successfully run this script on the mailboxes and check it:
> >
> > # su - cyrus -c "/usr/lib/cyrus/quota -f user/username"
> >    Quota  % Used    Used Root
> >  1048576       0    8612 user/username
> >
> >
> > But on the web-cyradm interface I still see the old quota - 100MB:
> >
> > "Quota used:
> > 8 KBytes out of 1024 KBytes (0.82%)"
> >
> >
> > How could I solve this problem?
> >
> >
> 
> 
> Sorry for bothering you all,
> 
> 
> Everything is working fine.
> I have to get some sleep :)

And what was the rason for this?
How did you get solved this Problem?
Updating the Quota in MySQL to 100MB???

Regards,
Marcel

_____________________________________________

Marcel Hartmann

Bokeler Landstraße 24a    26215 Wiefelstede - Bokel
Tel. 044 02 - 69 50 62	    Fax 044 02 - 69 55 801
e-Mail:                             mail at marcel-hartmann.com 



More information about the Web-cyradm mailing list