summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-10-13 15:40:28 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-10-13 15:40:28 +0200
commit9ef320aa27b131444b6b563941c015bbf4bb8484 (patch)
treeaf25d4f5a2ff2198dc2d70c83533b3b8ee9908e8 /bin
parente4c60d29e71f0e8698dbe19193d361cb52e2dfb0 (diff)
downloadpykolab-9ef320aa27b131444b6b563941c015bbf4bb8484.tar.gz
Disable verifying alias and delegated addresses for None SASL users.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/kolab_smtp_access_policy.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index a541b51..4efb073 100755
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -1076,16 +1076,18 @@ class PolicyRequest(object):
if self.verify_authenticity() == False:
reject(_("Unverifiable sender."))
- self.sasl_user_uses_alias = self.verify_alias()
+ if not self.sasl_user == None:
+ self.sasl_user_uses_alias = self.verify_alias()
- if not self.sasl_user_uses_alias:
- log.debug(_("Sender is not using an alias"), level=8)
- self.sasl_user_is_delegate = self.verify_delegate()
+ if not self.sasl_user_uses_alias:
+ log.debug(_("Sender is not using an alias"), level=8)
+ self.sasl_user_is_delegate = self.verify_delegate()
# If the authenticated user is using delegate functionality, apply the
# recipient policy attribute for the envelope sender.
if self.sasl_user_is_delegate == False and \
- self.sasl_user_uses_alias == False:
+ self.sasl_user_uses_alias == False and \
+ not conf.allow_unauthenticated:
reject(_("Sender uses unauthorized envelope sender address"))