|
Hi Reinaldo, The problem about your solution below is that it will go into a loop. 1) Loop: [email protected] forward to [email protected] and [email protected], which forward again to [email protected] and [email protected], and again, and again, and again... If you are a developer of the project Postfix, is it easy to add support for variables (%u) on the left side? Example: everyone_query_filter = (&(accountStatus=active)(%u=everyone)) Thanks, Ronie -------- Original Message -------- Subject: Re: [email protected] virtual_alias_maps using ldap query From: Reinaldo de Carvalho <[email protected]> To: [email protected] Date: Wed Mar 17 2010 08:19:47 GMT-0300 On Tue, Mar 16, 2010 at 10:38 PM, Ronie Gilberto Henrich <[email protected]> wrote:Hi Reinaldo,Let me explain better how virtual_alias_maps works in this case: 1) Someone send an email to [email protected] 2) Query ldap:everyone result has to be [email protected], [email protected], and so on (all mailboxes in domain example.com) So, the %u value in everyone_query_filter is "everyone" Considering your suggestion: (&(accountStatus=active)(uid=%u)) and dn: uid=user1...: ================= Is "user1"="everyone" ? FALSE So, it won't return any mailboxes.Sorry, I misunderstand your question. Is not possible create "everyone" as you request. You need a cron job. Maybe... (don't tested) everyone_query_filter = (&(accountStatus=active)(mail=%s)) everyone_result_attribute = uid everyone_result_format = %[email protected] This work if you add attribute [email protected] for each ldap entry. dn: uid=user1...: uid=user1 [email protected] [email protected] dn: uid=user2,...: uid=user2 [email protected] [email protected] - Show quoted text -Considering also the second part of your suggestion, about adding the attribute [email protected], it has 2 cons: 1) Loop: [email protected] forward to [email protected] and [email protected], which forward again to [email protected] and [email protected], and again, and again, and again... 2) Redundant data, may lead to inconsistencies: no sense in having all mailboxes with a [email protected]. If one does not have [email protected], the result list of recipients of an email sent to [email protected] won't be all (everyone) mailboxes. Thanks, Ronie -------- Original Message -------- Subject: Re: [email protected] virtual_alias_maps using ldap query From: Reinaldo de Carvalho <[email protected]> To: Postfix <[email protected]> Date: Tue Mar 16 2010 20:26:54 GMT-0300 On Tue, Mar 16, 2010 at 6:54 PM, Ronie Gilberto Henrich <[email protected]> wrote: Hi, /etc/postfix/main.cf ==================== virtual_alias_maps = ldap:everyone everyone_server_host = ldaps://localhost everyone_version = 3 everyone_search_base = ou=%d,ou=Mail,o=example,c=com everyone_query_filter = (accountStatus=active) everyone_result_attribute = mail For only emails sent to [email protected] to be forwarded to all mailboxes in example.com, it is necessary to add a filter like %u=everyone to that ldap query. I tried the following: everyone_query_filter = (&(accountStatus=active)(%u=everyone)) everyone_query_filter = (&(accountStatus=active)(uid=%u)) everyone_result_attribute = mail This work if you add attribute [email protected] for each ldap entry. dn: uid=user1...: [email protected] [email protected] dn: uid=user2,...: [email protected] [email protected] But it does not work. Is there any way to add that %u=everyone filter in the ldap query above? Or any other way to get the same results and still being dynamic? I mean dynamic by anything but generating hash alias_maps thru cron scripts. Thanks and regards, Ronie |
- [email protected] virtual_alias_maps using ldap ... Ronie Gilberto Henrich
- Re: [email protected] virtual_alias_maps us... Reinaldo de Carvalho
- Re: [email protected] virtual_alias_map... Ronie Gilberto Henrich
- Re: [email protected] virtual_alias... Reinaldo de Carvalho
- Re: [email protected] virtual_alias... Ronie Gilberto Henrich
- Re: [email protected] virtual_a... Victor Duchovni
- Re: [email protected] virt... Ronie Gilberto Henrich
- Re: [email protected] ... Victor Duchovni
- Re: every...@example.... Ronie Gilberto Henrich
- Re: every...@example.... Ronie Gilberto Henrich
- Re: every...@example.... Victor Duchovni
