Projects
Kolab:3.4
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 60
View file
pykolab-0.6.11-apt-ldap-fixes-concat.patch
Added
@@ -0,0 +1,106 @@ +diff -ur pykolab-0.6.11.orig/pykolab/auth/ldap/__init__.py pykolab-0.6.11/pykolab/auth/ldap/__init__.py +--- pykolab-0.6.11.orig/pykolab/auth/ldap/__init__.py 2014-01-28 12:33:07.000000000 +0100 ++++ pykolab-0.6.11/pykolab/auth/ldap/__init__.py 2014-02-12 15:40:16.837527961 +0100 +@@ -1150,7 +1150,7 @@ + foldertype_attribute = self.config_get('sharedfolder_type_attribute') + if not foldertype_attribute == None: + if not entry.has_key(foldertype_attribute): +- entry[foldertype_attribute] = self.get_user_attribute( ++ entry[foldertype_attribute] = self.get_entry_attribute( + entry['id'], + foldertype_attribute + ) +@@ -1252,10 +1252,6 @@ + entry['kolabfoldertype'] + ) + +- if entry.has_key(delivery_address_attribute) and \ +- not entry[delivery_address_attribute] == None: +- self.imap.set_acl(folder_path, 'anyone', 'p') +- + if entry.has_key('kolabmailfolderaclentry') and \ + not entry['kolabmailfolderaclentry'] == None: + +@@ -1263,6 +1259,10 @@ + entry['kolabmailfolderaclentry'] + ) + ++ if entry.has_key(delivery_address_attribute) and \ ++ not entry[delivery_address_attribute] == None: ++ self.imap.set_acl(folder_path, 'anyone', '+p') ++ + #if server == None: + #self.entry_set_attribute(mailserver_attribute, server) + +@@ -1519,7 +1519,7 @@ + foldertype_attribute = self.config_get('sharedfolder_type_attribute') + if not foldertype_attribute == None: + if not entry.has_key(foldertype_attribute): +- entry[foldertype_attribute] = self.get_user_attribute( ++ entry[foldertype_attribute] = self.get_entry_attribute( + entry['id'], + foldertype_attribute + ) +@@ -1769,12 +1769,16 @@ + entry['kolabfoldertype'] + ) + +- #if entry.has_key('kolabmailfolderaclentry') and \ +- #not entry['kolabmailfolderaclentry'] == None: ++ if entry.has_key('kolabmailfolderaclentry') and \ ++ not entry['kolabmailfolderaclentry'] == None: ++ ++ self.imap._set_kolab_mailfolder_acls( ++ entry['kolabmailfolderaclentry'] ++ ) + +- #self.imap._set_kolab_mailfolder_acls( +- #entry['kolabmailfolderaclentry'] +- #) ++ if entry.has_key(delivery_address_attribute) and \ ++ not entry[delivery_address_attribute] == None: ++ self.imap.set_acl(folder_path, 'anyone', '+p') + + #if server == None: + #self.entry_set_attribute(mailserver_attribute, server) +Only in pykolab-0.6.11/pykolab/auth/ldap: __init__.py.orig +diff -ur pykolab-0.6.11.orig/pykolab/imap/__init__.py pykolab-0.6.11/pykolab/imap/__init__.py +--- pykolab-0.6.11.orig/pykolab/imap/__init__.py 2014-01-28 12:33:07.000000000 +0100 ++++ pykolab-0.6.11/pykolab/imap/__init__.py 2014-02-12 15:40:16.838527957 +0100 +@@ -328,6 +328,36 @@ + if short_rights.has_key(acl): + acl = short_rights[acl] + ++ # Special treatment for '-' and '+' characters ++ if '+' in acl or '-' in acl: ++ acl_map = { ++ 'set': '', ++ 'subtract': '', ++ 'add': '' ++ } ++ ++ mode = 'set' ++ for char in acl: ++ if char == '-': ++ mode = 'subtract' ++ continue ++ if char == '+': ++ continue ++ mode = 'add' ++ ++ acl_map[mode] += char ++ ++ current_acls = self.imap.lam(self.folder_utf7(folder)) ++ for current_acl in current_acls.keys(): ++ if current_acl == identifier: ++ _acl = current_acls[current_acl] ++ break ++ ++ _acl = _acl + acl_map['set'] + acl_map['add'] ++ ++ _acl = [x for x in _acl.split() if x not in acl_map['subtract'].split()] ++ acl = ''.join(list(set(_acl))) ++ + self.imap.sam(self.folder_utf7(folder), identifier, acl) + + def set_metadata(self, folder, metadata_path, metadata_value, shared=True):
View file
pykolab-0.6.11-apt-sieve-fixes-concat.patch
Added
@@ -0,0 +1,46 @@ +diff -ur pykolab-0.6.11.orig/pykolab/cli/sieve/cmd_refresh.py pykolab-0.6.11/pykolab/cli/sieve/cmd_refresh.py +--- pykolab-0.6.11.orig/pykolab/cli/sieve/cmd_refresh.py 2014-01-28 12:33:07.000000000 +0100 ++++ pykolab-0.6.11/pykolab/cli/sieve/cmd_refresh.py 2014-02-12 17:18:05.049219845 +0100 +@@ -97,7 +97,7 @@ + active, scripts = result + + log.debug(_("Found the following scripts for user %s: %s") % (address, ','.join(scripts)), level=8) +- log.deubg(_("And the following script is active for user %s: %s") % (address, active), level=8) ++ log.debug(_("And the following script is active for user %s: %s") % (address, active), level=8) + + mgmt_required_extensions = [] + +@@ -344,7 +344,9 @@ + mgmt_script.addfilter(rule_name, ['true'], forward_rules) + + else: +- mgmt_script.addfilter(rule_name, [("X-Spam-Status", ":matches", "No,*")], forward_rules) ++ # NOTE: Messages with no X-Spam-Status header need to be matched ++ # too, and this does exactly that. ++ mgmt_script.addfilter(rule_name, [("not", ("X-Spam-Status", ":matches", "Yes,*"))], forward_rules) + + if sdf_filter: + mgmt_script.addfilter('spam_delivery_folder', [("X-Spam-Status", ":matches", "Yes,*")], [("fileinto", "INBOX/Spam"), ("stop")]) +diff -ur pykolab-0.6.11.orig/pykolab/plugins/sievemgmt/__init__.py pykolab-0.6.11/pykolab/plugins/sievemgmt/__init__.py +--- pykolab-0.6.11.orig/pykolab/plugins/sievemgmt/__init__.py 2014-01-28 12:33:07.000000000 +0100 ++++ pykolab-0.6.11/pykolab/plugins/sievemgmt/__init__.py 2014-02-12 17:18:05.049219845 +0100 +@@ -109,7 +109,7 @@ + active, scripts = result + + log.debug(_("Found the following scripts for user %s: %s") % (address, ','.join(scripts)), level=8) +- log.deubg(_("And the following script is active for user %s: %s") % (address, active), level=8) ++ log.debug(_("And the following script is active for user %s: %s") % (address, active), level=8) + + mgmt_required_extensions = [] + +@@ -356,7 +356,9 @@ + mgmt_script.addfilter(rule_name, ['true'], forward_rules) + + else: +- mgmt_script.addfilter(rule_name, [("X-Spam-Status", ":matches", "No,*")], forward_rules) ++ # NOTE: Messages with no X-Spam-Status header need to be matched ++ # too, and this does exactly that. ++ mgmt_script.addfilter(rule_name, [("not", ("X-Spam-Status", ":matches", "Yes,*"))], forward_rules) + + if sdf_filter: + mgmt_script.addfilter('spam_delivery_folder', [("X-Spam-Status", ":matches", "Yes,*")], [("fileinto", "INBOX/Spam"), ("stop")])
View file
pykolab-0.6.11-fix-shared-folder-delivery.patch
Added
@@ -0,0 +1,95 @@ +commit 455e9b73874b8f58c055e331f0db2bbba1e4ef20 +Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> +Date: Wed Feb 12 15:38:03 2014 +0100 + + Make sure a shared folder with an inbound address can be delivered mail to + +diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py +index e7c4dd2..ec7e9fe 100644 +--- a/pykolab/auth/ldap/__init__.py ++++ b/pykolab/auth/ldap/__init__.py +@@ -1265,10 +1265,6 @@ class LDAP(pykolab.base.Base): + entry['kolabfoldertype'] + ) + +- if entry.has_key(delivery_address_attribute) and \ +- not entry[delivery_address_attribute] == None: +- self.imap.set_acl(folder_path, 'anyone', 'p') +- + if entry.has_key('kolabmailfolderaclentry') and \ + not entry['kolabmailfolderaclentry'] == None: + +@@ -1276,6 +1272,10 @@ class LDAP(pykolab.base.Base): + entry['kolabmailfolderaclentry'] + ) + ++ if entry.has_key(delivery_address_attribute) and \ ++ not entry[delivery_address_attribute] == None: ++ self.imap.set_acl(folder_path, 'anyone', '+p') ++ + #if server == None: + #self.entry_set_attribute(mailserver_attribute, server) + +@@ -1782,12 +1782,16 @@ class LDAP(pykolab.base.Base): + entry['kolabfoldertype'] + ) + +- #if entry.has_key('kolabmailfolderaclentry') and \ +- #not entry['kolabmailfolderaclentry'] == None: ++ if entry.has_key('kolabmailfolderaclentry') and \ ++ not entry['kolabmailfolderaclentry'] == None: ++ ++ self.imap._set_kolab_mailfolder_acls( ++ entry['kolabmailfolderaclentry'] ++ ) + +- #self.imap._set_kolab_mailfolder_acls( +- #entry['kolabmailfolderaclentry'] +- #) ++ if entry.has_key(delivery_address_attribute) and \ ++ not entry[delivery_address_attribute] == None: ++ self.imap.set_acl(folder_path, 'anyone', '+p') + + #if server == None: + #self.entry_set_attribute(mailserver_attribute, server) +diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py +index 9995292..fbe515d 100644 +--- a/pykolab/imap/__init__.py ++++ b/pykolab/imap/__init__.py +@@ -328,6 +328,36 @@ class IMAP(object): + if short_rights.has_key(acl): + acl = short_rights[acl] + ++ # Special treatment for '-' and '+' characters ++ if '+' in acl or '-' in acl: ++ acl_map = { ++ 'set': '', ++ 'subtract': '', ++ 'add': '' ++ } ++ ++ mode = 'set' ++ for char in acl: ++ if char == '-': ++ mode = 'subtract' ++ continue ++ if char == '+': ++ continue ++ mode = 'add' ++ ++ acl_map[mode] += char ++ ++ current_acls = self.imap.lam(self.folder_utf7(folder)) ++ for current_acl in current_acls.keys(): ++ if current_acl == identifier: ++ _acl = current_acls[current_acl] ++ break ++ ++ _acl = _acl + acl_map['set'] + acl_map['add'] ++ ++ _acl = [x for x in _acl.split() if x not in acl_map['subtract'].split()] ++ acl = ''.join(list(set(_acl))) ++ + self.imap.sam(self.folder_utf7(folder), identifier, acl) + + def set_metadata(self, folder, metadata_path, metadata_value, shared=True):
View file
pykolab-0.6.11-match-messages-with-no-xspamheader-too.patch
Added
@@ -0,0 +1,36 @@ +commit 4aa15736969edcf354155f36d99cd53f17be66c1 +Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> +Date: Wed Feb 12 17:06:08 2014 +0100 + + Match messages without an X-Spam-Status header set, too + +diff --git a/pykolab/cli/sieve/cmd_refresh.py b/pykolab/cli/sieve/cmd_refresh.py +index 6c10dfa..b610e2d 100644 +--- a/pykolab/cli/sieve/cmd_refresh.py ++++ b/pykolab/cli/sieve/cmd_refresh.py +@@ -344,7 +344,9 @@ def execute(*args, **kw): + mgmt_script.addfilter(rule_name, ['true'], forward_rules) + + else: +- mgmt_script.addfilter(rule_name, [("X-Spam-Status", ":matches", "No,*")], forward_rules) ++ # NOTE: Messages with no X-Spam-Status header need to be matched ++ # too, and this does exactly that. ++ mgmt_script.addfilter(rule_name, [("not", ("X-Spam-Status", ":matches", "Yes,*"))], forward_rules) + + if sdf_filter: + mgmt_script.addfilter('spam_delivery_folder', [("X-Spam-Status", ":matches", "Yes,*")], [("fileinto", "INBOX/Spam"), ("stop")]) +diff --git a/pykolab/plugins/sievemgmt/__init__.py b/pykolab/plugins/sievemgmt/__init__.py +index 42297a4..ade829d 100644 +--- a/pykolab/plugins/sievemgmt/__init__.py ++++ b/pykolab/plugins/sievemgmt/__init__.py +@@ -356,7 +356,9 @@ class KolabSievemgmt(object): + mgmt_script.addfilter(rule_name, ['true'], forward_rules) + + else: +- mgmt_script.addfilter(rule_name, [("X-Spam-Status", ":matches", "No,*")], forward_rules) ++ # NOTE: Messages with no X-Spam-Status header need to be matched ++ # too, and this does exactly that. ++ mgmt_script.addfilter(rule_name, [("not", ("X-Spam-Status", ":matches", "Yes,*"))], forward_rules) + + if sdf_filter: + mgmt_script.addfilter('spam_delivery_folder', [("X-Spam-Status", ":matches", "Yes,*")], [("fileinto", "INBOX/Spam"), ("stop")])
View file
pykolab-0.6.11-void-deprecated-function-use.patch
Added
@@ -0,0 +1,28 @@ +commit 0c9a2496db76e7f68a05d08b66cd88f9a109dcff +Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> +Date: Wed Feb 12 14:32:12 2014 +0100 + + Replace get_user_attribute call with the appropriate get_entry_attribute call + +diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py +index 1ba0f3d..e7c4dd2 100644 +--- a/pykolab/auth/ldap/__init__.py ++++ b/pykolab/auth/ldap/__init__.py +@@ -1163,7 +1163,7 @@ class LDAP(pykolab.base.Base): + foldertype_attribute = self.config_get('sharedfolder_type_attribute') + if not foldertype_attribute == None: + if not entry.has_key(foldertype_attribute): +- entry[foldertype_attribute] = self.get_user_attribute( ++ entry[foldertype_attribute] = self.get_entry_attribute( + entry['id'], + foldertype_attribute + ) +@@ -1532,7 +1532,7 @@ class LDAP(pykolab.base.Base): + foldertype_attribute = self.config_get('sharedfolder_type_attribute') + if not foldertype_attribute == None: + if not entry.has_key(foldertype_attribute): +- entry[foldertype_attribute] = self.get_user_attribute( ++ entry[foldertype_attribute] = self.get_entry_attribute( + entry['id'], + foldertype_attribute + )
View file
debian.changelog
Changed
@@ -1,3 +1,11 @@ +pykolab (0.6.11-0~kolab10) unstable; urgency=low + + * Fix use of deprecated function get_user_attribute + * Make sure the correct rights are set on shared folders with delivery enabled + * Match messages that do not have an X-Spam-Header, too + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, 12 Feb 2014 20:00:00 +0100 + pykolab (0.6.11-0~kolab7) unstable; urgency=low * Fix typos in Sieve management
View file
debian.series
Changed
@@ -2,4 +2,5 @@ cyrus-imapd.conf-cert-paths.patch -p1 enable-wallace.patch -p1 pykolab-0.6.11-unlink-cache-on-failure-to-get_entry.patch -p1 -pykolab-0.6.11-sieve-typos.patch -p1 +pykolab-0.6.11-apt-ldap-fixes-concat.patch -p1 +pykolab-0.6.11-apt-sieve-fixes-concat.patch -p1
View file
pykolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: pykolab Binary: pykolab, kolab-cli, kolab-conf, kolab-saslauthd, kolab-server, kolab-telemetry, kolab-xml, wallace Architecture: all -Version: 0.6.11-0~kolab7 +Version: 0.6.11-0~kolab10 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.