diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-09-12 16:08:01 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-09-12 16:08:01 +0100 |
commit | 5fd48d99789956abfc7bf1f72c5ab69357f19f01 (patch) | |
tree | d6ab3b7363834a20d0c638da57c865fb8bbe60a5 /bin | |
parent | 9eb9bfcbbdcc38681cf706be140debb3ba016d42 (diff) | |
download | pykolab-5fd48d99789956abfc7bf1f72c5ab69357f19f01.tar.gz |
Make sure the sender exists before continuing
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/kolab_smtp_access_policy.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py index 033b550..74981a7 100755 --- a/bin/kolab_smtp_access_policy.py +++ b/bin/kolab_smtp_access_policy.py @@ -606,6 +606,14 @@ def verify_sender(policy_request): ) } + if not sender_user['dn']: + if conf.allow_unauthenticated: + return True + else: + policy_done = True + reject(_("Not allowing unauthenticated users, but sender not found")) + return False + log.debug(_("Found user object %(dn)s") %(sender_user), level=8) # Only when a user is authenticated do we have the means to check for |