Re: [exim] Help with a router/condition.

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Tony Finch
Fecha:  
A: JM
Cc: exim-users
Asunto: Re: [exim] Help with a router/condition.
On Tue, 23 May 2006, JM wrote:
>
> The following is close, but I get the error:
> myrouter: missing or misplaced { or }


Let's try formatting it in a more readable way. Remember that whitespace
inside {} in Exim string expansions is often ignored, so you can use this
fact to make bracket matching easier. For example see the {${ and }}
below. It's also generally nicer to make use of the default then/else
parts of ${if and ${lookup and friends.

BARE_ADDRESS=${local_part}@${domain}
LDAP_ADDRESS=${quote_ldap:ADDRESS}

condition = \
  ${if match{BARE_ADDRESS} \
            {${lookup ldap \
               {user=CN=someuser,OU=part1,DC=1,DC=2,DC=3,DC=4 pass=xxx \
                ldap://server:3268/DC=blah,DC=blah1,DC=domain,DC=com?mail?sub?\
                (&(|(objectClass=user)(objectClass=publicFolder)(objectClass=group))\
                  (proxyAddresses=SMTP:LDAP_ADDRESS))} }} }


Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}