summaryrefslogtreecommitdiffstats
path: root/pykolab/cli
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2016-10-06 09:45:20 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-10-06 09:45:20 +0200
commite75b015fa96721968083a10d205187ffe8e335d3 (patch)
treecd7739cc827f19f1b2689036684b185aa31e2ff8 /pykolab/cli
parentf57e5263ed37d61548e04e0ba7e591cfecf3edc6 (diff)
downloadpykolab-e75b015fa96721968083a10d205187ffe8e335d3.tar.gz
T1417: Fix so sync-mailhost-attr uses result_attribute not mail_attributes
Summary: Fixes T1417 Reviewers: #pykolab_developers, vanmeeuwen Reviewed By: #pykolab_developers, vanmeeuwen Maniphest Tasks: T1417 Differential Revision: https://git.kolab.org/D209
Diffstat (limited to 'pykolab/cli')
-rw-r--r--pykolab/cli/cmd_sync_mailhost_attrs.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pykolab/cli/cmd_sync_mailhost_attrs.py b/pykolab/cli/cmd_sync_mailhost_attrs.py
index fe7f6b2..3f5a731 100644
--- a/pykolab/cli/cmd_sync_mailhost_attrs.py
+++ b/pykolab/cli/cmd_sync_mailhost_attrs.py
@@ -71,8 +71,11 @@ def execute(*args, **kw):
auth = Auth()
auth.connect()
- domains = auth.list_domains()
+ result_attribute = conf.get('cyrus-sasl', 'result_attribute')
+ if result_attribute is None:
+ result_attribute = 'mail'
+ domains = auth.list_domains()
folders = imap.lm()
imap_domains_not_domains = []
@@ -140,7 +143,7 @@ def execute(*args, **kw):
recipient = auth.find_folder_resource(folder)
else:
r_folder = '/'.join(folder.split('/')[1:])
- recipient = auth.find_recipient(r_folder)
+ recipient = auth.find_recipient(r_folder, search_attrs=[result_attribute])
if (isinstance(recipient, list)):
if len(recipient) > 1:
@@ -188,6 +191,6 @@ def execute(*args, **kw):
if folder.startswith('shared/'):
recipient = auth.find_folder_resource(folder)
else:
- recipient = auth.find_recipient('/'.join(folder.split('/')[1:]))
+ recipient = auth.find_recipient('/'.join(folder.split('/')[1:]), search_attrs=[result_attribute])
print folder, server, recipient