commit e0cc65e: [Minor] Spamtrap: Allow bayes learning from spamtrap module
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Oct 15 11:56:08 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-10-15 12:30:20 +0100
URL: https://github.com/rspamd/rspamd/commit/e0cc65e6df3e0b270d8771d0c56a4a26ec928320
[Minor] Spamtrap: Allow bayes learning from spamtrap module
Issue: #3516
---
src/plugins/lua/spamtrap.lua | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/plugins/lua/spamtrap.lua b/src/plugins/lua/spamtrap.lua
index 0b7a5bd9f..0803d7d64 100644
--- a/src/plugins/lua/spamtrap.lua
+++ b/src/plugins/lua/spamtrap.lua
@@ -55,8 +55,11 @@ local function spamtrap_cb(task)
settings['fuzzy_flag'],
settings['fuzzy_weight'])
end
+ local act_flags = ''
if settings['learn_spam'] then
task:set_flag("learn_spam")
+ -- Allow processing as we still need to learn and do other stuff
+ act_flags = 'process_all'
end
task:insert_result(settings['symbol'], 1, rcpt)
@@ -72,7 +75,10 @@ local function spamtrap_cb(task)
elseif settings.action == 'reject' then
smtp_message = 'message rejected'
end
- task:set_pre_result(settings['action'], smtp_message, 'spamtrap')
+ task:set_pre_result{action = settings['action'],
+ message = smtp_message,
+ module = 'spamtrap',
+ flags = act_flags}
end
end
end
More information about the Commits
mailing list