Hi, I have written a plugin so that each time a message is added to a specific box, a program is run and the message is piped into it. Note that the message is also really added to the box. I've been using it for nearly 3 month, for spam/ham learning, and have not had any problem with it. I guess it could also be used to implement an out box (I remember seeing someone asking for such a feature on this list). Currently, I use it with a config like this: (...) namespace private { separator = . location = maildir:/var/mail/%u inbox = yes hidden = no } namespace public { separator = . prefix = learn. location = maildir:/var/learn/%u inbox = no hidden = no } (...) plugin { (...) pipe = /var/learn/%u/.spam:spamc -d some.host -L spam pipe2 = /var/learn/%u/.ham:spamc -d some.host -L ham (...) } Would people be interested by such a feature? If enough people show some interest, I can try to convince my boss to let me release this plugin GPL-licensed. Cheers, Nicolas Boullis
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nicolas Boullis schrieb:> Hi, > > I have written a plugin so that each time a message is added to a > specific box, a program is run and the message is piped into it. Note > that the message is also really added to the box. > > I've been using it for nearly 3 month, for spam/ham learning, and have > not had any problem with it. I guess it could also be used to implement > an out box (I remember seeing someone asking for such a feature on this > list). Currently, I use it with a config like this: > > (...) > namespace private { > separator = . > location = maildir:/var/mail/%u > inbox = yes > hidden = no > } > > namespace public { > separator = . > prefix = learn. > location = maildir:/var/learn/%u > inbox = no > hidden = no > } > (...) > plugin { > (...) > pipe = /var/learn/%u/.spam:spamc -d some.host -L spam > pipe2 = /var/learn/%u/.ham:spamc -d some.host -L ham > (...) > } > > > Would people be interested by such a feature? If enough people show some > interest, I can try to convince my boss to let me release this plugin > GPL-licensed. > > > Cheers, > > Nicolas Boullis >Hi Nicola, that sounds interesting, even spam learning can be done in other ways too ( filters etc ) ,but in general its a nice to have feature - -- Mit freundlichen Gruessen Best Regards Robert Schetterer https://www.schetterer.org Munich/Bavaria/Germany -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGVTYBfGH2AvR16oERAlxrAJwI8kKPvUHb2/dLqO0VihYAfPJDLgCfdMrN m+SnQec2K2yySN6A8HrqSOQ=qDeV -----END PGP SIGNATURE-----
On Wed, 2007-05-23 at 23:02 +0200, Nicolas Boullis wrote:> I have written a plugin so that each time a message is added to a > specific box, a program is run and the message is piped into it. Note > that the message is also really added to the box.I guess I could also say that I've been going to implement something similar to Dovecot some day as well. Although I was thinking about a bit more generic event plugin which supported more than just copying. But a pipe plugin would be a great start towards that. Most people would use it only for spam/ham learning anyway.> pipe = /var/learn/%u/.spam:spamc -d some.host -L spam > pipe2 = /var/learn/%u/.ham:spamc -d some.host -L hamI think using mailbox names would be better than paths, but I know that v1.0's code base doesn't really make this possible. Perhaps with v1.1 then switch to using mailbox names. -------------- 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/20070524/46c7a3a9/attachment-0002.bin>
23.05.2007 23:02 Nicolas Boullis:> I have written a plugin so that each time a message is added to a > specific box, a program is run and the message is piped into it. > Note that the message is also really added to the box.I'm totally in. There is this dspam plugin by Johannes Berg mentioned on the dovecot plugin page which has the nice feature of managing spam-learning with just one folder. But I think your more generic approach by using pipes and making the command execution configurable is more nifty (and not limited to spam-learning). But for spam- learning Johannes' approach is a more intuitive way: As prerequisite mail recognized as spam by the filter is put into a spam folder by some mechanism (maildrop, sieve). Then by removing a mail from the spam folder, a mail is relearned as ham. By adding a mail to the spam folder, the mail is learned as spam. From my experience users easily understand putting spam into a spamfolder (with imap, with pop3 forwarding spam to a spam-box didn't work well) but nearly anybody actually does ham-learning if another folder is involved where mail has to be copied to. The spam learning would be fine with your plugin but is there a way to trigger ham learning when a mail is added to any other mail folder than spam? Marc