[Dovecot] There is a way to know if a email has been expunged ?

Alex Baule alexwbaule at gmail.com
Thu Feb 16 19:12:25 EET 2012


hi Timo, now its works.. i do in the old way, my dovecot is 2.0.15.

You say it "old way", when it's change ? in dovecot 2.0.18 is in the
old or new way ?

I asking because if i update dovecot, i need to update the plugin.

Tks !


Em 13 de fevereiro de 2012 18:18, Timo Sirainen <tss at iki.fi> escreveu:
> On 13.2.2012, at 19.28, Alex Baule wrote:
>
>> static void emexis_mailbox_allocated(struct mailbox *box)
>> {
>>    union mailbox_module_context *zbox;
>>
>>    zbox = p_new(box->pool, union mailbox_module_context, 1);
>>    zbox->super = box->v;
>>    box->v.open = Mplugin_mailbox_open;
>>    box->v.sync_notify = Mplugin_mailbox_sync_notify;
>>
>>    MODULE_CONTEXT_SET_SELF(box, emexis_storage_module, zbox);
>> }
>
> The above is an "old way" to do it. It doesn't work well if you have any other plugins loaded.
>
>> struct mailbox_vfuncs *v = box->vlast;
>> v->sync_notify = Mplugin_mailbox_sync_notify;
>>
>> But in this two cases, the Mplugin_mailbox_sync_notify is never
>> called... i missing something ??
>
> Never called at all? What storage backend are you using as the base? Maildir?
>
> Anyway, the way you should be calling it is the exact same way quota plugin does:
>
> void Mplugin_mailbox_allocated(struct mailbox *box)
> {
>        struct mailbox_vfuncs *v = box->vlast;
>        union mailbox_module_context *zbox;
>
>        zbox = p_new(box->pool, union mailbox_module_context, 1);
>        zbox->super = *v;
>        box->vlast = &zbox->super;
>
>        v->open = Mplugin_mailbox_open;
>        v->sync_notify = Mplugin_mailbox_sync_notify;
>        MODULE_CONTEXT_SET_SELF(box, Mplugin_storage_module, zbox);
> }
>



More information about the dovecot mailing list