summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-11 22:29:56 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-11 22:29:56 +0200
commitec0611d710283330082674d71c2f514892f36fb4 (patch)
tree09ab0b534f773a89eca3ec5afdd75d0a22e3d00f /bin
parent44fadad98a7377515611cae47a0b60d0c31a0d81 (diff)
downloadpykolab-ec0611d710283330082674d71c2f514892f36fb4.tar.gz
Remember to set sender_allowed to true under the correct circumstances
Diffstat (limited to 'bin')
-rw-r--r--bin/kolab_smtp_access_policy.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index 3c6cb8b..c4671a5 100644
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -699,6 +699,7 @@ if __name__ == "__main__":
else:
log.debug(_("Allowing unauthenticated senders."), level=8)
if not verify_domain(policy_request['sender'].split('@')[1]):
+ sender_allowed = True
permit(_("External sender"))
else:
sender_allowed = verify_sender(policy_request)
@@ -713,6 +714,8 @@ if __name__ == "__main__":
level=8
)
+ sender_allowed = True
+
permit(
_("Authenticated as sender %s") %(policy_request['sender'])
)
@@ -725,6 +728,9 @@ if __name__ == "__main__":
parse_address(
policy_request["sender"]
):
+
+ sender_allowed = True
+
permit(
_("Authenticated as sender %s") %(
parse_address(policy_request["sender"])
@@ -757,5 +763,3 @@ if __name__ == "__main__":
# TODO: Insert whitelists.
if not sender_allowed or not recipient_allowed:
reject(_("Access denied"), policy_request)
- else:
- permit(_("No objections"), policy_request)