summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2019-05-29 13:41:14 +0200
committerAleksander Machniak <machniak@kolabsys.com>2019-05-29 13:41:14 +0200
commitd9c2a876f8523df5ef4c55d6dcb77fdb1f578738 (patch)
tree45519e66640c08450c70e1fe6c6fff94d738e5c3 /pykolab
parent7f07f49c107fb8afb10ecdcbe82401c1f6d5c88d (diff)
parent1226749ae6d024dde1efba3307345eb301c7ac91 (diff)
downloadpykolab-d9c2a876f8523df5ef4c55d6dcb77fdb1f578738.tar.gz
Merge branch 'master' of ssh://git.kolab.org/diffusion/P/pykolab
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py2
-rw-r--r--pykolab/cli/cmd_sync.py11
2 files changed, 8 insertions, 5 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 8400bfb..3a30621 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -383,8 +383,6 @@ class LDAP(pykolab.base.Base):
self._disconnect()
return False
- auth_cache.set_entry(_filter, entry_dn)
-
except ldap.NO_SUCH_OBJECT, errmsg:
log.debug(
_("Error occured, there is no such object: %r") % (
diff --git a/pykolab/cli/cmd_sync.py b/pykolab/cli/cmd_sync.py
index 375303d..7d44d02 100644
--- a/pykolab/cli/cmd_sync.py
+++ b/pykolab/cli/cmd_sync.py
@@ -124,7 +124,12 @@ def _synchronize(*args, **kw):
entry = utils.normalize(kw)
- if not entry.has_key('mail'):
+ mailbox_attribute = conf.get('cyrus-sasl', 'result_attribute')
+ if mailbox_attribute == None:
+ mailbox_attribute = 'mail'
+
+
+ if mailbox_attribute not in entry:
return
if not 'kolabinetorgperson' in entry['objectclass']:
@@ -133,13 +138,13 @@ def _synchronize(*args, **kw):
imap = IMAP()
imap.connect()
- if not imap.user_mailbox_exists(entry['mail']):
+ if not imap.user_mailbox_exists(entry[mailbox_attribute]):
if entry.has_key('mailhost'):
server = entry['mailhost']
else:
server = None
- imap.user_mailbox_create(entry['mail'], server=server)
+ imap.user_mailbox_create(entry[mailbox_attribute], server=server)
imap.disconnect()