diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-27 19:29:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-27 19:29:28 +0100 |
commit | 6d34197ef90dcc50a85c5e2029e03ec87a593edb (patch) | |
tree | f1b6fb6dbe3918505f73c8a155499e452336be14 /src/libserver | |
parent | 828094ac8185d00e18e489e6a6f5193cf11db975 (diff) | |
download | rspamd-6d34197ef90dcc50a85c5e2029e03ec87a593edb.tar.gz rspamd-6d34197ef90dcc50a85c5e2029e03ec87a593edb.zip |
[Minor] Utilise {rcpt_mailer} macro in milter mode
Issue: #2151
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/milter.c | 5 | ||||
-rw-r--r-- | src/libserver/protocol.c | 2 | ||||
-rw-r--r-- | src/libserver/protocol_internal.h | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/libserver/milter.c b/src/libserver/milter.c index 010f2215a..3f3772850 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -1349,6 +1349,11 @@ rspamd_milter_macro_http (struct rspamd_milter_session *session, found->begin, found->len); } + IF_MACRO("{rcpt_mailer}") { + rspamd_http_message_add_header_len (msg, MAILER_HEADER, + found->begin, found->len); + } + if (milter_ctx->client_ca_name) { IF_MACRO ("{cert_issuer}") { rspamd_http_message_add_header_len (msg, CERT_ISSUER_HEADER, diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 7f12e3883..83d7afdf8 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -497,7 +497,7 @@ rspamd_protocol_handle_headers (struct rspamd_task *task, } break; default: - msg_debug_protocol ("unknown header: %V", hn); + msg_debug_protocol ("generic header: %V", hn); break; } diff --git a/src/libserver/protocol_internal.h b/src/libserver/protocol_internal.h index 42552f789..756b9f68a 100644 --- a/src/libserver/protocol_internal.h +++ b/src/libserver/protocol_internal.h @@ -82,5 +82,6 @@ #define MILTER_HEADER "Milter" #define FILENAME_HEADER "Filename" #define CERT_ISSUER_HEADER "TLS-Cert-Issuer" +#define MAILER_HEADER "Mailer" #endif //RSPAMD_PROTOCOL_INTERNAL_H |