aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r--src/libserver/protocol.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 0ecc76ec6..5aff8f0cb 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -96,6 +96,7 @@
#define DELIVER_TO_HEADER "Deliver-To"
#define NO_LOG_HEADER "Log"
#define MLEN_HEADER "Message-Length"
+#define USER_AGENT_HEADER "User-Agent"
static GQuark
@@ -438,6 +439,12 @@ rspamd_protocol_handle_headers (struct rspamd_task *task,
debug_task ("extended urls information");
}
}
+ IF_HEADER (USER_AGENT_HEADER) {
+ if (hv_tok->len == 6 &&
+ rspamd_lc_cmp (hv_tok->begin, "rspamc", 6) == 0) {
+ task->flags |= RSPAMD_TASK_FLAG_LOCAL_CLIENT;
+ }
+ }
break;
case 'l':
case 'L':