summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/kolab.conf4
-rw-r--r--pykolab/auth/ldap/__init__.py5
2 files changed, 9 insertions, 0 deletions
diff --git a/conf/kolab.conf b/conf/kolab.conf
index 0abe802..30c75a2 100644
--- a/conf/kolab.conf
+++ b/conf/kolab.conf
@@ -52,6 +52,10 @@ secondary_mail = {
}
}
+; To disable the application of the recipient policy by the daemon ('kolabd' service),
+; uncomment the next line.
+;daemon_rcpt_policy = False
+
; A global default for folders to create in addition to the INBOX
; folder.
autocreate_folders = {
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index d9cf0d0..bf75489 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -562,6 +562,11 @@ class LDAP(pykolab.base.Base):
if len(mail_attributes) >= 2:
secondary_mail_attribute = mail_attributes[1]
+ daemon_rcpt_policy = self.config_get('daemon_rcpt_policy')
+ if not utils.true_or_false(daemon_rcpt_policy) == False and not daemon_rcpt_policy == None:
+ log.info(_("Applying recipient policy disabled through configuration"))
+ return entry_modifications
+
want_attrs = []
log.debug(_("Applying recipient policy to %r") % (entry_dn), level=8)