GETQUOTA INBOX --> NO Permission denied
Alain Spineux
aspineux at gmail.com
Fri Dec 14 18:06:25 EST 2007
On Dec 12, 2007 3:16 AM, Alain Spineux <aspineux at gmail.com> 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/alain.spineux at mydomain.loc
> * QUOTA user/alain.spineux at mydomain.loc (STORAGE 9092 10240)
> 0 OK Completed
>
> and
>
> 0 GETQUOTAROOT user/alain.spineux
> 0 NO Mailbox does not exist
> 0 GETQUOTAROOT user/alain.spineux at mydomain.loc
> * QUOTAROOT user/alain.spineux at mydomain.loc user/alain.spineux at mydomain.loc
> * QUOTA user/alain.spineux at mydomain.loc (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
More information about the Info-cyrus
mailing list