I am resending this because I've accidentaly sent the last email in HTML format, sorry.
> -------- Original Message -------- > Subject: Re: every...@example.com virtual_alias_maps using ldap query > From: Victor Duchovni <victor.ducho...@morganstanley.com> > To: Ronie Gilberto Henrich <ro...@ronie.com.br> > Cc: postfix-users@postfix.org > Date: Thu Mar 18 2010 14:00:45 GMT-0300 >>> Something like a support for variables (%u) on the left side? >>> >>> Example: >>> everyone_query_filter = (&(accountStatus=active)(%u=everyone)) >>> >> >> This is not "simpler" it is simply wrong. The substituted LDAP search >> filter is parsed by LDAP server, not Postfix. Postfix will not try >> to interpret a subset of the conditions in the LDAP filter. >> >> To make "every...@example.com" an address, create an LDAP object >> with that address. >> >> If the LDAP object needs to expans to all user addresses, make it an >> LDAP-URI valued group. If the group is large (thousands of recipients), do >> the expansion on a dedicated list server, not your primary Postfix queue. >> >> > You mean something like the ldap object below? > mail=every...@example.com,ou=Mail,o=example,c=com > ObjectClass=referral > ref=ldaps://localhost/ou=Mail,o=example,c=com > > I did that and it does list all ou=Mail,o=example,c=com mail accounts. > > Then I modified my ldap:everyone mappings to the folowing: > virtual_alias_maps = ldap:everyone > everyone_server_host = ldaps://localhost > everyone_version = 3 > everyone_search_base = ou=Mail,o=example,c=com > everyone_query_filter = (mail=%s) > everyone_result_attribute = mail > > But it does not work. > 550 <every...@example.com>: Recipient address rejected: User unknown; > > Any ideas of what I am doing wrong? > > Thanks, > Ronie