summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-05 13:05:22 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-05 13:05:22 +0100
commitecc170674d3486b4589d29b71657157d1123424a (patch)
tree58587832ee391041be4791b2eb1217d095ef6be0 /bin
parent4db2566d1391ec458a6b4dd9a5324ae6f658ea15 (diff)
downloadpykolab-ecc170674d3486b4589d29b71657157d1123424a.tar.gz
Ensure an empty line follows our message.
Use permit() instead of defer_if_permit()
Diffstat (limited to 'bin')
-rw-r--r--bin/kolab_smtp_access_policy.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index e48a2d1..15e3ca2 100644
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -99,13 +99,16 @@ except ImportError:
cache = False
def defer_if_permit(message, policy_request=None):
- print "action=DEFER_IF_PERMIT %s" %(message)
+ print "action=DEFER_IF_PERMIT %s\n\n" %(message)
def dunno(message, policy_request=None):
- print "action=DUNNO %s" %(message)
+ print "action=DUNNO %s\n\n" %(message)
+
+def permit(message, policy_request=None):
+ print "action=PERMIT %s\n\n" %(message)
def reject(message, policy_request=None):
- print "action=REJECT %s" %(message)
+ print "action=REJECT %s\n\n" %(message)
def parse_address(email_address):
"""
@@ -537,7 +540,7 @@ if __name__ == "__main__":
level=8
)
- defer_if_permit(
+ permit(
_("Authenticated as sender %s") %(policy_request['sender'])
)
@@ -549,7 +552,7 @@ if __name__ == "__main__":
parse_address(
policy_request["sender"]
):
- defer_if_permit(
+ permit(
_("Authenticated as sender %s") %(
parse_address(policy_request["sender"])
)
@@ -582,4 +585,4 @@ if __name__ == "__main__":
if not sender_allowed or not recipient_allowed:
reject(_("Access denied"), policy_request)
else:
- defer_if_permit(_("No objections"), policy_request) \ No newline at end of file
+ permit(_("No objections"), policy_request)