diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py --- a/bin/kolab_smtp_access_policy.py +++ b/bin/kolab_smtp_access_policy.py @@ -1356,15 +1356,18 @@ if record.recipient == recipient: recipient_found = True if not recipient_found: - cache_insert( - function=function, - sender=sender, - recipient=recipient, - result=result, - sasl_username=sasl_username, - sasl_sender=sasl_sender, - data=data - ) + try: + cache_insert( + function=function, + sender=sender, + recipient=recipient, + result=result, + sasl_username=sasl_username, + sasl_sender=sasl_sender, + data=data + ) + except Exception as errmsg: + log.error(_("Exception caught: %r") % (errmsg)) def defer_if_permit(message, policy_request=None):