diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-09-24 13:19:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-09-24 13:19:42 +0100 |
commit | c6bec0f8dfa6790b8a3f919aeb09440b4d367a42 (patch) | |
tree | 9fc1f64bcfbbf777a3cfc7eaf748fbfb1afbf853 /src/plugins | |
parent | 5d72a5adc8de39b0e62f1400038551a818d51d8d (diff) | |
download | rspamd-c6bec0f8dfa6790b8a3f919aeb09440b4d367a42.tar.gz rspamd-c6bec0f8dfa6790b8a3f919aeb09440b4d367a42.zip |
[Conf] Add new plugin default configuration
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/known_senders.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/plugins/lua/known_senders.lua b/src/plugins/lua/known_senders.lua index 99ca194ae..274821904 100644 --- a/src/plugins/lua/known_senders.lua +++ b/src/plugins/lua/known_senders.lua @@ -157,10 +157,18 @@ local function known_senders_callback(task) local smtp_from = (task:get_from('smtp') or {})[1] local mime_key, smtp_key if mime_from and mime_from.addr then - mime_key = make_key(mime_from) + if settings.domains.get_key(mime_from.domain) then + mime_key = make_key(mime_from) + else + lua_util.debugm(N, task, 'skip mime from domain %s', mime_from.domain) + end end if smtp_from and smtp_from.addr then - smtp_key = make_key(smtp_from) + if settings.domains.get_key(smtp_from.domain) then + smtp_key = make_key(smtp_from) + else + lua_util.debugm(N, task, 'skip smtp from domain %s', smtp_from.domain) + end end if mime_key and smtp_key and mime_key ~= smtp_key then @@ -197,6 +205,7 @@ if opts then type = 'normal', callback = known_senders_callback, one_shot = true, + score = -1.0, augmentations = { string.format("timeout=%f", redis_params.timeout or 0.0) } }) else |