Marc Perkel
2005-Aug-28 15:19 UTC
[Dovecot] Feature Request - wild idea - folders for executing programs
Timo, I have a wild idea for a feature that is somewhat unusual, would be very powerful, and easy to implement. What I want is ... Special folders that when someone drags a message into them - it pipes the message into a program. The reason I want this is - for example - reporting of spam. Suppose you want everyone to have a spam-missed folder so that if a spam gets through then the user drags it into the spam missed folder. But instead of storing it there it executes a program and pipes the message into it. In this case a learner program for the spam filter. The folder would be "write only" and attempting to read the folder would generally look like it was empty. Setup would look like this: executable-folder spam-missed { command = /usr/bin/sa-learn spam user = spamd group = spamd create_folder = yes accounts = * } The "create_folder" command says to add the folder to the users lists whether or not it is physically there. The folder appears even if there is no real folder. If it is "no" then it only exists if there is a real folder. The "user" and "group" is of course the UID and GID to run the "command" as. The "accounts" determines which accounts are affected. Default is everyone. Other uses is to control blacklists and whitelists. Dragging a message into the blacklist folder runs an executable that adds the sender to a blacklist, or a whitelist, or controls settings etc.
Gordon Tyler
2005-Aug-28 22:33 UTC
[Dovecot] Feature Request - wild idea - folders for executing programs
Marc Perkel wrote:> I have a wild idea for a feature that is somewhat unusual, would be very > powerful, and easy to implement. What I want is ... > > Special folders that when someone drags a message into them - it pipes > the message into a program. > > The reason I want this is - for example - reporting of spam. Suppose youAt the moment, I use the following method for my single user on my home mail machine: cron. Yep, every hour I have a local user cronjob which runs a script that retrains Spamprobe with the messages in my spamprobe-isspam and spamprobe-notspam folders (Maildirs) and then moves those messages to either the Junk folder or the Inbox. This may not be the best way to go about it (especially the moving of message files between folders) but it works for me. However, that said, I think your idea would be very useful with one slight change/clarification:> executable-folder spam-missed { > command = /usr/bin/sa-learn spam > user = spamd > group = spamdFor user and group I'd like to be able to specify that the owner of the account (in my case, my user) should be the one executing the command, since the Spamprobe database is local to my home directory. Ciao, Gordon
Johannes Berg
2005-Aug-29 17:20 UTC
[Dovecot] Feature Request - wild idea - folders for executing programs
On Sun, 2005-08-28 at 08:19 -0700, Marc Perkel wrote:> Special folders that when someone drags a message into them - it pipes > the message into a program.Something like this: http://johannes.sipsolutions.net/Projects/dovecot-dspam-integration maybe? IOW, I think you do need a real folder backing it so you can remove false positives from it. And then, you don't need much magic in dovecot (see the plugin code). johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20050829/26b8d0e3/attachment.bin>