I wrote a script for this purpose in Python 3, for use with rspamd. I only recently got it working, so it may be buggy, and it also may need to be modified for your spam system (and your python location), but I think it should at least provide a good start for you. Note that using "#!/usr/bin/env python3" at the top does not work. Perhaps someone can translate this into Perl and include it in Cyrus contrib. To configure Cyrus to use it, you need the following in imapd.conf: event_notifier: external notify_external: /path/to/autolearn # Just make sure \Junk isn't included here event_exclude_specialuse: \Drafts \Sent On Tue, 29 May 2018 16:35:53 -0700 (PDT) David Lang wrote: > several years ago I used a system that subscribed to the various > folders and watched for messages to appear. Unfortunantly, that > software was abandoned and I haven't gone looking for a replacement > in the last several years. > > but it did work very well, at very little load on the system > (fastmail was a little concerned at seeing many connections from me, > but once they learned that they were mostly idle watching for new > message notifications, they relaxed a bit) > > David Lang > > On Tue, 29 May > 2018, Pedro silva wrote: > > > Date: Tue, 29 May 2018 10:16:37 +0100 > > From: Pedro silva <psilva@xxxxxxxxxxxx> > > To: Sven Schwedas <sven.schwedas@xxxxxx> > > Cc: info-cyrus@xxxxxxxxxxxxxxxxxxxx, > > Info-cyrus > > <info-cyrus-bounces+psilva=onesource.pt@xxxxxxxxxxxxxxxxxxxx> > > Subject: Re: Cyrus (Sieve) and external programs > > > > Hello Sven, > > > > Thanks for your answer. > > > > Actually I would like to set up a system were a user would move his > > messages to a spam folder, and by doing so, the message would be > > sent to the spam learning system. > > > > Ive seen something like this in other distributions (eg.: > > https://wiki.dovecot.org/HowTo/AntispamWithSieve) I was just > > wondering if the same is possible with cyrus or cyrus sieve. > > > > Best regards, > > > > Pedro Silva > > > > On 28-05-2018 15:59, Sven Schwedas wrote: > > > >> On 2018-05-28 16:41, Pedro silva wrote: > >> > >>> Hello, > >>> > >>> I'm trying to set up a spam learning system, and I would like to > >>> pipe email places in (for example) the SPAM folder to an external > >>> program. > >>> > >>> I have cyrus 2.4.17 > >>> > >>> Does any one know how or if this is possible in cyrus (or > >>> sieve)? > >> > >> If you want to (read only) process data already received to train > >> your spam filter, just use the individual mail files in cyrus' > >> spool. > >> > >> If you want to act on mails being received and possibly > >> delete/redirect them, you normally want hook into your MTA, not > >> cyrus/sieve. > >> > >> -- > >> Mit freundlichen Grüßen, / Best Regards, > >> Sven Schwedas, Systemadministrator > >> ✉ sven.schwedas@xxxxxx | ☎ +43 680 301 7167 > >> TAO Digital | Teil der TAO Beratungs- & Management GmbH > >> Lendplatz 45 | FN 213999f/Klagenfurt, FB-Gericht Villach > >> A8020 Graz | https://www.tao-digital.at > >> > >> ---- > >> Cyrus Home Page: http://www.cyrusimap.org/ > >> List Archives/Info: > >> http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: > >> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Attachment:
autolearn
Description: Binary data
---- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus