summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-08-15 21:50:57 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-08-15 21:50:57 (GMT)
commite6dc1f88a35c470e359705d671a018458d5bf1a7 (patch)
treebecddc347962ba6b34c0296a620142741247f049
parent8ce75cbc9994142561f6f6afbfa78219f47c5a5c (diff)
downloadpykolab-e6dc1f88a35c470e359705d671a018458d5bf1a7.tar.gz
Add policy_done (part two of #332)
-rwxr-xr-xbin/kolab_smtp_access_policy.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index c162950..033b550 100755
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -428,6 +428,8 @@ def verify_recipient(policy_request):
recipient's kolabAllowSMTPSender.
"""
+ global policy_done
+
if not policy_request['sasl_username'] == '':
log.info(_("Verifying authenticated sender '%(sender)s' with " + \
"sasl_username '%(sasl_username)s' for recipient " + \
@@ -490,6 +492,7 @@ def verify_recipient(policy_request):
if not user['dn']:
if not conf.allow_unauthenticated:
reject(_("Invalid recipient"))
+ policy_done = True
return False
else:
log.debug(_("Could not find this user, accepting"), level=8)