-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
E-Mails fetched by fetchmail trigger enough rspamd rules to be marked as spam #1231
Comments
Interesting. I think I have the same issue. |
I see two issues here:
|
Holy crap. Over 58% of my emails were rejected! |
Oh, I did disable the antispam for the user, but it still rejected emails. Disabling antispam for the user was the first thing I did, so it's the initial scan that did it, as you said. |
I did not actually find a solution for this. In the end I changed most of my accounts to send mails directly to mailu. Anything received via fetchmail is basically automatically spam. I'd say fetchmail is unsuable the way it is configured right now. |
Going to my.domain/admin/antispam and raising the values by two orders of magnitude worked for me. At least, for disabling it. But the lack of control over the rules seems to be a problem. Although, I think it uses an ML algorithm that can be trained, so it might not be straightforward to change that. Someone would have to give more clarity. |
I guess that explains why mailcow doesn't pipe their fetched mails through the MTA but directly loads them via IMAP. However I actually want my mails to be scanned, even when I fetch them from other mailboxes :-/ Forged Recipient can probably be dealt with by registering the mail adresses that you fetch from, so rspamd has a chance to know which adress is fine and which is not. The other ones though ... could be hard. Although I guess we are not the only ones using rspamd in such a constellation. |
Just an idea: rspamd works with different config sections that contain certain matchers and apply certain rules, right? So it should work with the following "changes":
Unfortunately fetchmail doesn't support adding custom headers to fetched mails, otherwise it would be a bit easier matching fetched mails. |
Hi There, The To help with that, we are currently trying to find out which issues are actively keeping users from using In order for us to better assess this, it would be helpful if you could put a reaction on this post (use the 😃 icon to the top-right).
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@Stale keep |
I don't understand yet how the fetchmail process injects mails into dovecot and how rspamd filter them but apparently dovecot provides a way for external service to do so (the |
@parisni When you do this all on a local machine, this is possible. But in mailu those a separate containers. Therefore the container that runs fetchmail can't call anything related to dovecot - at least not via filesystem. |
@aksdb good catch. So how does fetchmail deal ? it is able to write mails directly in the dovecot folders ? |
It should be possible to add a multimap rule to rspamd to automatically accept emails from fetchmail. Perhaps the IP address could be used to accept the email? This would involve assigning a static ip to the fetchmail service:
In the overrides folder for rspamd (see the previous link), you create the file whitelist_ip.inc with the IP address of fetchmail. Now all emails from fetchmail are automatically accepted by rspamd. All possible types are listed here https://rspamd.com/doc/modules/multimap.html#map-types. I think matching on IP is the best. I suspect other types can be forged. |
rspamd has been updated that fetchmail connects via the local network. This disables multiple tests in rspamd. This should prevent messages from being marked as spam. For a permanent fix it should be configurable via the admin interface under user settings whether
So we would need to change:
|
I currently fetch some emails from GMail which get filtered through rspamd and due to the nature of how the headers look almost all of them get marked as spam or straight up rejected. Here is a list of applied rules directly related to fetchmail for some common message:
which adds up to 12.5. With the default mark as spam being 15 anything else will set it off.
The text was updated successfully, but these errors were encountered: