From: Andrew Lewis Date: Mon, 15 Jan 2018 09:07:40 +0000 (+0200) Subject: [Minor] Reputation: deal with inbound/outbound both set X-Git-Tag: 1.7.0~277 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8be47cd463bbc77e931c515fb8ab2bede5cfda8f;p=thirdparty%2Frspamd.git [Minor] Reputation: deal with inbound/outbound both set --- diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua index e7349e445a..0d870eee81 100644 --- a/src/plugins/lua/reputation.lua +++ b/src/plugins/lua/reputation.lua @@ -763,13 +763,15 @@ local backends = { local function is_rule_applicable(task, rule) local ip = task:get_from_ip() - if rule.selector.config.outbound then - if not (task:get_user() or (ip and ip:is_local())) then - return false - end - elseif rule.selector.config.inbound then - if task:get_user() or (ip and ip:is_local()) then - return false + if not (rule.selector.config.outbound and rule.selector.config.inbound) then + if rule.selector.config.outbound then + if not (task:get_user() or (ip and ip:is_local())) then + return false + end + elseif rule.selector.config.inbound then + if task:get_user() or (ip and ip:is_local()) then + return false + end end end