-
Notifications
You must be signed in to change notification settings - Fork 107
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
Should rspamd integrate with third-party anti-spam systems? #47
Comments
I haven't had a need for additional/external spam filtering. My previous setup was postfix with some strict settings and a DNSBL, but without additional spam filtering. So switching to mox was a big improvement for me. Now typically a handful spam messages get through per week, which I'm happy to mark as junk (training the filters). I did import all my spam/ham messages from my previous setup, so I did start with helpful history (though newly delivered messages are more helpful because mox can use their dmarc/dkim/spf-based signals when classifying, those cannot typically be imported). I had a quick look at the rspamd website again (I never used it). It certainly supports more mechanisms than mox, so an integration could be useful. I think an integration would best be done through support for milters. Other filters would benefit as well. I suspect mox will need milter support sooner or later. But it could be an impactful change to the smtpserver: I think it involves maintaining connections to milters, executing the protocol, checking for timeouts, handling their instructions, handling errors, etc. Though it's not clear to me exactly how milters work: I did a quick search and couldn't immediately find an clear/authoritative description of the protocol. Mechanisms mox implements to prevent spam from arriving in your mailbox, while allowing legitimate messages in:
If mox accepts a message, it will be delivered as non-spam message. If a message is classified as spam, it is rejected. So senders don't need to get email-sender-anxiety when sending to mox. As a mox user you can see rejected messages in the special Rejects mailbox, so you don't have to get email-receiver-anxiety. By moving a rejected message out of the rejects mailbox its will give off positive non-spam signals during future deliveries by that sender, so future messages will be accepted. I can think of some additional checks people may want to do on their messages that mox doesn't support (and I don't think I need personally):
A few of the above should be easy to implement (URL blocklists, custom matching rules, perhaps country/asn/geoip-based tools as well). Checks that are generally applicable/helpful and don't require integration with additional tools should probably be build into mox directly. One of the goals of mox is to make it very easy and low-maintenance to run a mail server. Integrating with additional tools makes setup and maintenance more complicated, so we should only make users do that if really needed. So far I haven't had any reports about misclassifications, either too many spams let in, or too many legitimate messages rejected. But I would be very interested in hearing about those. In my setup, spam is most often blocked by the "reverse DNS" check (probably spammers using hacked machines to send email) and IP-based reputation check (spammers on a subnet that they keep using and from which I've marked messages as junk), followed by the bayesian content-based filter, and finally a few by the DNS blocklist. I think especially the bayesian content-based filter in mox could use some improvements, making it conclusive more often. Anyway, I'm curious if there are checks you would like to use that mox doesn't support now. And finally to answer the question: I suspect there will be support sooner or later (assuming milter-based integration), and a PR would certainly be welcome. If you're interested in working on this, I'm available to discuss ideas/approaches/internals/code. (: |
My issue is that I have an old gmail address forwarding to my mox server. The gmail account sees a lot of spam and since I don't want Google filtering it (then it wouldn't make it to my server at all), I do it myself. I've given mox all my old spam to use for classification but I've still got stuff making it through and I prefer my spam filters to be essentially perfect because that's what I've become accustomed to elsewhere, and it makes email notifications valuable. I really do appreciate the simplicity of using mox though. It being a single Go binary that even comes with most of the necessary config and documentation to get started built-in is pretty awesome and it'd be great if it could stay that way. Regarding the milter protocol, there's a Go library for it that includes documentation of the protocol here (godoc). I could try to jam it into |
I think adding milter support indeed won't be the easiest change to make. The library you referenced looks useful. It also includes txt files with a basic explanation of the milter protocol (I suspect this is all documentation available). |
I'm currently running Postfix etc. with rspamd.
Is the anti-spam capability within mox already on par with third-party systems like rspamd or would mox benefit from integration? Is that something that's likely to happen or something that would be accepted in a PR?
The text was updated successfully, but these errors were encountered: