]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Improve logging and set hostname for further usage
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Nov 2019 12:18:42 +0000 (12:18 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Nov 2019 12:18:42 +0000 (12:18 +0000)
src/plugins/lua/once_received.lua

index c8c47ddb119fc22e55a493f54fa940e7735a9c66..03e09831121f12be21bb179bd20d329d30e80d13 100644 (file)
@@ -65,8 +65,11 @@ local function check_quantity_received (task)
       end
       task:insert_result(symbol_rdns, 1)
     else
-      rspamd_logger.infox(task, 'SMTP resolver failed to resolve: %1 is %2',
+      rspamd_logger.infox(task, 'source hostname has not been passed to Rspamd from MTA, ' ..
+          ' but we could resolve source IP address PTR %s as "%s"',
         to_resolve, results[1])
+      task:set_hostname(results[1])
+
       if good_hosts then
         for _,gh in ipairs(good_hosts) do
           if string.find(results[1], gh) then