summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-03 16:18:40 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-03 16:20:21 +0000
commit78be79252f67aff61cabc4abee054217efae7cad (patch)
treedd5b08112afe90430f1763fdd81f4babfe06f1a9 /bin
parent72da10f4ccb5de84accf71dd5e22eaedde586947 (diff)
downloadpykolab-78be79252f67aff61cabc4abee054217efae7cad.tar.gz
Initialize auth before any work begins
Diffstat (limited to 'bin')
-rwxr-xr-xbin/kolab_smtp_access_policy.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index e19d156..52ce566 100755
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -743,6 +743,11 @@ class PolicyRequest(object):
else:
sasl_domain = conf.get('kolab', 'primary_domain')
+ if self.auth == None:
+ self.auth = Auth(sasl_domain)
+ elif not self.auth.domain == sasl_domain:
+ self.auth = Auth(sasl_domain)
+
if verify_domain(sasl_domain):
if self.auth.secondary_domains.has_key(sasl_domain):
log.debug(
@@ -771,11 +776,6 @@ class PolicyRequest(object):
return True
- if self.auth == None:
- self.auth = Auth(sasl_domain)
- elif not self.auth.domain == sasl_domain:
- self.auth = Auth(sasl_domain)
-
recipients = self.auth.find_recipient(
normalize_address(recipient),
domain=sasl_domain,