Re: [exim] quota() in cyrus:imap:admin and lq in cyradmin

Etusivu
Poista viesti
Vastaa
Lähettäjä: Chris Thompson
Päiväys:  
Vastaanottaja: Jack or maybe Sam
Kopio: exim-users
Aihe: Re: [exim] quota() in cyrus:imap:admin and lq in cyradmin
Jack <jack@???> writes:

> I don't know how to use the quota() function from the Cyrus::imap:admin
> module.
> The result returned from the quota() function is different from running
> lq command in cyradm.
> Please see below for illustration.
>
> In cyradm:
>
> > lq user/bob@???
> STORAGE 0/512000 (0%)
>
> Cyrus::IMAP:Admin:
>
> my %quota;
> my $e;
> my $r;
> my $mailbox = 'user/bob@???';
> ($e, %quota, $r) = $cyrus->quota($mailbox);
> print "E: ".$e."\n";
> print "%quota: ".%quota."\n";
>
> The output of runing the above perl is:
> E: STORAGE
> %quota: 1/8
>
> I feel confused with this value from the quota() function. What is 1/8
> stands for? how come it's not 0/512000 ?


Brush up your Perl. You are converting a hash to a scalar in your print
statement. Check the manual for (the rather strange thing) that does.

You probably want to print each element of the hash,

foreach (keys %quota) {print $_,": ",$quota{$_},"\n"};

> Thanks
> Sam


How many names do you have? :-)

Apologies to everyone else for continuing an off-topic thread.

Chris Thompson
Email: cet1@???