]> source.dussan.org Git - rspamd.git/commitdiff
[Conf] Add fallback maps
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Jul 2018 13:26:25 +0000 (14:26 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Jul 2018 13:26:25 +0000 (14:26 +0100)
conf/modules.d/mid.conf
conf/modules.d/mime_types.conf
conf/modules.d/phishing.conf
conf/modules.d/surbl.conf
conf/modules.d/whitelist.conf
test/functional/configs/mime_types.conf

index c6e305d7b81d7da3a1aa77e8a6db750f2b19e856..589ce746a5c6f2a980958319bd5141038ef09227 100644 (file)
@@ -17,7 +17,8 @@ mid = {
     source = {
         url = [
             "https://maps.rspamd.com/rspamd/mid.inc.zst",
-            "$LOCAL_CONFDIR/local.d/mid.inc"
+            "$LOCAL_CONFDIR/local.d/mid.inc",
+            "fallback+file://${CONFDIR}/mid.inc"
         ];
     }
 
index b27560d6f252c34567ef52d1d7e1c4d0e62dd7e9..7bbc0aa086de17fa5433557c99fe1cd165cff283 100644 (file)
@@ -16,7 +16,8 @@
 mime_types {
     file = [
         "https://maps.rspamd.com/rspamd/mime_types.inc.zst",
-        "${DBDIR}/mime_types.inc.local"
+        "${DBDIR}/mime_types.inc.local",
+        "fallback+file://${CONFDIR}/mime_types.inc"
     ]
 
     # Match specific extensions to specific content types
index 2ad2ce8f40e7f2a35a1544b12af72553f4c29079..dd77832a8712470eaa50495b56aa9f9a87d0f300 100644 (file)
@@ -26,7 +26,8 @@ phishing {
     # Make exclusions for known redirectors
     redirector_domains = [
         "https://maps.rspamd.com/rspamd/redirectors.inc.zst:REDIRECTOR_FALSE",
-        "$LOCAL_CONFDIR/local.d/redirectors.inc:LOCAL_REDIRECTOR_FALSE"
+        "$LOCAL_CONFDIR/local.d/redirectors.inc:LOCAL_REDIRECTOR_FALSE",
+        "fallback+file://${CONFDIR}/redirectors.inc:REDIRECTOR_FALSE"
     ];
 
     .include(try=true,priority=5) "${DBDIR}/dynamic/phishing.conf"
index e0e60baa9a7f3ccefae816a19bae0796ed35a836..02acae95ecb79eb3acd3fcc9640c9ff0207e99dc 100644 (file)
 surbl {
     whitelist = [
         "https://maps.rspamd.com/rspamd/surbl-whitelist.inc.zst",
-        "${DBDIR}/surbl-whitelist.inc.local"
+        "${DBDIR}/surbl-whitelist.inc.local",
+        "fallback+file://${CONFDIR}/surbl-whitelist.inc"
     ];
     exceptions = [
         "https://maps.rspamd.com/rspamd/2tld.inc.zst",
-        "${DBDIR}/2tld.inc.local"
+        "${DBDIR}/2tld.inc.local",
+        "fallback+file://${CONFDIR}/2tld.inc"
     ];
 
     rules {
index b3f93d5f5d53c752529bb0c6abd832826eadccea..0665232ab3c5cdae6f17d02ba17885898cfa5e82 100644 (file)
@@ -20,6 +20,7 @@ whitelist {
             domains = [
                 "https://maps.rspamd.com/rspamd/spf_whitelist.inc.zst",
                 "${DBDIR}/spf_whitelist.inc.local",
+                "fallback+file://${CONFDIR}/spf_whitelist.inc"
             ];
             score = -1.0
             description = "Mail comes from the whitelisted domain and has a valid SPF policy";
@@ -30,6 +31,7 @@ whitelist {
             domains = [
                 "https://maps.rspamd.com/rspamd/dkim_whitelist.inc.zst",
                 "${DBDIR}/dkim_whitelist.inc.local",
+                "fallback+file://${CONFDIR}/dkim_whitelist.inc"
             ];
             description = "Mail comes from the whitelisted domain and has a valid DKIM signature";
             score = -1.0
@@ -40,6 +42,7 @@ whitelist {
             domains = [
                 "https://maps.rspamd.com/rspamd/spf_dkim_whitelist.inc.zst",
                 "${DBDIR}/spf_dkim_whitelist.inc.local",
+                "fallback+file://${CONFDIR}/spf_dkim_whitelist.inc"
             ];
             score = -3.0;
             description = "Mail comes from the whitelisted domain and has valid SPF and DKIM policies";
@@ -49,6 +52,7 @@ whitelist {
             domains = [
                 "https://maps.rspamd.com/rspamd/dmarc_whitelist.inc.zst",
                 "${DBDIR}/dmarc_whitelist.inc.local",
+                "fallback+file://${CONFDIR}/dmarc_whitelist.inc"
             ];
             score = -7.0;
             description = "Mail comes from the whitelisted domain and has valid DMARC and DKIM policies";
index 7ba2c044811416cd007a56a18bca212d43ee5d8c..a16434b6a67733b958bfbb55db6b9912f18c4233 100644 (file)
@@ -1,5 +1,8 @@
 mime_types {
-    file = "https://maps.rspamd.com/rspamd/mime_types.inc.zst";
+    file = [
+      "https://maps.rspamd.com/rspamd/mime_types.inc.zst",
+      "fallback+file://${TESTDIR}/../../../conf/mime_types.inc"
+     ];
     extension_map {
         html = "text/html";
         txt [