Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement]: Spam filter improvements #947

Closed
1 task done
mdecimus opened this issue Nov 22, 2024 · 9 comments
Closed
1 task done

[enhancement]: Spam filter improvements #947

mdecimus opened this issue Nov 22, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@mdecimus
Copy link
Member

mdecimus commented Nov 22, 2024

Which feature or improvement would you like to request?

Improve the performance and functionality of the Spam filter, including but not limited to:

Is your feature request related to a problem?

I'm having a problem with...

Code of Conduct

  • I agree to follow this project's Code of Conduct
@yannikbloscheck
Copy link

It also would be nice to be able to have a block list of phrases, that if they occur anywhere (e-mail address, headers, subject, body), will get a spam score tag name like BLOCKLIST_PHRASE assigned to them. Sometimes spammers are very good with changing up e-mail and IP addresses, but there are always certain phrases in the e-mail every time.

@mdecimus
Copy link
Member Author

@yannikbloscheck this could be done with a SpamAssassin rule (see #535)

@yannikbloscheck
Copy link

@yannikbloscheck this could be done with a SpamAssassin rule (see #535)

I probably also could write a custom sieve script, but with that it just is always annoying to update it for new phrases. So an easily editable allow/blocklist like there seems to be planned for domains/e-mail addresses but just also for phrases (either simple strings or some regex) in the actual mail content would be much better. I think of something like the lists in the webadmin under Antispam/Domains. Maybe that will work similarly with what you plan with the SpamAssassin rules, but from the issue you linked it seems more like a one-time import of those rules to me, but maybe I'm misunderstanding that.

@mdecimus
Copy link
Member Author

#535 will allow you to both import SpamAssassing rules and also manage them. You could implement a simple rule to match words against the subject and/or body using regular expressions or a simple contains.

@tonyhardcode
Copy link

It would be great to have per inbox spam filtering setting so we can disable all spam filtering for a single address.

@nomadturk
Copy link

For
Spam Filtering
I would like to be able to completely Enable/Disable it. (I think we should be able to do so for most modules as even if you don't use them and set their settings to "none" they waste cpu and ram)

I would like to be able to add my own SpamAssassin rules, Kam Rules etc.
And I would like to train my database using existing spam/ham corpus, via cli or a bulk upload, import functionality.
Also on top of server-wide SpamAssassin rules, having the ability to enable/disable per-mailbox bayesian filtering would increase the protection for users as it will learn from their behaviour in time. (Like Bogofilter)

For
Support adding the "Delivered-To" header
Ideally, having everyone from the From, To and CC could be added as an header. Currently it doesn't work if there are multiple values.

Add/customize DNSBLs
I think this should allow us to add, enable and disable other filters.
I would like to disable some filters and add other filters that do not come by default.

Block IP by ASN
Even if I don't have a need for this, if we can write the ASN information as a variable, that might be nice to have.
Also with this feature, there is always the possibility of sending too many lookups and getting your IP banned for a while due to rate limiting.

Add allow and blocklists for domains and recipients
A per-mailbox and per-domain exclusion/block list would be great.

Block IP addresses listed on iblocklist and similar
For this one, it would be ideal if we can use external lists and stalwart can update itself periodically

@2q2code
Copy link

2q2code commented Dec 6, 2024

I am here for the bayes training by moving between folders. I miss that from my postfix server.

@ngocnha
Copy link

ngocnha commented Dec 20, 2024

Marking Emails as Junk Using IMAP4 Flags to Ensure Cross-Client Compatibility

I want to mark an email as junk using IMAP4 flags instead of automatically moving it to the default Junk folder on the server.
This way, email clients can either move it to their own Junk folder or keep it in the inbox based on the user's preference,
avoiding issues caused by differing default Junk folder names across various email clients.

@mdecimus
Copy link
Member Author

mdecimus commented Jan 2, 2025

All the above-mentioned features have been implemented with the exception of SpamAssassin import. #535 has been reopened and will be included in v0.11.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants