diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-07-05 19:27:03 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-07-05 19:27:03 +0100 |
commit | d9a7b05a12559e37d0e61b4e3dc85e4d3b27b19a (patch) | |
tree | bbdff527191f93f5b957176a684fdcde62ccf3ad /bin | |
parent | 205d3e034985c17e74eba01e1d79e3658130186b (diff) | |
download | pykolab-d9a7b05a12559e37d0e61b4e3dc85e4d3b27b19a.tar.gz |
Make sure we use /var/lib/kolab/cache/
Diffstat (limited to 'bin')
-rw-r--r-- | bin/kolab_smtp_access_policy.py | 9 |
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] |