On Dec 12, 2007 3:16 AM, Alain Spineux <[EMAIL PROTECTED]> wrote:
> Using imtest, when login as a user and requesting for quota, i get :
>
> 0 GETQUOTA INBOX
> 0 NO Permission denied

I thing IMAP protocol need to retrieve the quotaroot of the folder first,
the answere is "user/alain.spineux", look below.
Then  request for the quota of this quotaroot, but this is useless because the
I already get the info I wanted withe the first request, anyway trying

0 GETQUOTA user/alain.spineux
0 NO Permission denied

return the same unexpected result !

This is because :

void cmd_getquota(const char *tag, const char *name)
{
    int r;
    struct quota quota;
    char quotarootbuf[MAX_MAILBOX_PATH+3];
    char mailboxname[MAX_MAILBOX_NAME+1];
    int mbtype;
    char *server_rock = NULL, *server_rock_tmp = NULL;

    imapd_check(NULL, 0, 0);

    if (!imapd_userisadmin) r = IMAP_PERMISSION_DENIED;
    else {
        r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
                                                   imapd_userid, mailboxname);
    }

....

on the other hand getquotaroot check the user ACL (MYRIGHT) !

I thing this is a bug!
No very blocking, because IMAP client must ask for the quotaroot first
and get the answer then !

Regards


>
> but
>
> 0 GETQUOTAROOT INBOX
> * QUOTAROOT INBOX user/alain.spineux
> * QUOTA user/alain.spineux (STORAGE 9092 10240)
> 0 OK Completed
>
> on the other and when logged as cyrus user, I get the expected result.
>
> 0 GETQUOTA user/[EMAIL PROTECTED]
> * QUOTA user/[EMAIL PROTECTED] (STORAGE 9092 10240)
> 0 OK Completed
>
> and
>
> 0 GETQUOTAROOT user/alain.spineux
> 0 NO Mailbox does not exist
> 0 GETQUOTAROOT user/[EMAIL PROTECTED]
> * QUOTAROOT user/[EMAIL PROTECTED] user/[EMAIL PROTECTED]
> * QUOTA user/[EMAIL PROTECTED] (STORAGE 9092 10240)
> 0 OK Completed
>
> any explanation ?
>
> Regards.
>
> --
> Alain Spineux
> aspineux gmail com
> May the sources be with you
>



-- 
Alain Spineux
aspineux gmail com
May the sources be with you
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Reply via email to