Projects
Kolab:Winterfell
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 84
View file
pykolab.spec
Changed
@@ -33,7 +33,7 @@ Summary: Kolab Groupware Solution Name: pykolab -Version: 0.8.17 +Version: 0.8.18 Release: 1%{?dist} License: GPLv3+ Group: Applications/System @@ -567,6 +567,9 @@ %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab/wallace %changelog +* Mon Mar 2 2020 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.8.18-1 +- Release of version 0.8.18 + * Wed Dec 4 2019 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.8.17-1 - Release of version 0.8.17 - Require python-six
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +pykolab (0.8.18-0~kolab1) unstable; urgency=low + + * Release of version 0.8.18 + + -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Mon, 2 Mar 2020 01:49:00 +0100 + pykolab (0.8.17-0~kolab2) unstable; urgency=low * Require python-six
View file
pykolab-0.8.17.tar.gz/configure.ac -> pykolab-0.8.18.tar.gz/configure.ac
Changed
@@ -1,4 +1,4 @@ -AC_INIT([pykolab], 0.8.17) +AC_INIT([pykolab], 0.8.18) AC_SUBST([RELEASE], 1) AC_CONFIG_SRCDIR(pykolab/constants.py.in)
View file
pykolab-0.8.17.tar.gz/kolabd/__init__.py -> pykolab-0.8.18.tar.gz/kolabd/__init__.py
Changed
@@ -289,8 +289,8 @@ level=8 ) - domain_root_dns[primary] = domain_root_dn - naming_contexts[primary] = naming_context + domain_root_dns[primary] = domain_root_dn.lower() + naming_contexts[primary] = naming_context.lower() log.debug( _l("Naming contexts to synchronize: %r") % (
View file
pykolab-0.8.17.tar.gz/pykolab/auth/ldap/__init__.py -> pykolab-0.8.18.tar.gz/pykolab/auth/ldap/__init__.py
Changed
@@ -1936,7 +1936,39 @@ cache.get_entry(self.domain, entry) def _change_moddn_sharedfolder(self, entry, change): - pass + result_attribute = 'cn' + + old_cn = explode_dn(change['previous_dn'], True)[0] + + if 'kolabtargetfolder' in entry and entry['kolabtargetfolder'] is not None: + new_folder_path = entry['kolabtargetfolder'] + old_folder_path = old_cn + + if '@' in entry['kolabtargetfolder']: + old_folder_path = "%s@%s" % ( + old_folder_path, + entry['kolabtargetfolder'].split('@')[1] + ) + + else: + result_attribute = conf.get('cyrus-sasl', 'result_attribute') + if result_attribute in ['mail']: + new_folder_path = "%s@%s" % (entry['cn'], self.domain) + old_folder_path = "%s@%s" % (old_cn, self.domain) + else: + new_folder_path = "%s" % (entry['cn']) + old_folder_path = old_cn + + if not new_folder_path.startswith('shared/'): + new_folder_path = "shared/%s" % (new_folder_path) + + if not old_folder_path.startswith('shared/'): + old_folder_path = "shared/%s" % (old_folder_path) + + log.debug("old folder path: %r" % (old_folder_path)) + log.debug("new folder path: %r" % (new_folder_path)) + + self.imap.shared_folder_rename(old_folder_path, new_folder_path) def _change_modify_None(self, entry, change): pass @@ -2346,7 +2378,7 @@ # If we have a 1:1 match, continue as planned for naming_context in naming_contexts: - if self.domain_rootdns[domain].endswith(naming_context): + if self.domain_rootdns[domain].lower().endswith(naming_context): return naming_context def _primary_domain_for_naming_context(self, naming_context): @@ -2896,7 +2928,7 @@ page_size = 500 _results = [] - server_page_control = ldap.controls.libldap.SimplePagedResultsControl(size=page_size) + server_page_control = ldap.controls.libldap.SimplePagedResultsControl(size=page_size,cookie='') _search = self.ldap.search_ext( base_dn, @@ -2937,7 +2969,7 @@ pctrls = [ c for c in _result_controls - if c.controlType == LDAP_CONTROL_PAGED_RESULTS + if c.controlType == ldap.controls.libldap.SimplePagedResultsControl.controlType ] if pctrls:
View file
pykolab-0.8.17.tar.gz/pykolab/cli/cmd_list_deleted_mailboxes.py -> pykolab-0.8.18.tar.gz/pykolab/cli/cmd_list_deleted_mailboxes.py
Changed
@@ -31,41 +31,75 @@ log = pykolab.getLogger('pykolab.cli') conf = pykolab.getConf() + def __init__(): commands.register('list_deleted_mailboxes', execute) + def cli_options(): my_option_group = conf.add_cli_parser_option_group(_("CLI Options")) - my_option_group.add_option( '--raw', - dest = "raw", - action = "store_true", - default = False, - help = _("Display raw IMAP UTF-7 folder names")) - - my_option_group.add_option( '--server', - dest = "connect_server", - action = "store", - default = None, - metavar = "SERVER", - help = _("List mailboxes on server SERVER only.")) + + my_option_group.add_option( + '--raw', + dest="raw", + action="store_true", + default=False, + help=_("Display raw IMAP UTF-7 folder names") + ) + + my_option_group.add_option( + '--server', + dest="connect_server", + action="store", + default=None, + metavar="SERVER", + help=_("List mailboxes on server SERVER only.") + ) + def execute(*args, **kw): """ List deleted mailboxes """ - imap = IMAP() - imap.connect() - - auth = Auth() - auth.connect() - - domains = auth.list_domains() folders = [] - for domain in list(set(domains.keys())): - folders.extend(imap.lm("DELETED/*@%s" % (domain))) + searches = [] + + imap = IMAP() - folders.extend(imap.lm("DELETED/*")) + if conf.connect_server is not None: + imap.connect(server=conf.connect_server) + else: + imap.connect() + + # See if conf.cli_args components make sense. + for arg in conf.cli_args: + if arg == '*': + searches.append(arg) + if arg.startswith('user'): + searches.append(arg) + if arg.startswith('shared'): + searches.append(arg) + if arg.startswith('DELETED'): + searches.append(arg) + if arg.startswith('news'): + searches.append(arg) + + if len(searches) == 0: + auth = Auth() + auth.connect() + + domains = auth.list_domains() + + folders = [] + for domain in list(set(domains.keys())): + folders.extend(imap.lm("DELETED/*@%s" % (domain))) + + folders.extend(imap.lm("DELETED/*")) + else: + for search in searches: + log.debug(_("Appending folder search for %r") % (search), level=8) + folders.extend(imap.lm(imap_utf7.encode(search))) print "Deleted folders:"
View file
pykolab-0.8.17.tar.gz/pykolab/cli/cmd_list_mailboxes.py -> pykolab-0.8.18.tar.gz/pykolab/cli/cmd_list_mailboxes.py
Changed
@@ -28,28 +28,37 @@ log = pykolab.getLogger('pykolab.cli') conf = pykolab.getConf() + def __init__(): commands.register('list_mailboxes', execute, description=description(), aliases='lm') + def description(): return "List mailboxes.\n" + \ "%-28s" % ('') + \ "Use wildcards '*' and '%' for more control.\n" + def cli_options(): my_option_group = conf.add_cli_parser_option_group(_("CLI Options")) - my_option_group.add_option( '--raw', - dest = "raw", - action = "store_true", - default = False, - help = _("Display raw IMAP UTF-7 folder names")) - - my_option_group.add_option( '--server', - dest = "connect_server", - action = "store", - default = None, - metavar = "SERVER", - help = _("List mailboxes on server SERVER only.")) + + my_option_group.add_option( + '--raw', + dest="raw", + action="store_true", + default=False, + help=_("Display raw IMAP UTF-7 folder names") + ) + + my_option_group.add_option( + '--server', + dest="connect_server", + action="store", + default=None, + metavar="SERVER", + help=_("List mailboxes on server SERVER only.") + ) + def execute(*args, **kw): """ @@ -72,7 +81,7 @@ searches.append(arg) if len(searches) == 0: - searches = [ '' ] + searches = [''] imap = IMAP()
View file
pykolab-0.8.17.tar.gz/pykolab/imap/__init__.py -> pykolab-0.8.18.tar.gz/pykolab/imap/__init__.py
Changed
@@ -43,14 +43,13 @@ self.imap = None def cleanup_acls(self, aci_subject): - lm_suffix = "" - log.info( _("Cleaning up ACL entries for %s across all folders") % ( aci_subject ) ) + lm_suffix = "" if len(aci_subject.split('@')) > 1: lm_suffix = "@%s" % (aci_subject.split('@')[1]) @@ -58,13 +57,6 @@ user_folders = self.imap.lm("user/*%s" % (lm_suffix)) - log.debug( - _("Cleaning up ACL entries referring to identifier %s") % ( - aci_subject - ), - level=5 - ) - # For all folders (shared and user), ... folders = user_folders + shared_folders @@ -72,8 +64,8 @@ # ... loop through them and ... for folder in folders: - # ... list the ACL entries -- but only if the folder still exists - if self.imap.has_folder(folder): + try: + # ... list the ACL entries acls = self.imap.lam(folder) # For each ACL entry, see if we think it is a current, valid @@ -96,13 +88,13 @@ ) self.set_acl(folder, acl_entry, '') - else: - log.debug( - _("Folder %r disappeared (ACL cleanup for %r") % ( + + except Exception, errmsg: + log.error( + _("Failed to read/set ACL on folder %s: %r") % ( folder, - aci_subject - ), - level=8 + errmsg + ) ) def connect(self, uri=None, server=None, domain=None, login=True): @@ -429,12 +421,12 @@ self.imap.sam(self.folder_utf7(folder), identifier, acl) except Exception as errmsg: log.error( - _("Could not set ACL for %s on folder %s: %r") % ( - identifier, - folder, - errmsg - ) + _("Could not set ACL for %s on folder %s: %r") % ( + identifier, + folder, + errmsg ) + ) def set_metadata(self, folder, metadata_path, metadata_value, shared=True): """ @@ -461,7 +453,7 @@ if folder_name.startswith("shared%s" % (self.get_separator()) * 2): folder_name = folder_name[7:] - log.info(_("Creating new shared folder %s") %(folder_name)) + log.info(_("Creating new shared folder %s") % (folder_name)) self.create_folder(folder_name, server) def shared_folder_exists(self, folder_path): @@ -476,6 +468,17 @@ return self.has_folder(folder_name) + def shared_folder_rename(self, old, new): + if not self.has_folder(old): + log.error("Shared Folder rename error: Folder %s does not exist" % (old)) + return + + if self.has_folder(new): + log.error("Shared Folder rename error: Folder %s already exists" % (new)) + return + + self.imap._rename(old, new) + def shared_folder_set_type(self, folder_path, folder_type): folder_name = 'shared%s%s' % (self.get_separator(), folder_path)
View file
pykolab-0.8.17.tar.gz/pykolab/logger.py -> pykolab-0.8.18.tar.gz/pykolab/logger.py
Changed
@@ -213,7 +213,7 @@ group_gid ) - os.chmod(self.logfile, 660) + os.chmod(self.logfile, 0660) except Exception as errmsg: self.error(
View file
pykolab-0.8.17.tar.gz/pykolab/setup/setup_mysql.py -> pykolab-0.8.18.tar.gz/pykolab/setup/setup_mysql.py
Changed
@@ -256,7 +256,7 @@ fp = open('/tmp/kolab-setup-my.cnf', 'w') - os.chmod('/tmp/kolab-setup-my.cnf', 600) + os.chmod('/tmp/kolab-setup-my.cnf', 0600) fp.write(data) fp.close()
View file
pykolab-0.8.17.tar.gz/pykolab/setup/setup_roundcube.py -> pykolab-0.8.18.tar.gz/pykolab/setup/setup_roundcube.py
Changed
@@ -259,7 +259,7 @@ """ % (mysql_root_password, conf.mysqlhost) fp = open('/tmp/kolab-setup-my.cnf', 'w') - os.chmod('/tmp/kolab-setup-my.cnf', 600) + os.chmod('/tmp/kolab-setup-my.cnf', 0600) fp.write(data) fp.close()
View file
pykolab-0.8.17.tar.gz/share/templates/cyrus.conf.tpl -> pykolab-0.8.18.tar.gz/share/templates/cyrus.conf.tpl
Changed
@@ -13,7 +13,7 @@ sieve cmd="timsieved" listen="sieve" prefork=0 - ptloader cmd="ptloader" listen="/var/lib/imap/ptclient/ptsock" prefork=0 + ptloader cmd="ptloader" listen="/var/lib/imap/socket/ptsock" prefork=0 lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1 @@ -38,6 +38,6 @@ # this is only necessary if caching TLS sessions tlsprune cmd="tls_prune" at=0400 - # Create search indexes regularly + # Create search indexes regularly (remove -s for cyrus 3+) #squatter cmd="squatter -s -i" at=0530 }
View file
pykolab-0.8.17.tar.gz/share/templates/imapd.conf.tpl -> pykolab-0.8.18.tar.gz/share/templates/imapd.conf.tpl
Changed
@@ -12,6 +12,7 @@ # qosmarking: af13 auth_mech: pts pts_module: ldap +ptloader_sock: /var/lib/imap/socket/ptsock ldap_servers: $ldap_servers ldap_sasl: 0 ldap_base: $ldap_base @@ -47,3 +48,5 @@ delete_mode: delayed expunge_mode: delayed postuser: shared +# on systems with cyrus 3+ specify search engine +# search_engine: squat
View file
pykolab.dsc
Changed
@@ -2,8 +2,8 @@ Source: pykolab Binary: pykolab, kolab-cli, kolab-conf, kolab-saslauthd, kolab-server, kolab-telemetry, kolab-xml, wallace Architecture: all -Version: 0.8.17-0~kolab2 -Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> +Version: 0.8.18-0~kolab1 +Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org Standards-Version: 3.9.3 @@ -41,5 +41,5 @@ pykolab deb python optional wallace deb python optional Files: - 00000000000000000000000000000000 0 pykolab-0.8.17.tar.gz + 00000000000000000000000000000000 0 pykolab-0.8.18.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
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
.