[Dovecot] Hooks on folder operations

Maikel Verheijen maikel at ladot.com
Wed Jul 23 17:50:07 EEST 2003


Hi Grahame,

> Hi all,
> 
> I'm interested in implementing an anti-spam system using 
> bayesian filtering. I had the idea of modifying and IMAP 
> server to assist in training the spam filter.
Why do you want to hook it up into your imap server? I think it would be
better to prevent emails to enter the mailbox with the MTA rather than
removing it when the user is reading his email using imap.

Why? Because the spam that is in the mailbox might push the user over his
quota limit, and thus preventing legitimate emails to be delivered.

> I was thinking of running a program whenever a message in 
> moved to the folder "Spam" or to a "Safe" folder. This could 
> be easily added to the server as a generic feature, with hook 
> programs for:
>   * new message in a folder (either new, or moved into the folder)
>   * message in folder is modified
>   * message in folder is removed
> and so on. If the support was generic enough there could be 
> many uses for it. Security of the external program needs to 
> be considered but doesn't really affect the IMAP server itself.
With the new API code that Timo is making now, I guess this would be
possible.

(After all: if quota's are updated, something was written to the mailbox, or
deleted of course!)

> Anyway, if I were to write a patch to add support for running 
> an external program in these cases, would it be included? Any 
> feedback would be appreciated, if I'm going to do this I 
> might as well do it in a way that can be integrated back into 
> the main tree!
You can always build a plugin, and plugins can be loaded whenever an
administrator wants them to load. I don't know if Timo wants to include all
plugins that are / will be written for dovecot, but I guess there might be a
plugins part, where people can "post" their plugins so other people can
benefit from them :)

> Cheers
> Grahame

Kind regards,

Maikel Verheijen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dovecot.org/pipermail/dovecot/attachments/20030723/1d77ce7b/attachment-0001.html>


More information about the dovecot mailing list