[Dovecot] Programming Help
Timo Sirainen
tss at iki.fi
Fri Feb 10 16:40:14 EET 2006
On 8.2.2006 10:38, "Neal Katz" <nak at iyago.com> wrote:
> Hi,
> I was hoping you could provide me with some pointers on how to get started
> adding some features to dovecot.
>
> What I am trying to do is add an optional publish mechanism, that would
> publish a list of events as they occur, so that an external program could read
> these events and do ³something².
> These events would be ³Add², ³Delete², ²Move² these would be posted every
> time a new message is added, deleted or moved.
> ²CreateDir², ²DeleteDir² would be published when a user creates a
> subf-folder or removes one.
Sounds like this should be done by a plugin. You can hook into mail-storage
API to see the changes.
You could look as an example the plugins distributed with 1.0beta3. For
example quota plugin hooks into several places.
> It would help me a lot if you could just provide me with a few pointers as to
> the best place to add my features into the dovecot code, I took a quick look
> at the code and decided to contact you first before going ahead and putting
> things in the WRONG place. I did see the code for supporting inotify and
> similar mechanisms, but I don¹t see the big picture ? How does dovecot use
> inotify ?, what features are enabled that you don¹t get without inotify.
Inotify doesn't really matter. It would be just an optimization. You'd
probably want to hook into mail_storage->sync_next() to see the mail
additions/expunges.
> If you have a code-roadmap, or architectural diagrams (or doodles) that would
> be helpful too.
Not currently, sorry. There is some out of date design docs in
doc/design.txt though..
> In terms of inotify, I don¹t think this will work for me, since I would like
> to have the user, Message-Id and Imap UIDL sent in the event message
In sync interface you can ask those from the mail.
More information about the dovecot
mailing list