]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Really fix local.d includes
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Jul 2016 18:01:30 +0000 (19:01 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Jul 2016 18:02:19 +0000 (19:02 +0100)
20 files changed:
conf/modules.d/chartable.conf
conf/modules.d/dkim.conf
conf/modules.d/emails.conf
conf/modules.d/forged_recipients.conf
conf/modules.d/hfilter.conf
conf/modules.d/ip_score.conf
conf/modules.d/maillist.conf
conf/modules.d/mime_types.conf
conf/modules.d/multimap.conf
conf/modules.d/once_received.conf
conf/modules.d/phishing.conf
conf/modules.d/ratelimit.conf
conf/modules.d/rbl.conf
conf/modules.d/regexp.conf
conf/modules.d/rspamd_update.conf
conf/modules.d/spf.conf
conf/modules.d/surbl.conf
conf/modules.d/whitelist.conf
conf/rspamd.systemd.conf
conf/rspamd.sysvinit.conf

index 24f4811d020a2ed6183de717a54587b9e745c4b8..ad08eaf4801223134a5726066dac2073a76e326c 100644 (file)
@@ -14,9 +14,9 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 chartable {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/chartable.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/chartable.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/chartable.conf"
     threshold = 0.300000;
     symbol = "R_MIXED_CHARSET";
+    .include(try=true,priority=5) "${DBDIR}/dynamic/chartable.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/chartable.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/chartable.conf"
 }
index 7a2795d59d0509d6c3c41f7e07de55d79e17c71b..2cb0e903e351c46981716ed5de65ca029bcf780c 100644 (file)
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 dkim {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/dkim.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/dkim.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/dkim.conf"
     dkim_cache_size = 2k;
     dkim_cache_expire = 1d;
     time_jitter = 6h;
     trusted_only = false;
     skip_multi = false;
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/dkim.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/dkim.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/dkim.conf"
 }
index 8f6a163e5df250f1fcf22b23091e2f2d4b58ffc6..315643241ca902ed2dc12a4b8541f4f72088791d 100644 (file)
@@ -15,6 +15,6 @@
 
 emails {
     .include(try=true,priority=5) "${DBDIR}/dynamic/emails.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/emails.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/emails.conf"
     .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/emails.conf"
 }
index 7ecdbce5259a21324f29ca79badfa2db462553f8..fe17d1e4d2a44219b3f67129c66a569489021981 100644 (file)
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 forged_recipients {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/forged_recipients.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/forged_recipients.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/forged_recipients.conf"
     symbol_sender = "FORGED_SENDER";
     symbol_rcpt = "FORGED_RECIPIENTS";
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/forged_recipients.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/forged_recipients.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/forged_recipients.conf"
 }
index 7da35403e2158ad37e8f206d74ca8a9afe80b297..054a46295557bbe23920bef947fbc44bc4397797 100644 (file)
@@ -14,9 +14,6 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 hfilter {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/hfilter.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/hfilter.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/hfilter.conf"
     helo_enabled = true;
     hostname_enabled = true;
     url_enabled = true;
@@ -24,4 +21,8 @@ hfilter {
     rcpt_enabled = true;
     mid_enabled = false;
     rcpt_enabled = true;
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/hfilter.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/hfilter.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/hfilter.conf"
 }
index f8599fc06db543036648594625051cb566eda8c0..67deda38aba243b1ea9187a46f11c91125800b04 100644 (file)
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 ip_score {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/ip_score.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/ip_score.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/ip_score.conf"
 #    servers = "localhost";
 #    treshold = 100;
 #    reject_score = 3;
 #    no_action_score = -2;
 #    add_header_score = 1;
 #    whitelist = "file:///ip_map";
+    .include(try=true,priority=5) "${DBDIR}/dynamic/ip_score.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/ip_score.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/ip_score.conf"
 }
index 26e0ca7ad3170127530142e5d37e5a1862bcc5ae..d06a3cdfbae0bff6d191e04a67ec4cb4c8266699 100644 (file)
@@ -14,8 +14,8 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 maillist {
+    symbol = "MAILLIST";
     .include(try=true,priority=5) "${DBDIR}/dynamic/maillist.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/maillist.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/maillist.conf"
     .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/maillist.conf"
-    symbol = "MAILLIST";
 }
index e4c80e0a17c2fb8cd25a7a613e0fefbc82e28100..6fd3c1da81ff2e99f7d96be6eaad3536cf356742 100644 (file)
@@ -14,9 +14,6 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 mime_types {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/mime_types.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/mime_types.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/mime_types.conf"
     file = "${CONFDIR}/mime_types.inc";
 
     # Match specific extensions to specific content types
@@ -32,4 +29,8 @@ mime_types {
         "application/pdf"
       ];
     }
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/mime_types.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/mime_types.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/mime_types.conf"
 }
index 72f5671777b2270cfd1bb43ecaf6cc4cf9271635..347bdf18501c0db5cc06d54828130dabd5a6f2bd 100644 (file)
@@ -15,7 +15,7 @@
 
 multimap {
     .include(try=true,priority=5) "${DBDIR}/dynamic/multimap.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/multimap.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/multimap.conf"
     .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/multimap.conf"
 }
 
index 65efa20a775f6d74af37a0d4f0b884b6815befaa..93080d5317fb0c8d3dcf43b62aeea176dcc7e8d3 100644 (file)
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 once_received {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/once_received.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/once_received.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/once_received.conf"
     good_host = "mail";
     bad_host = "static";
     bad_host = "dynamic";
     symbol_strict = "ONCE_RECEIVED_STRICT";
     symbol = "ONCE_RECEIVED";
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/once_received.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/once_received.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/once_received.conf"
 }
index 8875a3898ab93c97f6f0f035d9b4a6259b5d5d91..8bf428e762b534342065c65064a28bddf25dd671 100644 (file)
@@ -14,9 +14,6 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 phishing {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/phishing.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/phishing.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/phishing.conf"
     symbol = "PHISHING";
     # Disabled by default
     openphish_enabled = false;
@@ -32,4 +29,7 @@ phishing {
         "$LOCAL_CONFDIR/local.d/redirectors.inc:LOCAL_REDIRECTOR_FALSE"
     ];
 
+    .include(try=true,priority=5) "${DBDIR}/dynamic/phishing.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/phishing.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/phishing.conf"
 }
index 97833c6f5e7591b1253961c06d9826dd84b35963..863dc9a3da457aae681e0b3da25375fcbb9b065a 100644 (file)
@@ -14,9 +14,6 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 ratelimit {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/ratelimit.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/ratelimit.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/ratelimit.conf"
     rates {
         # Limit for all mail per recipient (burst 100, rate 2 per minute)
         to = [100, 0.033333333];
@@ -35,4 +32,8 @@ ratelimit {
     #symbol = "R_RATELIMIT";
     whitelisted_rcpts = "postmaster,mailer-daemon";
     max_rcpt = 5;
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/ratelimit.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/ratelimit.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/ratelimit.conf"
 }
index 6b103230bb1c1c367f5127e8f902d7bde17ca040..20f3ca41be6778059646ba3545678647032263b0 100644 (file)
@@ -14,9 +14,6 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 rbl {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/rbl.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/rbl.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/rbl.conf"
     default_from = true;
     default_received = false;
     default_exclude_users = true;
@@ -168,4 +165,8 @@ rbl {
         }
 
     }
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/rbl.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/rbl.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/rbl.conf"
 }
index 56c4fe46c7d788fd1aa0f8ffce34c5a95cb2eb61..f76527871bba2729f7301e352b8c7013a74adb03 100644 (file)
@@ -14,8 +14,9 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 regexp {
+    max_size = 1M;
+
     .include(try=true,priority=5) "${DBDIR}/dynamic/regexp.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/regexp.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/regexp.conf"
     .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/regexp.conf"
-    max_size = 1M;
 }
index be34888a21202740304f9689c2ad42be25e6cf77..64b3114f66629cc528347c3b463b813af028cef4 100644 (file)
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 rspamd_update {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/rspamd_update.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/rspamd_update.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/rspamd_update.conf"
     rules = "sign+http://rspamd.com/update/rspamd-${BRANCH_VERSION}.ucl";
     key = "qxuogdh5eghytji1utkkte1dn3n81c3y5twe61uzoddzwqzuxxyb";
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/rspamd_update.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/rspamd_update.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/rspamd_update.conf"
 }
index e25158d344cc6f44078d23fe91fd670d08452950..fa66147a80b22bf4508d8403087a8d77daa9fed3 100644 (file)
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 spf {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/spf.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/spf.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/spf.conf"
     spf_cache_size = 2k;
     spf_cache_expire = 1d;
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/spf.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/spf.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/spf.conf"
 }
index 2adc1cc27b109bfdbed92bf6cd04fe6b512ea280..68038ea64e612a5f511a478754a1a3cd79967826 100644 (file)
@@ -14,9 +14,6 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 surbl {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/surbl.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/surbl.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/surbl.conf"
     whitelist = "file://$CONFDIR/surbl-whitelist.inc";
     exceptions = "file://$CONFDIR/2tld.inc";
 
@@ -98,4 +95,8 @@ surbl {
         }
         no_ip = true;
     }
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/surbl.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/surbl.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/surbl.conf"
 }
index f1d1ab56a06387864c30c653f092d7e8abdb36bf..b8637ed79d0fde3d9b9df5a0faf78e5982aed9a5 100644 (file)
@@ -14,9 +14,6 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 whitelist {
-    .include(try=true,priority=5) "${DBDIR}/dynamic/whitelist.conf"
-    .include(try=true,priority=1) "$LOCAL_CONFDIR/local.d/whitelist.conf"
-    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/whitelist.conf"
     rules {
         "WHITELIST_SPF" = {
             valid_spf = true;
@@ -45,4 +42,8 @@ whitelist {
             description = "Mail comes from the whitelisted domain and has valid DMARC and DKIM policies";
         }
     }
+
+    .include(try=true,priority=5) "${DBDIR}/dynamic/whitelist.conf"
+    .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/whitelist.conf"
+    .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/whitelist.conf"
 }
index 6ab25f6a44012a5d8285793d6b52ed0df4036e80..8fed5108b443d7c33e9977de15240f0d2b1a7fd6 100644 (file)
@@ -19,7 +19,7 @@
 
 options {
     .include "$CONFDIR/options.inc"
-    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/options.inc"
+    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/options.inc"
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/options.inc"
 }
 
@@ -27,20 +27,20 @@ logging {
     type = "console";
     systemd = true;
     .include "$CONFDIR/logging.inc"
-    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/logging.inc"
+    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/logging.inc"
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/logging.inc"
 }
 
 worker {
     bind_socket = "systemd:0";
     .include "$CONFDIR/worker-normal.inc"
-    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/worker-normal.inc"
+    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-normal.inc"
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-normal.inc"
 }
 
 worker {
     bind_socket = "systemd:1";
     .include "$CONFDIR/worker-controller.inc"
-    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/worker-controller.inc"
+    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-controller.inc"
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-controller.inc"
 }
index 9849beb17d514b0b56d7a200c89e1bcd2e9d233d..41fb0fbed836a48b1fa23969cc5a23bc2f2b7b0d 100644 (file)
@@ -20,7 +20,7 @@
 options {
     pidfile = "$RUNDIR/rspamd.pid";
     .include "$CONFDIR/options.inc"
-    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/options.inc"
+    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/options.inc"
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/options.inc"
 }
 
@@ -28,21 +28,21 @@ logging {
     type = "file";
     filename = "$LOGDIR/rspamd.log";
     .include "$CONFDIR/logging.inc"
-    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/logging.inc"
+    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/logging.inc"
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/logging.inc"
 }
 
 worker {
     bind_socket = "*:11333";
     .include "$CONFDIR/worker-normal.inc"
-    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/worker-normal.inc"
+    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-normal.inc"
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-normal.inc"
 }
 
 worker {
     bind_socket = "localhost:11334";
     .include "$CONFDIR/worker-controller.inc"
-    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/worker-controller.inc"
+    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-controller.inc"
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-controller.inc"
 }
 
@@ -51,6 +51,6 @@ worker {
 #worker {
 #    bind_socket = "*:11335";
 #    .include "$CONFDIR/worker-fuzzy.inc"
-#    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/worker-fuzzy.inc"
+#    .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-fuzzy.inc"
 #    .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-fuzzy.inc"
 #}