]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Prefer 'MTA-Name' when producing authentication results
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Jul 2018 13:40:20 +0000 (14:40 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Jul 2018 13:40:20 +0000 (14:40 +0100)
lualib/lua_auth_results.lua
src/libserver/milter.c

index 3f604d7600c4c53a066288e45c47f160df3c72fe..4f4736ff17b9ca1eacfad85476ee2b7c3483bd1a 100644 (file)
@@ -78,7 +78,8 @@ local function gen_auth_results(task, settings)
     symbols = {}
   }
 
-  local mta_hostname = task:get_request_header('MTA-Tag')
+  local mta_hostname = task:get_request_header('MTA-Name') or
+      task:get_request_header('MTA-Tag')
   if mta_hostname then
     table.insert(hdr_parts, tostring(mta_hostname))
   else
index b6294d9999770c4df6a75559a725fe6d324e3b77..b44856028544edac2b5d9837c1e01c90f904b5f7 100644 (file)
@@ -1318,11 +1318,6 @@ rspamd_milter_macro_http (struct rspamd_milter_session *session,
                }
        }
 
-       IF_MACRO("{daemon_name}") {
-               rspamd_http_message_add_header_len (msg, MTA_TAG_HEADER,
-                               found->begin, found->len);
-       }
-
        IF_MACRO("{v}") {
                rspamd_http_message_add_header_len (msg, USER_AGENT_HEADER,
                                found->begin, found->len);