DMARC: promote the support from Experimental to mainline
[exim.git] / src / src / readconf.c
index 52c64830e5eea5a7d6883b34b081e784dab3abf0..2f78cd746f6d2a043895d743787f8ba665949a2e 100644 (file)
@@ -117,9 +117,12 @@ static optionlist optionlist_config[] = {
 #endif
   { "disable_ipv6",             opt_bool,        &disable_ipv6 },
 #ifndef DISABLE_DKIM
+  { "dkim_verify_hashes",       opt_stringptr,   &dkim_verify_hashes },
+  { "dkim_verify_keytypes",     opt_stringptr,   &dkim_verify_keytypes },
+  { "dkim_verify_minimal",      opt_bool,        &dkim_verify_minimal },
   { "dkim_verify_signers",      opt_stringptr,   &dkim_verify_signers },
 #endif
-#ifdef EXPERIMENTAL_DMARC
+#ifdef SUPPORT_DMARC
   { "dmarc_forensic_sender",    opt_stringptr,   &dmarc_forensic_sender },
   { "dmarc_history_file",       opt_stringptr,   &dmarc_history_file },
   { "dmarc_tld_file",           opt_stringptr,   &dmarc_tld_file },
@@ -306,7 +309,7 @@ static optionlist optionlist_config[] = {
   { "smtp_ratelimit_hosts",     opt_stringptr,   &smtp_ratelimit_hosts },
   { "smtp_ratelimit_mail",      opt_stringptr,   &smtp_ratelimit_mail },
   { "smtp_ratelimit_rcpt",      opt_stringptr,   &smtp_ratelimit_rcpt },
-  { "smtp_receive_timeout",     opt_func,        &fn_smtp_receive_timeout },
+  { "smtp_receive_timeout",     opt_func,        (void *) &fn_smtp_receive_timeout },
   { "smtp_reserve_hosts",       opt_stringptr,   &smtp_reserve_hosts },
   { "smtp_return_error_details",opt_bool,        &smtp_return_error_details },
 #ifdef SUPPORT_I18N
@@ -3326,6 +3329,19 @@ if (f.trusted_config && Ustrcmp(filename, US"/dev/null"))
 
     log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Exim configuration file %s has the "
       "wrong owner, group, or mode", big_buffer);
+
+  /* Do a dummy store-allocation of a size related to the (toplevel) file size.
+  This assumes we will need this much storage to handle all the allocations
+  during startup; it won't help when .include is being used.  When it does, it
+  will cut down on the number of store blocks (and malloc calls, and sbrk
+  syscalls).  It also assume we're on the relevant pool. */
+
+  if (statbuf.st_size > 8192)
+    {
+    rmark r = store_mark();
+    void * dummy = store_get((int)statbuf.st_size, FALSE);
+    store_reset(r);
+    }
   }
 
 /* Do a dummy store-allocation of a size related to the (toplevel) file size.
@@ -3337,7 +3353,7 @@ syscalls).  It also assume we're on the relevant pool. */
 if (statbuf.st_size > 8192)
   {
   rmark r = store_mark();
-  store_get((int)statbuf.st_size, FALSE);
+  void * dummy = store_get((int)statbuf.st_size, FALSE);
   store_reset(r);
   }
 
@@ -3463,15 +3479,14 @@ smtp_active_hostname = primary_hostname;
 got set above. Of course, writing to the log may not work if log_file_path is
 not set, but it will at least get to syslog or somewhere, with any luck. */
 
-if (*spool_directory == 0)
+if (!*spool_directory)
   log_write(0, LOG_MAIN|LOG_PANIC_DIE, "spool_directory undefined: cannot "
     "proceed");
 
 /* Expand the spool directory name; it may, for example, contain the primary
 host name. Same comment about failure. */
 
-s = expand_string(spool_directory);
-if (s == NULL)
+if (!(s = expand_string(spool_directory)))
   log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to expand spool_directory "
     "\"%s\": %s", spool_directory, expand_string_message);
 spool_directory = s;
@@ -3480,32 +3495,27 @@ spool_directory = s;
 the null string or "syslog". It is also allowed to contain one instance of %D
 or %M. However, it must NOT contain % followed by anything else. */
 
-if (*log_file_path != 0)
+if (*log_file_path)
   {
   const uschar *ss, *sss;
   int sep = ':';                       /* Fixed for log file path */
-  s = expand_string(log_file_path);
-  if (s == NULL)
+  if (!(s = expand_string(log_file_path)))
     log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to expand log_file_path "
       "\"%s\": %s", log_file_path, expand_string_message);
 
   ss = s;
-  while ((sss = string_nextinlist(&ss,&sep,big_buffer,big_buffer_size)) != NULL)
+  while ((sss = string_nextinlist(&ss, &sep, big_buffer, big_buffer_size)))
     {
     uschar *t;
     if (sss[0] == 0 || Ustrcmp(sss, "syslog") == 0) continue;
-    t = Ustrstr(sss, "%s");
-    if (t == NULL)
+    if (!(t = Ustrstr(sss, "%s")))
       log_write(0, LOG_MAIN|LOG_PANIC_DIE, "log_file_path \"%s\" does not "
         "contain \"%%s\"", sss);
     *t = 'X';
-    t = Ustrchr(sss, '%');
-    if (t != NULL)
-      {
+    if ((t = Ustrchr(sss, '%')))
       if ((t[1] != 'D' && t[1] != 'M') || Ustrchr(t+2, '%') != NULL)
         log_write(0, LOG_MAIN|LOG_PANIC_DIE, "log_file_path \"%s\" contains "
           "unexpected \"%%\" character", s);
-      }
     }
 
   log_file_path = s;