diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-05-16 14:12:02 +0200 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-20 12:27:21 +0100 |
commit | edc510dac3571acd4ed15de74708e953709ba92f (patch) | |
tree | 8fe581a5577d04e8c08e9a12108c8aa0e03d4bbe | |
parent | b9d5298b08d5be66686403634f28d662d9708f28 (diff) | |
download | rspamd-edc510dac3571acd4ed15de74708e953709ba92f.tar.gz rspamd-edc510dac3571acd4ed15de74708e953709ba92f.zip |
[Feature] Multimap: email:domain:tld filter
-rw-r--r-- | src/plugins/lua/multimap.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index f5f5edaca..216018dc5 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -223,6 +223,11 @@ local function apply_addr_filter(task, filter, input, rule) if addr and addr[1] then return addr[1]['domain'] end + elseif filter == 'email:domain:tld' then + local addr = util.parse_mail_address(input, task:get_mempool()) + if addr and addr[1] then + return util.get_tld(addr[1]['domain']) + end elseif filter == 'email:name' then local addr = util.parse_mail_address(input, task:get_mempool()) if addr and addr[1] then |