YunoHost / issues

General issue tracker for the YunoHost project
72 stars 8 forks source link

redis integration into rspamd #2266

Closed chri2 closed 9 months ago

chri2 commented 1 year ago

Describe the bug

rspamd seems to have problems using redis

Context

To reproduce

I don't know what I did wrong to break it if it is supposed to work. Still looking at it.

Expected behavior

rspamd with greylisting enabled and no bayes related errors in its logfile.

Logs

2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_redis_init: cannot init redis backend for BAYES_SPAM
2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_stat_init: added backend redis for symbol BAYES_SPAM
2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_stat_cache_redis_init: cannot init redis cache for BAYES_SPAM
2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_stat_init: error adding cache redis for symbol BAYES_SPAM
2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_stat_init: cannot init backend redis for statfile BAYES_SPAM
2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_redis_init: cannot init redis backend for BAYES_HAM
2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_stat_init: added backend redis for symbol BAYES_HAM
2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_stat_cache_redis_init: cannot init redis cache for BAYES_HAM
2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_stat_init: error adding cache redis for symbol BAYES_HAM
2023-10-16 12:39:42 #890320(normal) <jwhxhu>; cfg; rspamd_stat_init: cannot init backend redis for statfile BAYES_HAM
both auth_only (true) and sign_authenticated (true) for dkim_signing are specified, prefer auth_only
Modules enabled: hfilter, phishing, emails, asn, settings, chartable, arc, bayes_expiry, once_received, rbl, fuzzy_check, metadata_exporter, elastic, mid, multimap, spf, dkim_signing, dkim, mime_types, regexp, maillist, dmarc, forged_recipients, milter_headers, whitelist, force_actions, trie
Modules disabled (explicitly): external_relay, mx_check, aws_s3, dcc, p0f, spamtrap, rspamd_update, http_headers, bimi
Modules disabled (unconfigured): spamassassin, maps_stats, metric_exporter, dynamic_conf, clustering, reputation, antivirus, fuzzy_collect, external_services, ip_score, clickhouse
Modules disabled (no Redis): greylist, url_redirector, replies, neural, ratelimit, history_redis
Modules disabled (experimental): 
Modules disabled (failed): 
chri2 commented 1 year ago

As @Tagadda found, there just is the configuration directive for the redis server missing in rspamd:

--- /etc/tmp/conf.d/etc/rspamd/modules.d/redis.conf 2023/10/16 11:16:34 1.1
+++ /etc/tmp/conf.d/etc/rspamd/modules.d/redis.conf 2023/10/16 11:17:45 1.2
@@ -13,7 +13,7 @@
 # See https://rspamd.com/doc/configuration/redis.html

 redis {
-  #servers = "127.0.0.1"; # Read servers (unless write_servers are unspecified)
+  servers = "127.0.0.1"; # Read servers (unless write_servers are unspecified)
   #servers = "master-slave:127.0.0.1,10.0.1.1";
   #write_servers = "127.0.0.1"; # Servers to write data
   #disabled_modules = ["ratelimit"]; # List of modules that should not use redis from this section
@@ -23,4 +23,4 @@
   .include(try=true,priority=5) "${DBDIR}/dynamic/redis.conf"
   .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/redis.conf"
   .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/redis.conf"
-}
\ Kein Zeilenumbruch am Dateiende.
+}
---------------------------------------------------
Changes for 1.2 on 2023/10/16 11:17:45 (/etc/rspamd/modules.d/redis.conf)
alexAubin commented 9 months ago

Fixed in https://github.com/YunoHost/yunohost/pull/1730 supposedly