2 commits - pykolab/setup
Daniel Hoffend
hoffend at kolabsys.com
Mon Jan 26 00:36:18 CET 2015
pykolab/setup/setup_freebusy.py | 35 ++++++++++++++++++++++++++++++-----
1 file changed, 30 insertions(+), 5 deletions(-)
New commits:
commit 6b9fe599d2f2811b2532a8eef43fa74e440775f6
Author: Daniel Hoffend <dh at dotlan.net>
Date: Sun Jan 25 14:42:01 2015 +0100
fix imap_uri processing for setup_freebusy
diff --git a/pykolab/setup/setup_freebusy.py b/pykolab/setup/setup_freebusy.py
index dacd2d3..80d5889 100644
--- a/pykolab/setup/setup_freebusy.py
+++ b/pykolab/setup/setup_freebusy.py
@@ -68,18 +68,24 @@ def execute(*args, **kw):
if hasattr(result, 'hostname'):
hostname = result.hostname
+
+ if hasattr(result, 'port'):
+ port = result.port
+
+ if hasattr(result, 'scheme'):
+ scheme = result.scheme
+
else:
scheme = imap_uri.split(':')[0]
(hostname, port) = imap_uri.split('/')[2].split(':')
- if port == None:
+ if scheme == 'imaps' and (port == None or port == ''):
port = 993
- if scheme == None or scheme == "":
- scheme = 'imaps'
+ if scheme == None or scheme == '':
+ scheme = 'imap'
- if scheme == "imaps" and port == 993:
- scheme = "imap"
+ if port == None or port == '':
port = 143
resources_imap_uri = '%s://%s:%s@%s:%s/%%kolabtargetfolder?acl=lrs' % (scheme, admin_login, admin_password, hostname, port)
commit a0507f5e48a48a0e2df42093c368a630791ff65e
Author: Daniel Hoffend <dh at dotlan.net>
Date: Sun Jan 25 10:12:28 2015 +0100
add kolab-resource-collections to setup_freebusy
diff --git a/pykolab/setup/setup_freebusy.py b/pykolab/setup/setup_freebusy.py
index 83baf6e..dacd2d3 100644
--- a/pykolab/setup/setup_freebusy.py
+++ b/pykolab/setup/setup_freebusy.py
@@ -104,6 +104,7 @@ def execute(*args, **kw):
'filter': '(&(objectClass=kolabInetOrgPerson)(|(mail=%s)(alias=%s)))',
'attributes': 'mail',
'lc_attributes': 'mail',
+ 'primary_domain': conf.get('kolab', 'primary_domain'),
'fbsource': users_imap_uri,
'cacheto': '/var/cache/kolab-freebusy/%s.ifb',
'expires': '15m',
@@ -117,11 +118,29 @@ def execute(*args, **kw):
'bind_pw': conf.get('ldap', 'service_bind_pw'),
'attributes': 'mail, kolabtargetfolder',
'filter': '(&(objectClass=kolabsharedfolder)(kolabfoldertype=event)(mail=%s))',
+ 'primary_domain': conf.get('kolab', 'primary_domain'),
'fbsource': resources_imap_uri,
'cacheto': '/var/cache/kolab-freebusy/%s.ifb',
'expires': '15m',
'loglevel': 300,
},
+ 'directory "kolab-resource-collections"': {
+ 'type': 'ldap',
+ 'host': conf.get('ldap', 'ldap_uri'),
+ 'base_dn': conf.get('ldap', 'resource_base_dn'),
+ 'bind_dn': conf.get('ldap', 'service_bind_dn'),
+ 'bind_pw': conf.get('ldap', 'service_bind_pw'),
+ 'filter': '(&(objectClass=kolabgroupofuniquenames)(mail=%s))',
+ 'attributes': 'uniquemember', 'mail'
+ 'resolve_dn': 'uniquemember',
+ 'resolve_attribute': 'mail',
+ 'primary_domain': conf.get('kolab', 'primary_domain'),
+ 'fbsource': 'aggregate://%uniquemember'
+ 'directories': 'kolab-resources',
+ 'cacheto': '/var/cache/kolab-freebusy/%mail.ifb',
+ 'expires': '15m',
+ 'loglevel': 200,
+ },
}
cfg_parser = RawConfigParser()
More information about the commits
mailing list