[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.
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 you
At 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 = spamd
For 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
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
participants (3)
-
Gordon Tyler
-
Johannes Berg
-
Marc Perkel