From: Andrew Lewis Date: Wed, 24 Aug 2016 07:07:22 +0000 (+0200) Subject: [Minor] Disable DKIM for authed users & local networks (#888) X-Git-Tag: 1.4.0~568^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F889%2Fhead;p=thirdparty%2Frspamd.git [Minor] Disable DKIM for authed users & local networks (#888) --- diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 7681656103..71e3b930a7 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,