Thanks everybody for your help. Henning Brauer was right, like I'm using qmail-ldap, it's neccesary to indicate in the control/ldapdefaultdotmode the interpretation of the .qmail files Henning Brauer wrote: > Check the dotmode. qmail-ldap does not use .qmail-files for ldap deliveries > unless dotmode is set to both. Check http://www.lifewithqmail.org/ldap/ for > more, section 8.1.1.14 and 8.1.2 in special. > > And, btw, you don't need a .qmail-file for this task. Just set the ldap > attributes > > mailForwardingaddress: user2@otherdomain > deliveryMode: localdelivery > > The deliverymode=localdelivery forces an local delivery even if a forwarding > is done. This is also explained in life with qmail-ldap, section 8.1.2.
