diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-01 16:11:45 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-01 16:11:45 +0100 |
commit | 8b14fbab1e094fe8db43ce83afeea52bf83b7dc5 (patch) | |
tree | 2444ce7fce664259a1f0d6bac0edd4a8a78a3312 /src/plugins/lua/clickhouse.lua | |
parent | 66394a369f95e83bec1646f73bebccd106858bb2 (diff) | |
download | rspamd-8b14fbab1e094fe8db43ce83afeea52bf83b7dc5.tar.gz rspamd-8b14fbab1e094fe8db43ce83afeea52bf83b7dc5.zip |
[Feature] Skip updates for messages scanned via controller
Rationale: controller worker is not designed to perform scan jobs,
hence, we check for `Password` header or check `User-Agent` for `rspamc`
and skip some of rules parts:
- DMARC reports
- Greylisting
- Ratelimits
- Ip score update
- Clickhouse export
Diffstat (limited to 'src/plugins/lua/clickhouse.lua')
-rw-r--r-- | src/plugins/lua/clickhouse.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua index baee79ca7..eb4ad57b7 100644 --- a/src/plugins/lua/clickhouse.lua +++ b/src/plugins/lua/clickhouse.lua @@ -16,6 +16,7 @@ limitations under the License. local rspamd_logger = require 'rspamd_logger' local rspamd_http = require "rspamd_http" +local rspamd_lua_utils = require "lua_util" if confighelp then return @@ -345,6 +346,7 @@ local function clickhouse_quote(str) end local function clickhouse_collect(task) + if rspamd_lua_utils.is_rspamc_or_controller(task) then return end local from_domain = '' local from_user = '' if task:has_from('smtp') then |