]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Add redirector's TLD to PHISHING symbol options
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 2 May 2016 14:13:56 +0000 (17:13 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 2 May 2016 14:13:56 +0000 (17:13 +0300)
src/plugins/lua/phishing.lua

index 338d16fdddfc0a415fa0e04f61d85be10ddd8b8f..fcb2e5f7d2fc4a1f5b2cf7385bdbbb9d8be5ad4f 100644 (file)
@@ -53,7 +53,7 @@ local function phishing_cb(task)
         if #redirector_domains > 0 then
           for _,rule in ipairs(redirector_domains) do
             if rule['map']:get_key(url:get_tld()) then
-              task:insert_result(rule['symbol'], weight, ptld)
+              task:insert_result(rule['symbol'], weight, ptld .. '->' .. tld)
               found = true
             end
           end
@@ -61,7 +61,7 @@ local function phishing_cb(task)
         if not found and #strict_domains > 0 then
           for _,rule in ipairs(strict_domains) do
             if rule['map']:get_key(ptld) then
-              task:insert_result(rule['symbol'], 1.0, ptld)
+              task:insert_result(rule['symbol'], 1.0, ptld .. '->' .. tld)
               found = true
             end
           end
@@ -69,10 +69,10 @@ local function phishing_cb(task)
         if not found then
           if domains then
             if domains:get_key(ptld) then
-              task:insert_result(symbol, weight, ptld)
+              task:insert_result(symbol, weight, ptld .. '->' .. tld)
             end
           else
-            task:insert_result(symbol, weight, ptld)
+            task:insert_result(symbol, weight, ptld .. '->' .. tld)
           end
         end
       end