imaplib: setquota and proxyauth errors

Wolfgang Kohnen wollie at tzi.de
Wed May 4 14:56:14 EDT 2005


Hello out there!

I am new to python and so far I like it a lot.  Now I want to create 
some IMAP mailboxes on my cyrus imapd, with quotas and each user should 
be subscribed to her/his own spam folder.  This is what I've attempted:

> >>> import imaplib, getpass
> >>> cyrus = imaplib.IMAP4()
> >>> cyrus.login("cyrus", getpass.getpass())
> Password:
> ('OK', ['User logged in'])
> >>> cyrus.create("user/test0")
> ('OK', ['Completed'])
> >>> cyrus.setquota("user/test0", 123456)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.3/imaplib.py", line 633, in setquota
>     typ, dat = self._simple_command('SETQUOTA', root, limits)
>   File "/usr/lib/python2.3/imaplib.py", line 1000, in _simple_command
>     return self._command_complete(name, self._command(name, *args))
>   File "/usr/lib/python2.3/imaplib.py", line 837, 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 here?  And here the subscribe thing:  I tried the 
proxyauth() method, 'cause I don't want cyrus to subscribe to test0's 
spam box but test0 himself.  Maybe I've completely misunderstood this 
method, no?

> >>> cyrus.create("user/test0/spam")
> ('OK', ['Completed'])
> >>> cyrus.proxyauth("test0")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.3/imaplib.py", line 564, in proxyauth
>     return self._simple_command('PROXYAUTH', user)
>   File "/usr/lib/python2.3/imaplib.py", line 1000, in _simple_command
>     return self._command_complete(name, self._command(name, *args))
>   File "/usr/lib/python2.3/imaplib.py", line 837, in _command_complete
>     raise self.error('%s command error: %s %s' % (name, typ, data))
> imaplib.error: PROXYAUTH command error: BAD ['Unrecognized command']



I am lost. I can't even tell, if these error come from cyrus or from python.

TIA,
Wollie



More information about the Python-list mailing list