From d128290c075ac95d71dd03c202558ebd3c8b6cc7 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 31 May 2017 11:24:43 +0100 Subject: [PATCH] [Minor] Support MTA-Name in milter --- src/libserver/milter.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/libserver/milter.c b/src/libserver/milter.c index 6d2c7508b..b02929609 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -1197,6 +1197,19 @@ rspamd_milter_macro_http (struct rspamd_milter_session *session, found->begin, found->len); } } + + IF_MACRO("{daemon_name}") { + /* Postfix style */ + rspamd_http_message_add_header_len (msg, MTA_NAME_HEADER, + found->begin, found->len); + } + else { + /* Sendmail style */ + IF_MACRO("j") { + rspamd_http_message_add_header_len (msg, MTA_NAME_HEADER, + found->begin, found->len); + } + } } struct rspamd_http_message * -- 2.39.5