Jan Oravec
2008-Mar-20 11:23 UTC
[Dovecot] Using IMAP keywords instead of mailboxes for spam with dovecot-antispam
Hi, 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. 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? Thanks, Jan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080320/0cebf6b5/attachment-0002.bin>
Charles Marcus
2008-Mar-20 12:20 UTC
[Dovecot] Using IMAP keywords instead of mailboxes for spam with dovecot-antispam
On 3/20/2008 7:23 AM, Jan Oravec wrote:> 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.Thunderbird does this too...> 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?Support for this in the plug-in would be 'very cool'... -- Best regards, Charles
Johannes Berg
2008-Mar-20 12:52 UTC
[Dovecot] Using IMAP keywords instead of mailboxes for spam with dovecot-antispam
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=a5941271d9ba14dd198df01a13400af557ecf6ed 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 828 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080320/d7df2b02/attachment-0002.bin>
Jef Driesen
2008-Mar-20 13:06 UTC
[Dovecot] Using IMAP keywords instead of mailboxes for spam with dovecot-antispam
Jan Oravec wrote:> 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. > > I couldn't find a way how to integrate antispam software, like dspam, > with dovecot, so that antispam automatically learns ham/spam.I'm using a sieve script to add a "Junk" keyword based on spamassassin/amavis headers. Very easy and flexible. The antispam software only needs to add a special header to make it work.