kopano-spamd not learning tagged spam as ham
-
@hodor27 said in kopano-spamd not learning tagged spam as ham:
Is there a reason, why this is not implemented?
I do not really see anything in your “What I’m trying to achieve” that is not actually implemented.
@hodor27 said in kopano-spamd not learning tagged spam as ham:
I did an experimental patch on a test-server to achieve this(not thouroughly tested yet). @fbartels interested?
Sure, patches are always welcome. The easiest for an external is to open a pr on https://github.com/Kopano-dev/kopano-core.
-
@fbartels said in kopano-spamd not learning tagged spam as ham:
@hodor27 said in kopano-spamd not learning tagged spam as ham:
Is there a reason, why this is not implemented?
I do not really see anything in your “What I’m trying to achieve” that is not actually implemented.
kopano-spamd will not “react” to mail that has already been marked as spam (by spamassassin) before it even reached the inbox. the if-else cases in the code handle only non-marked ham, or unlearning spam, that before was ham. sounds confusing i know :)
@hodor27 said in kopano-spamd not learning tagged spam as ham:
I did an experimental patch on a test-server to achieve this(not thouroughly tested yet). @fbartels interested?
Sure, patches are always welcome. The easiest for an external is to open a pr on https://github.com/Kopano-dev/kopano-core.
I’ll submit a patch when i have time, that should clear things up.
-
@hodor27 said in kopano-spamd not learning tagged spam as ham:
kopano-spamd will not “react” to mail that has already been marked as spam (by spamassassin) before it even reached the inbox.
yes, it indeed does not do this. but this is usually handled by kopano-dagent (its has a configurable spam header and will deliver mails marked as spam into the junk folder and not into the inbox).
-
I think you both are still not talking about the same thing. I´m facing this issue too and I´d love to see that fixed.
Following happens:
- Email is received via MTA and SA tags it as spam
- Dagent correctly delivers that email to the Junk folder
- User realizes, that Email is in fact NOT spam and moves it to the Inbox manually
- Now if “/etc/kopano/spamd.cfg” contains “learn_ham = yes”, then spamd should initiated a “sa-learn --ham” for this email, but this doesn´t happen.
Just a small annoiance, but would be great to get this fixed.
@hodor27: I hope I got you right and this is the same issue that you´re facing
-
@weini said in kopano-spamd not learning tagged spam as ham:
I think you both are still not talking about the same thing. I´m facing this issue too and I´d love to see that fixed.
Following happens:
- Email is received via MTA and SA tags it as spam
- Dagent correctly delivers that email to the Junk folder
- User realizes, that Email is in fact NOT spam and moves it to the Inbox manually
- Now if “/etc/kopano/spamd.cfg” contains “learn_ham = yes”, then spamd should initiated a “sa-learn --ham” for this email, but this doesn´t happen.
Just a small annoiance, but would be great to get this fixed.
@hodor27: I hope I got you right and this is the same issue that you´re facing
yes in the sense that SA-tagged spam is ignored by kopano-spamd, if user moves it out of the junk-folder.
As i understand the status of kopano-spamd, it will only copy messages to spam/ham folders and leaves thesa-learn
part to other tools.
I’ll submit a patch for kopano-spamd when i have time™. -
@hodor27: absolutely correct. I was a bit misleading in that aspect: It is just about moving the mail to the ham folder.
-
@hodor27
Whats the Status here ?Br Stefan
-
@weini
You yound a Solution for that behaviour ?Br Stefan
-
i had no time yet to test.
The way I see it, incoming mail marked as spam by spamassassin AND not already known in kopano-spamd’s self.spamdb cannot be learned as HAM via the update function.
the relevant if/else in kopano_spamd/init.py:elif (item.folder == item.store.inbox and \ self.learnham and \ self.was_spam(searchkey)):
the self.was_spam(searchkey) can only return true if the msg in question was learned as spam before, which can only happen if it was not tagged as spam by spamassassin.
-
Hallo,
I’m new to kopano-spamd and do have the above problem. Does anybody have a hint helping me?
-
Hi alltogether,
I am new to this community. Because I want to use kopano for a customer of mine, some fixes are needed to be made.
This problem was one of them :)I created a patch which fixes this issue with kopano-spamd not beeing able to learn spam-flagged emails as ham (and then as spam again).
I already sent the patch to contributing@kopano.io in hope they will merge it.But anyhow - here is the patch in case anyone wants to test it now for themselfes:
https://github.com/ejjoman/kopano-core/commit/073d9a230f7a79612850c26da9e95db2bbd2a680With this patch, kopano-spamd is able to keep track of incoming emails which are flagged as spam.
It will then mark the message in the internal db as “was spam” and at this point the message behaves as you would expect it from the user pov.
You then can move the message to the inbox, which will trigger the ham-learning. You can also move the message to the spam folder again to trigger spam-learning in case the user moved a wrong message to the inbox.I hope you like it.
–
Michael