[Dovecot] maildrop index update

Timo Sirainen tss at iki.fi
Thu Sep 3 04:55:12 EEST 2009


On Sep 2, 2009, at 9:28 PM, fernando at dfcom.com.br wrote:

> Can I just "replace" the function called to save the message in the
> maildir (and update the indexes) by the dovecot one?

I don't know about maildrop code, but "maybe". But Dovecot doesn't  
just have a "save message" function. You need to create at least:

  - mail_user
  - mail_namespaces
  - mail_storage
  - open the mailbox with mailbox_open()
  - save the message using mailbox_save_*()

Anyway, look at src/lib-storage/mail-storage.h and how the rest of  
Dovecot uses those.

> Do I need to copy the
> code to load configuration when using only the api functions ?

If you don't care that it completely ignores dovecot.conf file and you  
can figure out maildir location easily, then I guess it becomes easier.



More information about the dovecot mailing list