summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-12 09:46:00 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-12 09:46:00 +0100
commitea58788f15fcc7153ae01b795274b906c4f99ec1 (patch)
treedd71ed0f722687522f9a1bbbfb4df2b9573000fa /pykolab
parent8585a0ce21d87314d4ce762cd4e6cfe1d0b612c1 (diff)
downloadpykolab-ea58788f15fcc7153ae01b795274b906c4f99ec1.tar.gz
Set the mail server attribute to the actual mail server being used
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 6144e5f..58035bf 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1169,6 +1169,14 @@ class LDAP(pykolab.base.Base):
self.user_quota(entry, folder)
+ mailserver_attr = self.config_get('mailserver_attribute')
+ if not entry.has_key(mailserver_attr):
+ self.set_entry_attribute(entry, mailserver_attr, server)
+ else:
+ if not entry[mailserver_attr] == server:
+ # TODO: Should actually transfer mailbox
+ self.set_entry_attribute(entry, mailserver_attr, server)
+
else:
log.warning(
_("Kolab user %s does not have a result attribute %r") % (