[Dovecot] qmail-secretary plugin for dovecot deliver

Timo Sirainen tss at iki.fi
Tue Mar 16 17:44:36 EET 2010


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-hash at domain.com -d user at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100316/fbe32a7c/attachment.bin 


More information about the dovecot mailing list