[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cyrus-devel
Subject:    Question about cyrus IMAP and QUOTA.
From:       "Aristotelis" <arisg () noc ! uoa ! gr>
Date:       2004-02-11 16:02:18
Message-ID: 20804.195.134.100.8.1076515338.squirrel () 195 ! 134 ! 100 ! 8
[Download RAW message or body]


  Hello all,

 I have a question about the behaviour of cyrus imap conserning
the use of quotas.

 From the IMAP RFC it says that on the CREATE command :

   If the server's hierarchy separator character appears elsewhere in
      the name, the server SHOULD create any superior hierarchical names
      that are needed for the CREATE command to be successfully
      completed.  In other words, an attempt to create "foo/bar/zap" on
      a server in which "/" is the hierarchy separator character SHOULD
      create foo/ and foo/bar/ if they do not already exist.

 Ihe cyrus imapd if you try to create  foo/bar without the previous
creation of foo, then with the list command we get:
 . LIST * %
* LIST (\NonExistent \Noselect \HasChildren) "." "foo"
* LIST (\HasNoChildren) "." "foo.bar"


 foo folder is non existent, and Non selected.

 If we try to run setquota command on foo we have:
. SETQUOTA "foo" (STORAGE 512)
. NO Mailbox does not exist

 on foo.bar no problem :

. SETQUOTA "foo.bar" (STORAGE 512)
. OK Completed


  According to the IMAP QUOTA RFC :
Quota root names do not necessarily have to match the names of
   existing mailboxes.

  and setquota command takes a quota root, not a mailbox argument.

 On the other hand .. if we try another approach and
we create foo and then bar . For example :

. CREATE foo


and then :
. LIST * %
* LIST (\HasChildren) "." "foo"
* LIST (\HasNoChildren) "." "foo.bar"


we can set the quota :
. SETQUOTA "foo" (STORAGE 512)
. OK Completed

 and by asking for the quota file of foo.bar we get :
. GETQUOTAROOT foo.bar
* QUOTAROOT foo.bar foo
* QUOTA foo (STORAGE 0 512)

 if we delete foo afterwards:
 . DELETE foo
. OK Completed

and list:

. LIST * %
* LIST (\NonExistent \Noselect \HasChildren) "." "foo"
* LIST (\HasNoChildren) "." "foo.bar"

and we ask the quota root for foo.bar we get :

. GETQUOTAROOT foo.bar
* QUOTAROOT foo.bar foo
* QUOTA foo (STORAGE 0 512)
. OK Completed


 the strange thing is :
. SETQUOTA foo (STORAGE 1024)
. OK Completed

. GETQUOTA foo
* QUOTA foo (STORAGE 0 1024)


. GETQUOTAROOT foo.bar
* QUOTAROOT foo.bar foo
* QUOTA foo (STORAGE 0 1024)
. OK Completed

   From all this listing and example we get this 2 different
behaviours from cyrus-imap :

1) If the folder existed and gets deleted it stays in the folder
hierarchy and the quota stays. The quota can change afterwards. This
way we can have an hierarchy of folders with the parent folder
non existent but a total quota value.
2) If the folder doesn't exist then the quota cannot be set. So we
cannot have the possibility of a group of folders with a total
quota.


 The case of a group of folders is useful if we want to have
for example a group of folders that we store FUNNY stuff. We
could have then :
 FUNNY.movies
 FUNNY.pictures
 and so on.

 We would like to set a total quota for the FUNNY stuff but the
FUNNY is not a folder that accepts anything.


  The question is : Which is the desirable behaviour of cyrus-imap?

 According to the RFC (IMHO) is to allow the setquota command to be
applied in an nonexistent folder (but one that HAS existent
subfolders). What do you believe??

   Best regards,
    Aristotelis


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic