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