Luca Bertoncello
2009-Apr-30 08:32 UTC
[Dovecot] How to call a script when an E-Mail will moved in a folder?
Hi, list! I use Dovecot 1.1.14 at work. It is configured to manage IMAP and IMAPs. Exim is the MTA of the Network. Of course, I installed SpamAssassin and ClamAV to check all incoming E-Mails. An, of course, some E-Mail marked as Spam are Ham and some E-Mail marked as Ham are Spam... To teach SpamAssassin I create for every user two folder: "DochSpam" (for Spam E-Mails not marked) and "FalscheSpam" (for Ham E-Mails marked as Spam). Every hour a cronjob search for E-Mails in these folders and call sa-learn to teach SpamAssassin. All run perfectly, but I'd like to modify this method and call automatically the script when the user move an E-Mail to DochSpam or FalscheSpam. I searched in Google, but I cannot found any useful link... How can I trigger an action (script calling) based on event (E-Mail will be moved to a folder) in Dovecot? Thanks for your help! Luca Bertoncello (lucabert at lucabert.de)
Steffen Kaiser
2009-Apr-30 09:17 UTC
[Dovecot] How to call a script when an E-Mail will moved in a folder?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 30 Apr 2009, Luca Bertoncello wrote:> How can I trigger an action (script calling) based on event (E-Mail will be > moved to a folder) in Dovecot?Look at the antispam or pipe plugins of Dovecot. Or write a demon watching with something like inotify and act accordingly. Bye, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSflsk3WSIuGy1ktrAQKMbAgAueg5RPbYQTlTcilNCqYilv3nVSraJxiA Uz2XmkO/IlRtYlS6TErhTXikMQbAmWHMKd29M+VZPuFFCAyC1LL3Y8QnWxJ6k77b hl6z0e/NDSnsSbyPIs4VjMgEedg0U2Bl2Yb0+OHmJF789Bzp+IqDh+NptjqIagkJ uJXkenJ+DvYZoSLwmG+7gKSnHPpkOBQU9ng4gKATL69OoRfBdhp+89SmpQ8N23R8 s/XwEi7CG5c/rUsa2JbMeRADqrdfI/Mqn800aeNID05d7svDKMbG1x37kugP3mKg +G0MpKaXdNfpz3VhDA9M9dr7s3n+fWWC7Bq7oJosvTnuAIIeYhRxtQ==eZnE -----END PGP SIGNATURE-----
Luca Bertoncello
2009-Apr-30 10:58 UTC
[Dovecot] How to call a script when an E-Mail will moved in a folder?
Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> schrieb:> Look at the antispam or pipe plugins of Dovecot.Hello! Thanks for your answer! Could you say me, where I can find this "pipe plugin"? Ich searched in Google, and I found many list messages about it, but no links to download it... Thanks Luca Bertoncello (lucabert at lucabert.de)
Andrew Roberts
2009-Apr-30 17:09 UTC
[Dovecot] How to call a script when an E-Mail will moved in a folder?
On Thu, 30 Apr 2009, Luca Bertoncello wrote:> How can I trigger an action (script calling) based on event (E-Mail will be > moved to a folder) in Dovecot?If you run a recent linux kernel (>=2.6.13) configured with inotify support, you can set up incron to run your existing scripts, but triggered by a filesystem event insted of a time period. It's worked well for my purposes for the last two plus years.