commit 4068f84: [Minor] Rspamadm: Add urls --full option

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Apr 15 12:00:07 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-04-15 12:56:52 +0100
URL: https://github.com/rspamd/rspamd/commit/4068f84ca27fef18cd6d34bb271a7a3ee4ef89b2 (HEAD -> master)

[Minor] Rspamadm: Add urls --full option

---
 lualib/rspamadm/mime.lua | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lualib/rspamadm/mime.lua b/lualib/rspamadm/mime.lua
index 8ef82f1c0..06b163d9b 100644
--- a/lualib/rspamadm/mime.lua
+++ b/lualib/rspamadm/mime.lua
@@ -116,7 +116,9 @@ urls:mutex(
     urls:flag "-t --tld"
         :description "Get TLDs only",
     urls:flag "-H --host"
-        :description "Get hosts only"
+        :description "Get hosts only",
+    urls:flag "-f --full"
+      :description "Show piecewise urls as processed by Rspamd"
 )
 
 urls:flag "-u --unique"
@@ -513,6 +515,8 @@ local function urls_handler(opts)
         s = u:get_tld()
       elseif opts.host then
         s = u:get_host()
+      elseif opts.full then
+        s = rspamd_logger.slog('%s: %s', u:get_text(), u:to_table())
       else
         s = u:get_text()
       end


More information about the Commits mailing list