[Dovecot] Re: Plugin development

Sebastjan Trepca trepca at gmail.com
Sat Jul 23 20:25:00 EEST 2005


Hm, It seems it comes to a recursive loop. The problem is that I override 
storage->v.mailbox_open method with my own, but then use the same method to 
get the mailbox inside the method and of course the thing loops as hell. But 
it's almost the same in Quota plugin, there is just that qstorage, but also 
uses super.mailbox_open which is the current method that is being executed. 

So, how could I get a mailbox? Should I call maildir-storage.mailbox_open? 

Btw, original Quota plugin doesn't work. 
dovecot: Jul 23 19:26:07 Error: IMAP(seba): 
dlopen(/usr/lib/dovecot/modules/imap_quota.so) failed: 
/usr/lib/dovecot/modules/imap_quota.so: undefined symbol: 
array_modifyable_idx

Sebastjan

On 7/23/05, Sebastjan Trepca <trepca at gmail.com> wrote:
> 
> Ok, I found out how to use logging. ( Check failures.c, methods i_[level])
> 
> Now i have problem with method that opens mailbox. It looks like this:
> 
> static struct mailbox *quota_mailbox_open(struct mail_storage *storage, 
> const char *name, struct istream *input, enum mailbox_open_flags flags)
> {
> struct mailbox *box;
> box = storage->v.mailbox_open(storage, name, input, flags);
> if (box == NULL)
> return NULL;
> 
> box->v.save_finish = quota_save_finish;
> box->v.copy = quota_copy;
> return box;
> }
> 
> When I run dovecot and select a mailbox the child that is processing my 
> connection gets killed. Why? I just override those functions, everything 
> else is same as original method.
> 
> Sebastjan
> 
> On 7/23/05, Sebastjan Trepca <trepca at gmail.com> wrote:
> > 
> > Hi,
> > 
> > I have a few questions regarding copy and save_finish methods. 
> > 
> > How can I get a filename or processing mail from the parameters you get 
> > in that methods? How could I use the logger you use for dovecot inside my 
> > plugin?
> > 
> > Thanks, Sebastjan
> > 
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dovecot.org/pipermail/dovecot/attachments/20050723/bedb19fc/attachment-0003.html>


More information about the dovecot mailing list