]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Disable DKIM for authed users & local networks (#888) 889/head
authorAndrew Lewis <nerf@judo.za.org>
Wed, 24 Aug 2016 07:07:22 +0000 (09:07 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 24 Aug 2016 07:43:29 +0000 (09:43 +0200)
src/plugins/dkim_check.c

index 76816561030e376813e705572cb9a11c9ecb7aff..71e3b930a7e6e1e8d446042f5b93b679e96bb57b 100644 (file)
@@ -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,