]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Support MTA-Name in milter
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 31 May 2017 10:24:43 +0000 (11:24 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 31 May 2017 10:24:43 +0000 (11:24 +0100)
src/libserver/milter.c

index 6d2c7508b686bd09d51a7b45ece81fa2c8e2f501..b02929609d46a19e1bdecf5954f139932d226280 100644 (file)
@@ -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 *