]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Try to deal with brain-damaged milter behaviour
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 17 Jun 2017 13:25:16 +0000 (14:25 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 17 Jun 2017 13:25:16 +0000 (14:25 +0100)
src/libserver/milter.c

index a564b3b2ec070690d097086dfd29f6831caf5340..82996d01d4521549fe94794881ac73fe3694905c 100644 (file)
@@ -1214,6 +1214,12 @@ rspamd_milter_macro_http (struct rspamd_milter_session *session,
                rspamd_http_message_add_header_len (msg, QUEUE_ID_HEADER,
                                found->begin, found->len);
        }
+       else {
+               IF_MACRO("i") {
+                       rspamd_http_message_add_header_len (msg, QUEUE_ID_HEADER,
+                                       found->begin, found->len);
+               }
+       }
 
        IF_MACRO("{daemon_name}") {
                rspamd_http_message_add_header_len (msg, MTA_TAG_HEADER,
@@ -1224,6 +1230,12 @@ rspamd_milter_macro_http (struct rspamd_milter_session *session,
                rspamd_http_message_add_header_len (msg, USER_AGENT_HEADER,
                                found->begin, found->len);
        }
+       else {
+               IF_MACRO("v") {
+                       rspamd_http_message_add_header_len (msg, USER_AGENT_HEADER,
+                                       found->begin, found->len);
+               }
+       }
 
        IF_MACRO("{cipher}") {
                rspamd_http_message_add_header_len (msg, TLS_CIPHER_HEADER,
@@ -1258,6 +1270,12 @@ rspamd_milter_macro_http (struct rspamd_milter_session *session,
                        rspamd_http_message_add_header_len (msg, MTA_NAME_HEADER,
                                        found->begin, found->len);
                }
+               else {
+                       IF_MACRO("j") {
+                               rspamd_http_message_add_header_len (msg, MTA_NAME_HEADER,
+                                               found->begin, found->len);
+                       }
+               }
        }
 }