[Dovecot] Write a c program to access a mailbox as a system user using dovecot version 2 includes/libs
Should this be doable with the current design? Is there a good reference to do this?
Thanks, Jonathan
On Thu, 2010-08-05 at 10:12 -0400, Jonathan Siegle wrote:
Should this be doable with the current design?
Yes.
Is there a good reference to do this?
doveadm and dsync are good examples. Or maybe you shouldn't write a separate C program, but a doveadm plugin instead (see e.g. doveadm_quota plugin). http://wiki2.dovecot.org/Design has some docs.
On Aug 5, 2010, at 10:16 AM, Timo Sirainen wrote:
On Thu, 2010-08-05 at 10:12 -0400, Jonathan Siegle wrote:
Should this be doable with the current design?
Yes.
Is there a good reference to do this?
doveadm and dsync are good examples. Or maybe you shouldn't write a separate C program, but a doveadm plugin instead (see e.g. doveadm_quota plugin). http://wiki2.dovecot.org/Design has some docs.
The first goal is to open these mailboxes(mdbox/dbox) with alpine version 2 and the mailboxes are on localhost. So I will look at dsync. Both programs use master_service_* calls to start up something. Is that the design I should follow?
On 6.8.2010, at 11.45, Jonathan Siegle wrote:
The first goal is to open these mailboxes(mdbox/dbox) with alpine version 2 and the mailboxes are on localhost.
Why? Why not just let it use IMAP? Seems like a huge amount of work to make c-client call lib-storage. And who knows how many symbol conflicts there will be.. I thought you were talking about some standalone program.
So I will look at dsync. Both programs use master_service_* calls to start up something. Is that the design I should follow?
Yes, those should be used.
On 2010-08-06 12:28:28 +0100, Timo Sirainen wrote:
On 6.8.2010, at 11.45, Jonathan Siegle wrote:
The first goal is to open these mailboxes(mdbox/dbox) with alpine version 2 and the mailboxes are on localhost.
Why? Why not just let it use IMAP? Seems like a huge amount of work to make c-client call lib-storage. And who knows how many symbol conflicts there will be.. I thought you were talking about some standalone program.
and for the fun part i run with mutt like that for 2 years now or so. set tunnel="/usr/sbin/dovecot --exec-mail imap"
mutt header caches are off as they are dirt slow compared to dovecot's caches.
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On Aug 6, 2010, at 7:28 AM, Timo Sirainen wrote:
On 6.8.2010, at 11.45, Jonathan Siegle wrote:
The first goal is to open these mailboxes(mdbox/dbox) with alpine version 2 and the mailboxes are on localhost.
Why? Why not just let it use IMAP? Seems like a huge amount of work to make c-client call lib-storage. And who knows how many symbol conflicts there will be.. I thought you were talking about some standalone program.
Well the idea is for some client to be able to do updates to a mailbox. I grabbed alpine out of the air because it knows how to use different drivers to open mailboxes using the filesystem and not going through an IMAP socket. Maybe I shouldn't be going down this road. The end goal is for my Webmail client to access dovecot mailboxes. Does it make more sense to do the more traditional route of making Webmail an IMAP client? I don't know. I thought it would make more sense to just access the filesystem and write a smart Webmail client. Right now my Webmail is a caching AJAX POP client.
Thanks, Jonathan
On Fri, 2010-08-06 at 10:16 -0400, Jonathan Siegle wrote:
The end goal is for my Webmail client to access dovecot mailboxes. Does it make more sense to do the more traditional route of making Webmail an IMAP client?
Yes. There's almost zero performance benefit for accessing mails via lib-storage than just accessing via IMAP. Also Dovecot's lib-storage API changes every time minor version changes, so you'd have to keep updating your code once in a while. (For v2.1 API I'm hoping to add support for async calls and using UTF-8 mailbox names everywhere.)
participants (3)
-
Jonathan Siegle
-
Marcus Rueckert
-
Timo Sirainen