-
-
Notifications
You must be signed in to change notification settings - Fork 266
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]: Detect fake "addresses" in From headers #982
Comments
How about:
Commas and multiple quotes also create confusion. |
I haven't encountered such variations. I suspect the efficacy of such approaches decline rapidly with everything less common than parentheses. Though Stalwart should pick out those addresses as well and penalize any forgeries or mismatches.
Stalwart is not a MUA that would be doing any displaying that matters in this case. |
Well, that's the thing. Stalwart does pick them up properly and save the email, as intended. I've tried it with Snappy, Roundcube and Twake Mail. There are no problems there. They were able to parse those emails properly as well. SnappyMail for example, does display a tick if DKIM/SPF etc are all valid. Since it's not clear, maybe the wording for your ask should be more like: I don't think the server should dictate these rules for everyone though. The way it is now, we have no say over them and it's impossible to use external rulesets like KAM rules and so on. I believe that will be possible when the new Spam filtering will be written #947 Hopefully, when that happens, we can create custom rules like below and achieve what you ask for by then.
|
I think it is fairly obvious given I have mentioned scoring and symbols.
If and how people assign (additional) score to those depends on those people. That's really not a reason not to improve built-in detections and rulesets.
Stalwart has currently followed Rspamd's symbol naming and logic. It would be beneficial to stay on that track as SpamAssasin falls significantly short compared to rspamd, from rule syntax to flexibility in general. An amalgam of both would be the least preferred option.
They don't. These can not handle UTF-8 and there are no checks to avoid scoring allowed (albeit weird) usage, containing the same address, an address from the same (or an authenticated domain) should not be scored. |
It's not.
True. As long as rules themselves are editable.
Well, that doesn't make much of a difference. We are not using rspamd as-is anyways. Falling short... That doesn't mean RSpamD is better by the way. I'm especially curious to see a review of Rspamd vs SA v4 from a heavy, non-hobbyist user. Anyways even Rspamd support using some drop-in SpamAssassin rules, so Stalwart can support that as well. Ideally, it should be able to either
So, what you write here can be a rule. Do you have a rule suggestion for RSpamd that would work? |
Thanks @TaaviE - this will be included in #947 @nomadturk - regarding the SA vs Rspamd comparison, although I haven't compared the effectiveness of both solutions, I did look at both codebases and Rspamd is much faster and better designed than SA. SpamAssassin is written in Perl and relies heavily on regular expressions which are much slower than hand crafting a parser (what Rspamd does in their C code and LUA bindings). In addition to that, some of the regular expressions in SpamAssassin are poorly designed and result in heavy memory usage as well as performance degradation. I recommend that on your custom filtering rules you avoid using regular expressions as much as possible. If what you need to filter can't be done with a simple 'contains', then try with Sieve and if that is not enough then MTA hooks. |
@mdecimus :) Even the poorly designed ones does wonders to stop spam, if there are no better alternatives. As long as you support adding custom rules and auto-updateable RSpamd/SA rules from 3rd parties, we should be good. Even for RSpamd, there are lots of community, documentation, provider support and plugins that are in the wild. Otherwise, maybe running an external cluster of RSpamd and offloading that workload from Stalwart to that one would be better. |
I have an unpolished piece of Lua. Quite a lot of the complexity stems from having to check the alignment against any newly extracted domains. Which is why having it as a built-in would be really beneficial. |
Migrated to #947 |
Which feature or improvement would you like to request?
It would be very nice if Stalwart had build-in rules to detect fake "addresses" in From headers' comment section. Such as
[email protected]
in the header content"Foo ([email protected])" <[email protected]>
.Any such fake address (because it's not actually functional) should ideally get a symbol indicating its existence (with a small score). After that, it should be checked if the used domain's DMARC/DKIM/SPF align, if it doesn't give it a new symbol with a higher score (but probably not as high as as full DMARC failure for example, because there might be false positives).
Is your feature request related to a problem?
Spammers are starting to increasingly (ab)use the comment part in From headers, by including a fake "address" with parenthesis around. This is likely because a lot of (IMHO very poorly designed) MUAs hide the actual sender should a comment exist in the From. Making the address in parenthesis look like the actual one.
Stalwart should be able to penalize both the existence of such fake addresses in From header(s) but also detect when such addresses do not match the sender and/or do not align with SPF/DMARC/DKIM.
Additional context
In addition to
"Foo ([email protected])" <[email protected]>
I've also seen"Foo [email protected]" <[email protected]>
and"Foo '[email protected]'" <[email protected]>
.Code of Conduct
The text was updated successfully, but these errors were encountered: