setquota in Python

Marc Patermann hans.moser at ofd-z.niedersachsen.de
Wed Jul 14 06:57:54 EDT 2010


Hi,

for my migration purposes (2.2.12 -> 2.3.16) I'm experimenting with 
python (2.4.2) to transfer the quota information from the old to the new 
server.

When I try to set the quota (on the old testserver, 2.2.12), I get the 
following error:

 >>> from imaplib import *
 >>> quellserver = "bar"
 >>> s_server = IMAP4(quellserver)
 >>> s_server.login("cyrus","pw")
('OK', ['User logged in'])
 >>> r = s_server.getquota("user.foo")
('OK', ['user.foo (STORAGE 0 20000)'])
 >>> r = s_server.setquota("user.foo",5000)
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/usr/lib64/python2.4/imaplib.py", line 651, in setquota
     typ, dat = self._simple_command('SETQUOTA', root, limits)
   File "/usr/lib64/python2.4/imaplib.py", line 1028, in _simple_command
     return self._command_complete(name, self._command(name, *args))
   File "/usr/lib64/python2.4/imaplib.py", line 865, in _command_complete
     raise self.error('%s command error: %s %s' % (name, typ, data))
imaplib.error: SETQUOTA command error: BAD ['Invalid quota list in 
Setquota']

What am I doing wrong?


Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20100714/57844ff1/attachment.html 


More information about the Info-cyrus mailing list