Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | local custom_keywords = {} |
| 2 | |
| 3 | custom_keywords.mailcow = function(task) |
| 4 | local rspamd_logger = require "rspamd_logger" |
| 5 | local dyn_rl_symbol = task:get_symbol("DYN_RL") |
| 6 | if dyn_rl_symbol then |
| 7 | local rl_value = dyn_rl_symbol[1].options[1] |
| 8 | local rl_object = dyn_rl_symbol[1].options[2] |
| 9 | if rl_value and rl_object then |
| 10 | rspamd_logger.infox(rspamd_config, "DYN_RL symbol has value %s for object %s, returning %s...", rl_value, rl_object, "rs_dynrl_" .. rl_object) |
| 11 | return "rs_dynrl_" .. rl_object, rl_value |
| 12 | end |
| 13 | end |
| 14 | end |
| 15 | |
| 16 | return custom_keywords |