Browse Source

[Fix] Prefer 'MTA-Name' when producing authentication results

tags/1.7.9
Vsevolod Stakhov 5 years ago
parent
commit
c5663c16fe
2 changed files with 2 additions and 6 deletions
  1. 2
    1
      lualib/lua_auth_results.lua
  2. 0
    5
      src/libserver/milter.c

+ 2
- 1
lualib/lua_auth_results.lua View 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

+ 0
- 5
src/libserver/milter.c View 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);

Loading…
Cancel
Save