Hello, I have installed qmail-ldap with qpsmtpd. It works great. I then install a patch for qmail :
http://www.qmail-ldap.org/wiki/index.php/Domain_aliasing So I have "domain alias" working in qmail : any domain alias is rewrite before looking to the ldap database. If I have a user julien in ldap with mail value:jul...@domain.com and in /var/qmail/control/aliasdomains I have an entry like test.domain.com --> domain.com . If I get a mail for jul...@test.domain.com, qmail will look for jul...@domain.com in the ldap and not for the original recipient. But Qpsmtpd don't look at /var/qmail/control/aliasdomains and so look for jul...@test.domain.com in the ldap which does not exist. I don't want to list every possible domain in ldap for each user like : mail : jul...@test.domain.com mail : jul...@domain.com I'm interesting in a plugin that rewrite domain part of the recipient before checking recipient address against ldap. For example, a rcpt_rewrite plugins that read the same config file as qmail with patch : example of /var/qmail/control/aliasdomains config file : test.domain.com:domain.com somebody on the list suggest code like (static remplacment) : #aliasdomains use Qpsmtpd::DSN; sub hook_rcpt { my ($self, $transaction) = (shift, shift); # $_[0]->user("newuser"); $_[0]->host("domain.com"); return DECLINED; } But this don't work, the next plugins rcpt_ldap gets the old recipient (not rewrite) maybe it's not the right variable ? If somebody have an idea about the way to do this in qpsmtpd ... I think this plugin could be useful for other people because it reproduce the qmail(+patch) behaviour about accepting recipient. Best Regards, Julien.