From: Andrew Lewis Date: Fri, 7 Apr 2017 10:19:18 +0000 (+0200) Subject: [Minor] Emails module: fix hashed lookups X-Git-Tag: 1.5.5~31 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1ca9f52c1d0d28356961cba70177f88b828bc87b;p=rspamd.git [Minor] Emails module: fix hashed lookups --- diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 2c20622ca..1516eff39 100644 --- a/src/plugins/lua/emails.lua +++ b/src/plugins/lua/emails.lua @@ -37,14 +37,15 @@ local function check_email_rule(task, rule, addr) if rule['dnsbl'] then local to_resolve if rule['domain_only'] then - to_resolve = string.format('%s.%s', addr:get_host(), rule['dnsbl']) + to_resolve = addr:get_host() else - to_resolve = string.format('%s.%s.%s', addr:get_user(), addr:get_host(), rule['dnsbl']) + to_resolve = string.format('%s.%s', addr:get_user(), addr:get_host()) end if rule['hash'] then to_resolve = hash.create_specific(rule['hash'], to_resolve):hex() end + to_resolve = string.format('%s.%s', to_resolve, rule['dnsbl']) task:get_resolver():resolve_a({ task=task,