Score:0

Individual and global spam filter using Dovecot/rspamd

ng flag

I'm runnig email server using Postfix, Dovecot, RoundCube and rspamd on Debian 11. Like everyone I have to deal with spam, but I got high demands for that.

Currently my rspamd is checking every incomming email and calculating spam score, if the score is higher than value (6 in my case) then it adds header X-Spam: Yes. After that it's Dovecot's Sieve filter turn. It checks header and if there is X-Spam: Yes then it moves email from INBOX to Junk folder.

Goal is to accept every email (no reject) and let user to choose what filter what he wants to use, global or individual.

Global filter should be used as default filter. I would like to with this filter move every email from blacklist domains go to Junk folder. Also I want to this filter be auto-learn, so if more users mark some similir emails as Junk, new rule will be added to this filter.

Individual filter should be blank at start so all emails go to INBOX. When user mark email as Junk, the sender's address will be add to blacklist so any furter email from same sender will automatically goes to Junk folder.

Is there any way how to do it? I can set up just one filter but I don't know how to create 2 filters, let users choose one of them and make Dovecot use it. I will be happy for any ideas.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.