From 8460d986d655c7034af15eaa4b0ded6894d8ebe9 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Wed, 24 Aug 2016 09:07:22 +0200 Subject: [PATCH] [Minor] Disable DKIM for authed users & local networks (#888) --- src/plugins/dkim_check.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 768165610..71e3b930a 100644 --- a/src/plugins/dkim_check.c +++ b/src/plugins/dkim_check.c @@ -652,6 +652,10 @@ dkim_symbol_callback (struct rspamd_task *task, void *unused) DKIM_SIGNHEADER, FALSE); if (hlist != NULL) { + if (task->user != NULL || rspamd_inet_address_is_local (task->from_addr)) { + msg_info_task ("skip DKIM checks for local networks and authorized users"); + return; + } /* Check whitelist */ msg_debug_task ("dkim signature found"); if (radix_find_compressed_addr (dkim_module_ctx->whitelist_ip, -- 2.39.5