diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-08 18:50:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-08 18:50:42 +0100 |
commit | 0625542be15f6e3a9cc6209ce544adaa2a51bc30 (patch) | |
tree | d82a0f642143da1c75608b5674d8340fef910a18 | |
parent | d763da74c87b5939c2bcfdfdfea71c15245cfd20 (diff) | |
parent | d06e3bf6365edcbf9e3809b56a5121240f2134e1 (diff) | |
download | rspamd-0625542be15f6e3a9cc6209ce544adaa2a51bc30.tar.gz rspamd-0625542be15f6e3a9cc6209ce544adaa2a51bc30.zip |
Merge pull request #937 from fatalbanana/replies
Don't force action in replies module for authed 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 |