OK so the fisrt example was a bit over the top why am I still getting this error
Sep 18 13:26:55 colorado exim[16321]: [ID 631539 mail.alert] [1\2] 2002-09-18 13:26:55 Exim configuration error
Sep 18 13:26:55 colorado exim[16321]: [ID 631539 mail.alert] [2/2] extra characters follow string value for condition in line 201
for:
condition = "${if ={${extract{physicalDeliveryOfficeName}\
{${lookup ldap{user="readonly" pass=notpass \
ldap://dc=leeds,dc=internal?physicalDeliveryOfficeName? \
(mail=${local_part}\*}}}}}{Leeds}}"
regards
Steve
On Tue, Sep 17, 2002 at 04:04:38PM +0100, Steve Foster wrote:
> Folks,
>
> I'm currently trying to figure out a way of determining wheither a email should be sent to the local mail server or a remote one based on information stored in a LDAP directory.
>
> the theory is that email will come in for users at a specific domain, eg fish.co.uk. exim will then query the M$ AD server to check the users physicaldeliveryofficename object. If the office is the local one then send to the local email server. Else process via the lookuphost router.
>
> At the moment I have hit on a syntax error and can't spot it. The error is:
> Sep 17 15:29:41 colorado exim[15184]: [ID 631539 mail.alert] [1\2] 2002-09-17 15:29:41 Exim configuration error
> Sep 17 15:29:41 colorado exim[15184]: [ID 631539 mail.alert] [2/2] missing quote at end of string value for condition in line 336
>
>
> the router is:
>
> fish_co_uk:
> condition = "${if
> and {
> {match
> {$domain}
> {fish.co.uk}
> {$domain}
> }
> {eq
> {Leeds}
> {${lookup
> ldap {
> user=\"CN=ldap readonly\"
> pass=\"nottelling\"
> ldap://server/ou=Users,dc=leeds,dc=intnernal
> ?physicalDeliveryOfficeName?(cn=${sg
> {${lc:$local_part}}
> {^([a-z]*)\.([a-z]*)\$}
> {\$1 \$2}
> }
> )
> }
> }
> }
> }
> }
> }"
> driver = domainlist
> route_list = "* internalmail.local byname"
> transport = remote_smtp
>
>
> Exim Version: 3.36
> Compiler Version: gcc version 2.95.2 19991024 (release)
> OS: Solaris 8
> Arch: x86
>
> Regards
>
> Steve Foster
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>