diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-05-16 14:12:02 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-05-16 14:12:02 +0200 |
commit | a027d39738c405344f30e1b97819e461b627da2a (patch) | |
tree | be022cffd335dffcf5b29c3d9d3f06b449b42be1 | |
parent | 1331107fa18b0a183d313ed4852c58f52b33e5ba (diff) | |
download | rspamd-a027d39738c405344f30e1b97819e461b627da2a.tar.gz rspamd-a027d39738c405344f30e1b97819e461b627da2a.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 1db4b7967..0a1cf15b5 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -227,6 +227,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 |