Mailu / Mailu

Insular email distribution - mail server as Docker images

Home Page:https://mailu.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spam filter not working

macdabby opened this issue · comments

Environment & Version

  • docker compose version 2.25.0
  • Mailu Version: 2.0

Description

I just upgraded to 2.0 hoping to solve my spam issue. I am getting way to many spam emails through to my inbox. On inspection it looks like the bayes filter is not working. There is a message in the logs that there aren't enough learns. But i've been running this server for a couple years now on mailu, that sounds impossible. I checked the statistics and it seems that every few minutes they change. These two screen shots were taken 8 minutes apart. I suppose this could be an issue with how rspamd is connecting with redis but I don't know how to diagnose this.

Screenshot from 2024-05-12 09-17-06
Screenshot from 2024-05-12 09-09-52

Replication Steps

Observed behaviour

Emails are put to the spam folder for various reasons like bad DKIM info, but not for bayes. Bayes filtering is not working.

Expected behaviour

Bayes should catch these otherwise valid emails

Logs

In the logs, you can see the corresponding 28 and 54

[root@web4:/etc/server/containers/mailu] # docker compose logs --tail 1000 antispam | grep redis
antispam-1  | 2024-05-12 08:05:23 #173(rspamd_proxy) <ff1ef4>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_SPAM of classifier bayes: not enough learns 28; 200 required
antispam-1  | 2024-05-12 08:08:07 #173(rspamd_proxy) <95aed9>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_SPAM of classifier bayes: not enough learns 28; 200 required
antispam-1  | 2024-05-12 08:08:50 #173(rspamd_proxy) <006f65>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_HAM of classifier bayes: not enough learns 53; 200 required
antispam-1  | 2024-05-12 08:09:38 #173(rspamd_proxy) <e9347f>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_SPAM of classifier bayes: not enough learns 28; 200 required
antispam-1  | 2024-05-12 08:10:42 #173(rspamd_proxy) <ad07c8>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_SPAM of classifier bayes: not enough learns 28; 200 required
antispam-1  | 2024-05-12 08:11:20 #173(rspamd_proxy) <c0e60e>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_SPAM of classifier bayes: not enough learns 28; 200 required
antispam-1  | 2024-05-12 08:11:45 #173(rspamd_proxy) <624d36>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_HAM of classifier bayes: not enough learns 53; 200 required
antispam-1  | 2024-05-12 08:12:42 #173(rspamd_proxy) <99446c>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_SPAM of classifier bayes: not enough learns 28; 200 required
antispam-1  | 2024-05-12 08:12:45 #173(rspamd_proxy) <182d24>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_HAM of classifier bayes: not enough learns 54; 200 required
antispam-1  | 2024-05-12 08:15:40 #173(rspamd_proxy) <21d38a>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_SPAM of classifier bayes: not enough learns 28; 200 required
antispam-1  | 2024-05-12 08:16:53 #173(rspamd_proxy) <0310a9>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_SPAM of classifier bayes: not enough learns 28; 200 required
antispam-1  | 2024-05-12 08:17:57 #173(rspamd_proxy) <fc2dcd>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_HAM of classifier bayes: not enough learns 54; 200 required
antispam-1  | 2024-05-12 08:18:11 #173(rspamd_proxy) <cc10e6>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_SPAM of classifier bayes: not enough learns 28; 200 required
antispam-1  | 2024-05-12 08:18:31 #173(rspamd_proxy) <b0f897>; proxy; rspamd_redis_connected: skip obtaining bayes tokens for BAYES_HAM of classifier bayes: not enough learns 54; 200 required

Here it works. We cannot help you work out why it doesn't for you from the truncated logs you have provided.

Provide the full logs if you want help.