On Tue, 2010-03-16 at 20:41 +0530, Rajkumar S wrote:

> > Could you do all this work before even calling deliver? Like:
> > deliver -a user-action-h...@domain.com -d u...@domain.com
> > So the lookup is done for user, but the full address is still available.
> 
> Okay. I am not sure I fully understand this statement, but let me try
> again before coming back to the list.

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.

> > Currently the only LDAP config for Dovecot is for authentication. I
> > don't think other stuff should necessarily read that same config. The
> > whole LDAP stuff should be more abstracted out, so that e.g. dict-ldap
> > could also be created, but that's a bigger job.
> 
> If you could elaborate on the ldap-dict I can try and code that up.

Actually there already is a patch for that already. I added it now to
http://dovecot.org/patches/1.2/ldap/

The lib-ldap part is what would help you as well. But its API seems too
much of wrapper to ldap.h API. It could most likely be simplified so
that auth/db-ldap.c could become almost as simple as auth/db-sql.c.

Also I really don't like the libldap_ prefix :) But I can't really think
of any other great alternatives either..

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

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to