[Dovecot] Feature Request: content-filter / MOVE scripts
Curtis Maloney
cmaloney at cardgate.net
Fri Apr 20 01:56:57 EEST 2007
Daniel L. Miller wrote:
> I have some thoughts on an interface that would eliminate the need for
> compile-time plug-ins, but provide some major power to sysadmins.
> Basically, I want a way of telling an external program the following:
> 1. A message was moved.
> 2. The folder is moved from was XXX.
> 3. The folder it moved to was YYY.
> 4. The message moved was ZZZ.
This sounds like the sort of job DBus
(http://www.freedesktop.org/wiki/Software_2fdbus) is well suited for.
Announcing events that other people may want to react to.
> Armed with this information, just about anybody's spam fighting learn
> scripts can be called to do their thing.
Add some more events, and people can get all the logging they want, too...
I've occasionally considered how one would go about opening up a program like
Dovecot to dbus, and there are several approaches.
1) Minimal exposure: just send a few event signals with relevant information.
2) Clean API: Expose many hooks into the system for event output and external
program interfacing.
3) Open slather: Break the app up into several DBus objects, talking amongst
themselves.
Of course, option3 would somewhat cease to be Dovecot, but with its strong,
clear APIs Dovecot would be an excellent starting point. With fully exposed
internals, you could achieve all sorts of interesting extensions and the like.
but this is a job for someone with more spare time :)
--
Curtis Maloney
cmaloney at cardgate.net
More information about the dovecot
mailing list