Hi Jan,
Some email clients, like Evolution, use IMAP keywords to flag spam instead of moving mail to dedicated spam mailbox. This is very useful, as false positives can be easily "moved" to original mailbox simply by removing $Junk keyword.
Interesting idea, but the keyword my evolution uses seems to be "Junk", not "$Junk".
I couldn't find a way how to integrate antispam software, like dspam, with dovecot, so that antispam automatically learns ham/spam.
I have found Johannes's dovecot-antispam plugin. Unfortunatelly, it doesn't have IMAP keywords support, autolearn is based on folders.
Is there any solution for this use case?
There isn't really, without some work. I have just committed this patch: http://git.sipsolutions.net/?p=dovecot-antispam.git;a=commitdiff;h=a5941271d... which will doesn't work yet but illustrates the concept (by debugging stuff to the syslog rather than calling the backend.) The new setting "antispam_spam_keywords" isn't documented yet but needs to be set for the keyword code to be invoked at all.
One problem with this is that evolution doesn't sync the keywords to the server right away, only when you change folders. Also, it's not entirely obvious what the code should do when the backend fails since there doesn't seem to be a way to roll back the keyword change easily. Any comments on the code would be appreciated, and you can probably easily make it invoke the backend with what's there to actually test it.
johannes