[Dovecot] qmail-secretary plugin for dovecot deliver

Rajkumar S rajkumars at gmail.com
Wed Mar 17 13:51:34 EET 2010


On Tue, Mar 16, 2010 at 9:14 PM, Timo Sirainen <tss at iki.fi> wrote:
> I haven't tried to really understand what your plugin does, but looks
> like it does most of its work in mail_alloc(). deliver does the mail
> delivery via:
>
> typedef int deliver_mail_func_t(struct mail_namespace *namespaces,
>                                struct mail_storage **storage_r,
>                                struct mail *mail,
>                                const char *destaddr, const char *mailbox);
> extern deliver_mail_func_t *deliver_mail;
>
> Can your plugin use that instead? the -a address is in destaddr
> parameter.

Actually I tried to use this first, as follows:

static int lda_group_deliver_mail
(struct mail_namespace *namespaces, struct mail_storage **storage_r,
        struct mail *mail, const char *destaddr, const char *mailbox)
{
    i_info("ping");
}

void lda_group_plugin_init(void)
{
    i_info("INIT");
    n_deliver_mail = deliver_mail;
    deliver_mail = lda_group_deliver_mail;
}

void lda_group_plugin_deinit(void)
{
    deliver_mail = n_deliver_mail;
}

This works when I am not using sieve plugin, but fails when sieve
plugin is also used.

> I guess I mainly just haven't wanted to spend too much time thinking
> about this yet.

I shall go with using a separate conf for plugin and query ldap when
plugin is called.

with regards,

raj


More information about the dovecot mailing list