diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-09-08 18:50:42 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-09-08 18:52:41 +0200 |
commit | d06e3bf6365edcbf9e3809b56a5121240f2134e1 (patch) | |
tree | 3578e9fd472e0aa754da4d7913672dc0b2796d69 | |
parent | bc4cf433bbd60416a3d9e4812b7a48009d680418 (diff) | |
download | rspamd-d06e3bf6365edcbf9e3809b56a5121240f2134e1.tar.gz rspamd-d06e3bf6365edcbf9e3809b56a5121240f2134e1.zip |
[Fix] Don't force action in replies module for authenticated users/local networks
-rw-r--r-- | src/plugins/lua/replies.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua index 9916dc3cf..4a3c5646f 100644 --- a/src/plugins/lua/replies.lua +++ b/src/plugins/lua/replies.lua @@ -51,7 +51,11 @@ local function replies_check(task) -- Hash was found task:insert_result(settings['symbol'], 0.0) if settings['action'] ~= nil then - task:set_pre_result(settings['action'], settings['message']) + if task:get_user() or (ip_addr and ip_addr:is_local()) then + rspamd_logger.infox(task, "not forcing action for local network or authorized user"); + else + task:set_pre_result(settings['action'], settings['message']) + end end end end |