2 commits - conf/kolab.conf saslauthd/__init__.py
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Thu Jun 21 11:19:31 CEST 2012
conf/kolab.conf | 3 +++
saslauthd/__init__.py | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 0c4f845ce0441feec565a0ab5a521377d949a2e2
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Thu Jun 21 10:18:44 2012 +0100
Add mailserver_attribute to the default configuration
diff --git a/conf/kolab.conf b/conf/kolab.conf
index 1608a75..2b70116 100644
--- a/conf/kolab.conf
+++ b/conf/kolab.conf
@@ -128,6 +128,9 @@ unique_attribute = nsuniqueid
; a recipient policy.
mail_attributes = mail, alias
+; The attribute that holds the FQDN to the mail server the folder exists on
+mailserver_attribute = mailhost
+
; Attributes that hold valid authentication login names. Use 'mail', 'alias' and
; optionally 'uid' (the uid is marked as an auth_attribute automatically), so
; that a user can login with;
commit 52fae42619833a394dde8cf755dd4f77da52c7d4
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Thu Jun 21 10:16:46 2012 +0100
If a realm is specified, can be found, use that realm to instantiate Auth (or use the primary_domain) (#852)
diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py
index 3cf6efb..b5c4f4d 100644
--- a/saslauthd/__init__.py
+++ b/saslauthd/__init__.py
@@ -159,8 +159,16 @@ class SASLAuthDaemon(object):
end = start + 2
login.append(value)
- auth = Auth()
+ if len(login) == 4:
+ realm = login[3]
+ elif len(login[0].split('@')) > 1:
+ realm = login[0].split('@')[1]
+ else:
+ realm = conf.get('kolab', 'primary_domain')
+
+ auth = Auth(domain=realm)
auth.connect()
+
if auth.authenticate(login):
clientsocket.send(struct.pack("!H2s", 2, "OK"))
else:
More information about the commits
mailing list