[Dovecot] VERY cool add-on request.

Adam M. Dunn adunn at hgsc.bcm.tmc.edu
Fri Mar 17 21:04:38 EET 2006


I would like to have the ability to execute a command on a folder based
on a user doing something like copying a message to that folder.  This
could be accomplished with a config file directive.

For example, this would be EXTREMEMLY useful as a spam learning hook.
Take a scenario where each user has their own spamassassin bayes database,
and you want to give the users the ability to train their own database
based on what they think is SPAM.  It would be nice to give all the users
a folder called Spam, and tell them to just copy/move mail into that
folder, and spamassassin will automatically learn about it.

If we had a configuration hook where you could execute on a copy/move,
then I could tell Dovecot whenever a user puts a message into the Spam
folder, execute 'sa-learn --spam --file %s' on that message.  Sure we
could just do an external script in a cron job to do it every hour or
something, which I'll probably do in the mean time, but often users will
just delete messsages after they copy into it.  Doing it through IMAP
means spamassassin will learn about it immediately.  


How cool would that be?  It seems like an easy hook to implement.  I would
like to patch it myself for my own use, but I'm not very proficient in C.
I saw someone on the net patched Courier to do the same thing so I know
I'm not alone in wanting this.  Anyone know how I could patch it?


Can we add that to the feature request list?



~Adam





More information about the dovecot mailing list