diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2016-03-02 15:26:05 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2016-03-02 15:26:05 +0100 |
commit | 203b06f7b1abf53ae965a2fe5feb4bd6810bc73e (patch) | |
tree | 9cdc09dbeac75a10cbd9903b9cb8b06935f52ece /pykolab/imap/cyrus.py | |
parent | 9b77a7fd5a05a4052001b698e34f2599c34fe5d0 (diff) | |
download | pykolab-203b06f7b1abf53ae965a2fe5feb4bd6810bc73e.tar.gz |
Show ID to pass #Guam groupware folder filtering rulesets
Summary: Resolves T1034
Test Plan: Run this in a VM
Reviewers: #pykolab_developers
Maniphest Tasks: T1034
Differential Revision: https://git.kolab.org/D92
Diffstat (limited to 'pykolab/imap/cyrus.py')
-rw-r--r-- | pykolab/imap/cyrus.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py index b0c58c0..c8f0bc0 100644 --- a/pykolab/imap/cyrus.py +++ b/pykolab/imap/cyrus.py @@ -25,6 +25,7 @@ from urlparse import urlparse import pykolab +from pykolab.constants import * from pykolab.imap import IMAP from pykolab.translate import _ @@ -140,6 +141,10 @@ class Cyrus(cyruslib.CYRUS): """ cyruslib.CYRUS.login(self, *args, **kw) self.separator = self.SEP + try: + self._id() + except Exception, errmsg: + pass log.debug( _("Continuing with separator: %r") % (self.separator), @@ -271,6 +276,13 @@ class Cyrus(cyruslib.CYRUS): from pykolab import imap_utf7 return imap_utf7.decode(folder) + def _id(self, identity=None): + if identity is None: + identity = '("name" "Python/Kolab" "version" "%s")' % (__version__) + + typ, dat = self.m._simple_command('ID', identity) + res, dat = self.m._untagged_response(typ, dat, 'ID') + def _setquota(self, mailfolder, quota): """ Login to the actual backend server. |