From 9a037c9aad08e0ecc7232b1879d5d80a34e55dba Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 9 Jan 2017 17:33:30 +0000 Subject: [PATCH] [Conf] Allow to edit all local maps from WebUI by default --- conf/modules.d/mime_types.conf | 5 ++++- conf/modules.d/surbl.conf | 10 ++++++++-- conf/modules.d/whitelist.conf | 20 ++++++++++++++++---- conf/options.inc | 3 ++- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/conf/modules.d/mime_types.conf b/conf/modules.d/mime_types.conf index 6fd3c1da8..04117e543 100644 --- a/conf/modules.d/mime_types.conf +++ b/conf/modules.d/mime_types.conf @@ -14,7 +14,10 @@ # See https://rspamd.com/doc/tutorials/writing_rules.html for details mime_types { - file = "${CONFDIR}/mime_types.inc"; + file = [ + "${CONFDIR}/mime_types.inc", + "${DBDIR}/mime_types.inc.local" + ] # Match specific extensions to specific content types extension_map = { diff --git a/conf/modules.d/surbl.conf b/conf/modules.d/surbl.conf index 3a051719b..2d5711b0d 100644 --- a/conf/modules.d/surbl.conf +++ b/conf/modules.d/surbl.conf @@ -14,8 +14,14 @@ # See https://rspamd.com/doc/tutorials/writing_rules.html for details surbl { - whitelist = "file://$CONFDIR/surbl-whitelist.inc"; - exceptions = "file://$CONFDIR/2tld.inc"; + whitelist = [ + "${CONFDIR}/surbl-whitelist.inc", + "${DBDIR}/surbl-whitelist.inc.local" + ]; + exceptions = [ + "${CONFDIR}/2tld.inc", + "${DBDIR}/2tld.inc.local" + ]; rules { "SURBL_MULTI" { diff --git a/conf/modules.d/whitelist.conf b/conf/modules.d/whitelist.conf index b8637ed79..de8b9b516 100644 --- a/conf/modules.d/whitelist.conf +++ b/conf/modules.d/whitelist.conf @@ -17,27 +17,39 @@ whitelist { rules { "WHITELIST_SPF" = { valid_spf = true; - domains = "${CONFDIR}/spf_whitelist.inc"; + domains = [ + "${CONFDIR}/spf_whitelist.inc", + "${DBDIR}/spf_whitelist.inc.local", + ]; score = -1.0 description = "Mail comes from the whitelisted domain and has a valid SPF policy"; } "WHITELIST_DKIM" = { valid_dkim = true; - domains = "${CONFDIR}/dkim_whitelist.inc"; + domains = [ + "${CONFDIR}/dkim_whitelist.inc", + "${DBDIR}/dkim_whitelist.inc.local", + ]; description = "Mail comes from the whitelisted domain and has a valid DKIM signature"; score = -1.0 } "WHITELIST_SPF_DKIM" = { valid_spf = true; valid_dkim = true; - domains = "${CONFDIR}/spf_dkim_whitelist.inc"; + domains = [ + "${CONFDIR}/spf_dkim_whitelist.inc", + "${DBDIR}/spf_dkim_whitelist.inc.local", + ]; score = -3.0; description = "Mail comes from the whitelisted domain and has valid SPF and DKIM policies"; } "WHITELIST_DMARC" = { valid_dmarc = true; - domains = "${CONFDIR}/dmarc_whitelist.inc"; + domains = [ + "${CONFDIR}/dmarc_whitelist.inc", + "${DBDIR}/dmarc_whitelist.inc.local", + ]; score = -7.0; description = "Mail comes from the whitelisted domain and has valid DMARC and DKIM policies"; } diff --git a/conf/options.inc b/conf/options.inc index 41a1c6ecb..b3d14654c 100644 --- a/conf/options.inc +++ b/conf/options.inc @@ -14,7 +14,8 @@ dns { retransmits = 5; } tempdir = "/tmp"; -url_tld = "${PLUGINSDIR}/effective_tld_names.dat"; +url_tld = ["${PLUGINSDIR}/effective_tld_names.dat", + "${DBDIR}/effective_tld_names.dat.local"]; classify_headers = [ "User-Agent", "X-Mailer", -- 2.39.5