From 1501df6e42968f7331a2246949efa846e2cf7bb4 Mon Sep 17 00:00:00 2001 From: andryyy Date: Fri, 5 May 2017 10:35:27 +0200 Subject: [PATCH] Use Redis for DKIM keys, define any selector, auto-merge old keys to Redis and fallback to files --- data/conf/rspamd/local.d/dkim_signing.conf | 6 +- data/web/admin.php | 15 ++++- data/web/inc/functions.inc.php | 68 +++++++++++++++++++--- data/web/inc/prerequisites.inc.php | 4 ++ 4 files changed, 81 insertions(+), 12 deletions(-) diff --git a/data/conf/rspamd/local.d/dkim_signing.conf b/data/conf/rspamd/local.d/dkim_signing.conf index 23eeadb69..9859678ee 100644 --- a/data/conf/rspamd/local.d/dkim_signing.conf +++ b/data/conf/rspamd/local.d/dkim_signing.conf @@ -23,6 +23,8 @@ use_domain = "envelope"; # Whether to normalise domains to eSLD use_esld = false; # Whether to get keys from Redis -use_redis = false; +use_redis = true; # Hash for DKIM keys in Redis -hash_key = "DKIM_KEYS"; +key_prefix = "DKIM_PRIV_KEYS"; +# Selector map +selector_map = "redis://DKIM_SELECTORS"; diff --git a/data/web/admin.php b/data/web/admin.php index 6da0f396c..6235b6820 100644 --- a/data/web/admin.php +++ b/data/web/admin.php @@ -190,7 +190,6 @@ $tfa_data = get_tfa();
-

Domain:
+ Selector '' bit

@@ -233,6 +233,7 @@ $tfa_data = get_tfa();

↳ Alias-Domain:
+ Selector '' bit

@@ -267,8 +268,12 @@ $tfa_data = get_tfa(); ?>
-

Domain:

-
+

Domain:
+ + Selector '' + bit +

+
@@ -290,6 +295,10 @@ $tfa_data = get_tfa();
+
+ + +