[Dovecot] VERY cool add-on request.

Max "CtRiX" ctrix at navynet.it
Sat Mar 18 20:19:13 EET 2006


David A. Lee ha scritto:

> I've just now been reading about dnotify and inotify, and while if 
> they existed on my system could work for this, I still think direct 
> support would be cleaner and more efficient.   D/I notify both require 
> kernel patches not available on all Linux systems (and not at all on 
> non-Linux systems). 

Inotify is avalaible as a patch for 2.6.
dnotify is included in the kernel, since 2.4.something and does not 
requires patches.
You only need userspace tools (only 1 file).

> They require an additional program to be running at all times 
> monitoring the directory (probably one or more per user), and in one 
> case it doesn't even say which file changed so the overhead of 
> scanning the files in the directory is added on ...

It says which file/directory has changed. Try it.
It does run all the time but it is triggered by a kernel event. It does 
not scans files/dirs all the time.

> plus if you have multiple directories you'd have to write a special 
> variant that kept a bunch of directory handles open. Very cumbersome.

Not at all.
Try it.

>
> While having a hook into dovecot to invoke a process when a particular 
> folder was touched would be very clean.  Maybe the "plugin" mechanism 
> could be used to write such a thingy.
>
I agree that it would be a better solution.
I don't agree when you say that dnotify is not a good solution, 
particulary when you have not tried it!

If timo will not write a plugin or you won't write it, I think 
dnotify/inotify is a good alternative.

Max



More information about the dovecot mailing list