[exim] conditionly data=

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Dmitriy Kirhlarov
Dátum:  
Címzett: exim-users
Tárgy: [exim] conditionly data=
Hi, list

I want make maillists with exim.
Some lists doesn't have archive in shared folder, others -- have.
I want use only ONE router.

I tried two variants:
...
LISTS_NO_ARCHIVE = security-team : admin-team
...
begin routers
...

--------
lists:
  driver = redirect
  domains = +mydomain_domain
  allow_fail
  allow_defer
  data = ${if match_local_part {LISTS_NO_ARCHIVE}{\
    ${lookup ldapm{LDAP_AUTH \
    ldaps:///ou=mail,ou=groups,o=mydomain?rfc822MailMember?one?(&(objectClass=nisMailAlias)(cn=${quote_ldap:${tr{$local_part}{_}{-}}}))}{$value}fail}\
    }{\
    ${lookup ldapm{LDAP_AUTH \
    ldaps:///ou=mail,ou=groups,o=mydomain?rfc822MailMember?one?(&(objectClass=nisMailAlias)(cn=${quote_ldap:${tr{$local_part}{_}{-}}}))}{$value}fail},
\
    +shared/${lc:$local_part}@???}}
  headers_remove = Subject : Sender
  headers_add = Subject: [${tr{$local_part}{_}{-}}] $h_subject:\n\
                Sender: ${tr{$local_part}{_}{-}}@$domain
  redirect_router = cyrus_get_uid
--------


this variant doesn't work with diagnose "unknown address"

and

--------
lists:
  driver = redirect
  domains = +mydomain_domain
  allow_fail
  allow_defer
  data = ${lookup ldapm{LDAP_AUTH \
    ldaps:///ou=mail,ou=groups,o=mydomain?rfc822MailMember?one?(&(objectClass=nisMailAlias)
    (cn=${quote_ldap:${tr{$local_part}{_}{-}}}))}{$value}fail}, \
    ${if match_local_part {LISTS_NO_ARCHIVE}{yes}{+shared/${lc:$local_part}@???}}
  headers_remove = Subject : Sender
  headers_add = Subject: [${tr{$local_part}{_}{-}}] $h_subject:\n\
                Sender: ${tr{$local_part}{_}{-}}@$domain
  redirect_router = cyrus_get_uid
--------


this variant silently ignore
${if match_local_part {LISTS_NO_ARCHIVE}{yes}{+shared/${lc:$local_part}@???}}
condition.

Where I'm wrong?

WBR.
Dmitriy