diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-13 17:28:42 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-13 17:28:42 +0000 |
commit | eb91f13938c023c1e7cb5db4fae0f5d83ec74e1a (patch) | |
tree | 7a7460fe9fb6bb65cb15a21563884d8cb74d66a4 /src/libserver | |
parent | 0e24e4a9daadde2af987f19d30f78856b0d833c6 (diff) | |
download | rspamd-eb91f13938c023c1e7cb5db4fae0f5d83ec74e1a.tar.gz rspamd-eb91f13938c023c1e7cb5db4fae0f5d83ec74e1a.zip |
[Minor] Add ability to pass filename from Rspamc
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/protocol.c | 6 | ||||
-rw-r--r-- | src/libserver/protocol_internal.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index ef14e45ff..640d778e6 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -24,6 +24,7 @@ #include "unix-std.h" #include "protocol_internal.h" #include "libserver/mempool_vars_internal.h" +#include "task.h" #include <math.h> static GQuark @@ -260,6 +261,11 @@ rspamd_protocol_handle_headers (struct rspamd_task *task, task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS; } } + IF_HEADER (FILENAME_HEADER) { + task->msg.fpath = rspamd_mempool_ftokdup (task->task_pool, + hv_tok); + debug_task ("read filename header, value: %s", task->msg.fpath); + } else { debug_task ("wrong header: %V", hn); } diff --git a/src/libserver/protocol_internal.h b/src/libserver/protocol_internal.h index 41ba13d86..2b6c1e377 100644 --- a/src/libserver/protocol_internal.h +++ b/src/libserver/protocol_internal.h @@ -80,5 +80,6 @@ #define TLS_VERSION_HEADER "TLS-Version" #define MTA_NAME_HEADER "MTA-Name" #define MILTER_HEADER "Milter" +#define FILENAME_HEADER "Filename" #endif //RSPAMD_PROTOCOL_INTERNAL_H |