5 commits - conf/kolab.conf pykolab/auth pykolab/imap pykolab/setup wallace/modules.py

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Tue Sep 4 11:40:47 CEST 2012


 conf/kolab.conf               |   42 ++++++++++++++++++------------------------
 pykolab/auth/ldap/__init__.py |    7 ++++++-
 pykolab/imap/__init__.py      |   13 ++++++-------
 pykolab/setup/setup_ldap.py   |    7 ++++++-
 wallace/modules.py            |    7 ++++---
 5 files changed, 40 insertions(+), 36 deletions(-)

New commits:
commit 849e1ec9d404b2db1a930c211c4c596264ef342a
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Tue Sep 4 10:40:00 2012 +0100

    Correctly pass on the original recipients to the SMTP forwarding

diff --git a/wallace/modules.py b/wallace/modules.py
index c523eba..8a843e3 100644
--- a/wallace/modules.py
+++ b/wallace/modules.py
@@ -254,12 +254,13 @@ def cb_action_ACCEPT(module, filepath):
 
     smtp = smtplib.SMTP("localhost", 10027)
 
+    if conf.debuglevel > 8:
+        smtp.set_debuglevel(True)
+
     try:
         smtp.sendmail(
                 formataddr(envelope_sender[0]),
-                COMMASPACE.join(
-                        [formataddr(recipient) for recipient in recipients]
-                    ),
+                [formataddr(recipient) for recipient in recipients],
                 message.as_string()
             )
 


commit 4497e81bb593ea9dc94fe560430d76391b6ea09a
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sat Sep 1 16:29:49 2012 +0100

    Update the default autocreate_folders to 1) include the namespace to set the annotation in, 2) conform with http://wiki.kolab.org/Kolab_3.0_Storage_Format#Annotations

diff --git a/conf/kolab.conf b/conf/kolab.conf
index d20b9b7..02d301d 100644
--- a/conf/kolab.conf
+++ b/conf/kolab.conf
@@ -227,74 +227,68 @@ autocreate_folders = {
             },
         'Calendar': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "event.default",
+                        '/private/vendor/kolab/folder-type': "event.default",
+                        '/shared/vendor/kolab/folder-type': "event",
                     },
             },
         'Calendar/Personal Calendar': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "event",
+                        '/shared/vendor/kolab/folder-type': "event",
                     },
             },
         'Configuration': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "configuration.default",
+                        '/private/vendor/kolab/folder-type': "configuration.default",
+                        '/shared/vendor/kolab/folder-type': "configuration.default",
                     },
             },
         'Drafts': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "mail.drafts",
+                        '/private/vendor/kolab/folder-type': "mail.drafts",
                     },
             },
         'Contacts': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "contact.default",
+                        '/private/vendor/kolab/folder-type': "contact.default",
+                        '/shared/vendor/kolab/folder-type': "contact",
                 },
             },
         'Contacts/Personal Contacts': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "contact",
+                        '/shared/vendor/kolab/folder-type': "contact",
                     },
             },
         'Journal': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "journal.default",
+                        '/private/vendor/kolab/folder-type': "journal.default",
+                        '/shared/vendor/kolab/folder-type': "journal",
                     },
             },
         'Notes': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': 'note.default',
+                        '/private/vendor/kolab/folder-type': 'note.default',
+                        '/shared/vendor/kolab/folder-type': 'note',
                     },
             },
         'Sent': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "mail.sentitems",
+                        '/private/vendor/kolab/folder-type': "mail.sentitems",
                     },
             },
         'Spam': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "mail.junkemail",
+                        '/private/vendor/kolab/folder-type': "mail.junkemail",
                     },
             },
         'Tasks': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "task.default",
+                        '/private/vendor/kolab/folder-type': "task.default",
+                        '/shared/vendor/kolab/folder-type': "task",
                     },
             },
         'Trash': {
                 'annotations': {
-                        '/vendor/kolab/folder-test': "true",
-                        '/vendor/kolab/folder-type': "mail.trash",
+                        '/private/vendor/kolab/folder-type': "mail.trash",
                     },
             },
     }


commit ba17ba7000af0c3d770db89a9b999883d63bc5c3
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Aug 30 15:42:56 2012 +0100

    Use the internal set_metadata() function

diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index 242fe00..18e0528 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -337,7 +337,7 @@ class IMAP(object):
         if folder_name.startswith("shared%s" % (self.imap.separator) * 2):
             folder_name = folder_name[7:]
 
-        self.imap._setannotation(folder_name, '/vendor/kolab/folder-type', folder_type)
+        self.set_metadata(folder_name, '/shared/vendor/kolab/folder-type', folder_type)
 
     def shared_mailbox_create(self, mailbox_base_name, server=None):
         """
@@ -429,12 +429,11 @@ class IMAP(object):
 
             if additional_folders[additional_folder].has_key("annotations"):
                 for annotation in additional_folders[additional_folder]["annotations"].keys():
-                    if conf.get('kolab', 'imap_backend') == 'cyrus-imap':
-                        self.imap._setannotation(
-                                folder_name,
-                                "%s" % (annotation),
-                                "%s" % (additional_folders[additional_folder]["annotations"][annotation])
-                            )
+                    self.set_metadata(
+                            folder_name,
+                            "%s" % (annotation),
+                            "%s" % (additional_folders[additional_folder]["annotations"][annotation])
+                        )
 
             if additional_folders[additional_folder].has_key("quota"):
                 self.imap.sq(


commit 0277de1a46f0386468f50d0f2a5eab56ecbab866
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Aug 29 12:03:27 2012 +0100

    Add the known local domains / hostnames to the LDAP configuration during setup

diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index 4b6f6c8..3168d2f 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -442,7 +442,12 @@ ServerAdminPwd = %(admin_pass)s
     dn = "associateddomain=%s,cn=kolab,cn=config" % (_input['domain'])
     attrs = {}
     attrs['objectclass'] = ['top','domainrelatedobject']
-    attrs['associateddomain'] = '%s' % (_input['domain'])
+    attrs['associateddomain'] = [
+            '%s' % (_input['domain']),
+            '%s' % (_input['fqdn']),
+            'localhost.localdomain',
+            'localhost'
+        ]
     attrs['aci'] = '(targetattr = "*") (version 3.0;acl "Read Access for %(domain)s Users";allow (read,compare,search)(userdn = "ldap:///%(rootdn)s??sub?(objectclass=*)");)' % (_input)
 
     # Add inetdomainbasedn in case the configured root dn is not the same as the


commit afb4e49627e87b11a4883ab4c365119ea3faf91c
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Tue Aug 28 13:29:09 2012 +0100

    Preserve any secondary recipient email address attribute values that may have already been specified (#973)

diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index f1fd57b..c02cb8d 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -528,7 +528,7 @@ class LDAP(pykolab.base.Base):
         if not entry.has_key('preferredlanguage'):
             want_attrs.append('preferredlanguage')
 
-        # If we wanted anything, now is the type to get it.
+        # If we wanted anything, now is the time to get it.
         if len(want_attrs) > 0:
             log.debug(_("Attributes %r are not yet available for entry %r") % (
                         want_attrs,
@@ -710,6 +710,11 @@ class LDAP(pykolab.base.Base):
             log.debug(_("Recipient policy composed the following set of secondary " + \
                     "email addresses: %r") % (secondary_mail_addresses), level=8)
 
+            if entry.has_key(secondary_mail_attribute):
+                if isinstance(entry[secondary_mail_attribute], list):
+                    secondary_mail_addresses.extend(entry[secondary_mail_attribute])
+                else:
+                    secondary_mail_addresses.append(entry[secondary_mail_attribute])
 
             if not secondary_mail_addresses == None:
                 log.debug(





More information about the commits mailing list