From: Andrew Lewis Date: Tue, 16 May 2017 12:12:02 +0000 (+0200) Subject: [Feature] Multimap: email:domain:tld filter X-Git-Tag: 1.5.8~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=edc510dac3571acd4ed15de74708e953709ba92f;p=rspamd.git [Feature] Multimap: email:domain:tld filter --- 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