[Dovecot] Programming Help

Neal Katz nak at iyago.com
Wed Feb 8 10:38:59 EET 2006


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.

 

 

A simple example would be to configure the system to publish 'Add Message'
events, and then an external program would read these, and send a
notification event to web based users who are currently logged in.

 

The publish feature would be controlled by the config file, and would be
disabled by default

The config setting would allow an administrator to specify what events to
publish, the mechanism to use, and optional arguments for the mechanism

 For mechanisms I plan on developing a file based system, one file per
event, written into a directory, the subscriber/reader would delete the file

 Other mechanisms could include TCP/IP based (connect to port XX, and send
some data); or even connect to a  commercial Message Queue product.

Ex.

Publish=ADD+DELETE+MOVE:file:/var/spool/imapevents

Or

Publish=ADD+DELETE+MOVE:tcpip:localhost:9999

 

 

 

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.

 

If you have a code-roadmap, or architectural diagrams (or doodles) that
would be helpful too.

 

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

 

I hope this makes sense, if not just send me an email asking for
clarification.

 

All of the changes I make I will submit back to you, and hopefully they will
be made part of the base product.

 

Thanks,

 

Neal Katz

 

p.s. I chose Dovecot because I was very impressed with the ease of
installation and migration (from courier), my early tests have shown it to
be twice as fast when traverse all messages in a large mailbox ( 100K
message ).

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dovecot.org/pipermail/dovecot/attachments/20060208/bb2f5bf5/attachment.html


More information about the dovecot mailing list