diff src/context.cpp @ 436:7b072e16bd69 stable-6-0-64

fix syslog for long messages, supress dkim checks for mail from localhost
author Carl Byington <carl@five-ten-sg.com>
date Fri, 03 Nov 2017 09:57:13 -0700
parents 69d33c034a8e
children 1686cb639269
line wrap: on
line diff
--- a/src/context.cpp	Tue Oct 24 09:17:10 2017 -0700
+++ b/src/context.cpp	Fri Nov 03 09:57:13 2017 -0700
@@ -1305,7 +1305,8 @@
 }
 
 
-const char *CONTEXT::acceptable_content(recorder &memory, int score, int bulk, const char *queueid, string_set &signers, const char *from, mlfiPriv *priv, string& msg) {
+const char *CONTEXT::acceptable_content(bool local_source, recorder &memory, int score, int bulk, const char *queueid, string_set &signers, const char *from, mlfiPriv *priv, string& msg) {
+    if (!local_source) {
     for (string_set::iterator s=signers.begin(); s!=signers.end(); s++) {
         const char *st = find_dkim_signer(*s);
         // signed by a white listed signer
@@ -1324,7 +1325,7 @@
                 log(queueid, "whitelisted dkim signer %s", *s);
                 return token_white;
             }
-            // signed by the required signer
+                // signed by a required signer
             if ((st == token_require_signed) && in_signing_set(*s,dk->signer)) {
                 log(queueid, "required dkim signer %s", *s);
                 return token_white;
@@ -1338,7 +1339,7 @@
             }
         }
         if (st == token_signed_white) {
-            // not signed by a white signer, but maybe passes strong spf check
+                // not signed by a white listed signer, but maybe passes strong spf check
             if (resolve_spf(from, ntohl(priv->ip), priv)) {
                 log(queueid, "spf pass for %s rather than whitelisted dkim signer", from);
                 return token_white;
@@ -1370,6 +1371,7 @@
             return token_black;
         }
     }
+    }
 
     if (spamassassin_limit && (score > spamassassin_limit)) {
         char buf[maxlen];