Nethserver 7.6.1810(final)
emclient over imap and carddav (SOGo)
I also tried to get the learn funktion working with no luck. I moved junk mail from inbox to junk folder and got this bounce message:
The mail system
<“guus@ijzereef.nl+learn_spam”@spamtrain.nh>: Command died with status 1:
“/usr/bin/rspamc”. Command output: Results for file: stdin (2.017 seconds)
HTTP error: 1, error getting reply from redis server
/var/run/redis-rspamd/rspamd: No such file or directory
So I searched, found this topic and checked my log files:
imap log:
Jan 9 19:51:34 yz1web dovecot: imap(guus@ijzereef.nl): sieve: pipe action: piped message to program `spam-training’
Jan 9 19:51:34 yz1web dovecot: imap(guus@ijzereef.nl): sieve: left message in mailbox ‘Junk’
maillog:
Jan 9 19:54:41 yz1web rspamd[30096]: <>; ; rspamd_redis_pool_new_connection: cannot connect to redis: No such file or directory
Jan 9 19:54:41 yz1web rspamd[30096]: <>; ; rspamd_lua_redis_prepare_connection: cannot connect to redis: unknown error
Jan 9 19:54:41 yz1web rspamd[30096]: <>; lua; lua_redis.lua:722: cannot execute redis request
command gives following errors:
ll /var/run/redis-rspamd/rspamd
ls: cannot access /var/run/redis-rspamd/rspamd: No such file or directory
should I reinstall redis-rspamd?
Si i tried to install package redis through yum
and now the command gives the expected response:
[root@yz1web ~]# ll /var/run/redis-rspamd/rspamd
srwxrwx— 1 redis mail 0 Jan 11 19:08 /var/run/redis-rspamd/rspamd
I gues somehow i removed it. Also the epel repository wasn’t active anymore, I restored that yesterday.
Now the outcom is:
[root@yz1web ~]# systemctl status redis-rspamd
● redis-rspamd.service - Redis persistent key-value database Rspamd
Loaded: loaded (/usr/lib/systemd/system/redis-rspamd.service; static; vendor preset: disabled)
Active: active (running) since Fri 2019-01-11 19:08:23 CET; 2min 55s ago
Main PID: 11348 (redis-server)
CGroup: /system.slice/redis-rspamd.service
└─11348 /usr/bin/redis-server 127.0.0.1:0
Jan 11 19:08:23 yz1web.ijzereef.nl systemd[1]: Started Redis persistent key-value databa…d.
Hint: Some lines were ellipsized, use -l to show in full.
I say thanks, start testing the rspamd learning functionality
Only thing I can think of is that because it wasn’t working i decided to remove rspamd an reinstall it again. Probably this also removed redis and because the epel repository wasn’t active the new installation of rspamd couldn’t install redis.
Question then offcourse is why and how the epel repository was removed. I can’t remember anything causing this but it must have been some action from my site.
# systemctl status redis-rspamd
● redis-rspamd.service - Redis persistent key-value database Rspamd
Loaded: loaded (/usr/lib/systemd/system/redis-rspamd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2018-09-06 18:11:37 CEST; 4 months 16 days ago
Main PID: 22728 (redis-server)
CGroup: /system.slice/redis-rspamd.service
└─22728 /usr/bin/redis-server 127.0.0.1:0
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
just to add something more, redis is important with rspamd, sure that a lot more features are concerned if redis-rspamd is down
the logfile /var/log/redis/redis.log doesn’t exist.
In /var/log/maillog I got the message of a time out:
Jan 22 19:07:41 yz1web rspamd[7574]: <cb9532>; csession; rspamd_task_process: learn error: error getting reply from redis server /var/run/redis-rspamd/rspamd: timeout … HTTP error: 110, error getting reply from redis server /var/run/redis-rspamd/rspamd: timeout )