aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/protocol.c12
-rw-r--r--src/libserver/protocol_internal.h1
2 files changed, 11 insertions, 2 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 76a41445b..45051ce51 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -351,8 +351,16 @@ rspamd_protocol_handle_headers (struct rspamd_task *task,
msg_debug_protocol ("read rcpt header, value: %V", hv);
}
- else {
- msg_debug_protocol ("wrong header: %V", hn);
+ IF_HEADER (RAW_DATA_HEADER) {
+ srch.begin = "yes";
+ srch.len = 3;
+
+ msg_debug_protocol ("read raw data header, value: %V", hv);
+
+ if (rspamd_ftok_casecmp (hv_tok, &srch) == 0) {
+ task->flags &= ~RSPAMD_TASK_FLAG_MIME;
+ msg_debug_protocol ("disable mime parsing");
+ }
}
break;
case 'i':
diff --git a/src/libserver/protocol_internal.h b/src/libserver/protocol_internal.h
index 756b9f68a..fb2ee115a 100644
--- a/src/libserver/protocol_internal.h
+++ b/src/libserver/protocol_internal.h
@@ -83,5 +83,6 @@
#define FILENAME_HEADER "Filename"
#define CERT_ISSUER_HEADER "TLS-Cert-Issuer"
#define MAILER_HEADER "Mailer"
+#define RAW_DATA_HEADER "Raw"
#endif //RSPAMD_PROTOCOL_INTERNAL_H