summaryrefslogtreecommitdiffstats
path: root/pykolab/imap/dovecot.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/imap/dovecot.py')
-rw-r--r--pykolab/imap/dovecot.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pykolab/imap/dovecot.py b/pykolab/imap/dovecot.py
index 226e6f1..8d5c0a5 100644
--- a/pykolab/imap/dovecot.py
+++ b/pykolab/imap/dovecot.py
@@ -78,20 +78,22 @@ def imap_getmetadata(self, mailbox, pattern='*', shared=None):
entries = " /private%s" % pattern
typ, dat = self._simple_command('GETMETADATA', options, mailbox, entries)
+
return self._untagged_response(typ, dat, 'METADATA')
def imap_setmetadata(self, mailbox, desc, value, shared=False):
if value:
- value = quote(value)
+ value = value.join(['"', '"'])
else:
value = "NIL"
if shared:
typ, dat = self._simple_command('SETMETADATA', mailbox,
- "(/shared/%s %s)" % (desc,value))
+ "(/shared%s %s)" % (desc,value))
else:
typ, dat = self._simple_command('SETMETADATA', mailbox,
- "(/private/%s %s)" % (desc,value))
+ "(/private%s %s)" % (desc,value))
+
return self._untagged_response(typ, dat, 'METADATA')
# Bind the new methods to the cyruslib IMAP4 and IMAP4_SSL objects