From 3e708a474715a8ed7dae7b38c64928dc8f53f9b2 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 3 Jul 2015 14:44:00 +0100 Subject: [PATCH] Ignore User header in SA mode. --- src/libserver/protocol.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index a0c824bc9..d880b6229 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -391,7 +391,13 @@ rspamd_protocol_handle_headers (struct rspamd_task *task, case 'u': case 'U': if (g_ascii_strncasecmp (headern, USER_HEADER, hlen) == 0) { - task->user = hv->str; + /* + * We must ignore User header in case of spamc, as SA has + * different meaning of this header + */ + if (!RSPAMD_TASK_IS_SPAMC (task)) { + task->user = hv->str; + } } if (g_ascii_strncasecmp (headern, URLS_HEADER, hlen) == 0) { if (h->value->len == sizeof ("extended") - 1 && -- 2.39.5