summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-05 19:27:03 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-05 19:27:03 +0100
commitd9a7b05a12559e37d0e61b4e3dc85e4d3b27b19a (patch)
treebbdff527191f93f5b957176a684fdcde62ccf3ad /bin
parent205d3e034985c17e74eba01e1d79e3658130186b (diff)
downloadpykolab-d9a7b05a12559e37d0e61b4e3dc85e4d3b27b19a.tar.gz
Make sure we use /var/lib/kolab/cache/
Diffstat (limited to 'bin')
-rw-r--r--bin/kolab_smtp_access_policy.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index 1395497..e021d53 100644
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -54,14 +54,17 @@ try:
if os.access(KOLAB_LIB_PATH, os.W_OK):
cache_path = os.path.join(
KOLAB_LIB_PATH,
- 'kolab_smtp_access_policy_cache'
+ 'cache'
+ 'kolab_smtp_access_policy'
)
elif os.access('/tmp/', os.W_OK):
cache_path = os.path.join(
'/tmp/',
- 'kolab_smtp_access_policy_cache'
+ 'cache',
+ 'kolab_smtp_access_policy'
)
+
if os.path.exists(cache_path):
mode = "open"
else:
@@ -307,6 +310,7 @@ def verify_recipient(policy_request):
cache.delete(record)
cache.cleanup()
else:
+ log.info(_("From cache, %(sender)s, %(recipient)s, %(sasl_username)s") %(policy_request))
return record.result
domain = policy_request['recipient'].split('@')[1]
@@ -398,6 +402,7 @@ def verify_sender(policy_request):
cache.delete(record)
cache.cleanup()
else:
+ log.info(_("From cache, %(sender)s, %(recipient)s, %(sasl_username)s") %(policy_request))
return record.result
sender_domain = policy_request['sender'].split('@')[1]