Re: [exim] Strange error from exim -bV

Top Page
Delete this message
Reply to this message
Author: Odhiambo Washington
Date:  
To: exim users
Subject: Re: [exim] Strange error from exim -bV
On Sun, 22 Nov 2020 at 17:27, Jeremy Harris via Exim-users <
exim-users@???> wrote:

> On 22/11/2020 13:30, Odhiambo Washington via Exim-users wrote:
> > 2020-11-22 15:37:25.691 Exim configuration error in line 3 of
> > /etc/exim4/exim4-ldap-config.conf:
> >    option setting expected:    debug_print = "R: user_ad_aliases for
> > $local_part@$domain"

>
> > If I comment out the mentioned line, the error then points to the next
> > line, and so forth.
>
> First guess is that there's an odd byte near the top of the file, which
> is not apparent to a quick glance.
>
> Try "od -c /etc/exim4/exim4-ldap-config.conf | head"
>


While I managed to eliminate the error by copying /dev/null to the file and
writing the content manually, I am
just wondering if I would have made head or tails from the output of this
command.
Let me ask Uncle Gugu about it, as this is the 1st time I am hearing of
this `od` command.

I have more problems though - with the same router, after I fixed the
previous error:

*root@adc0:/home/wash# exim -bt odhiambo@???*
R: user_ad_aliases for odhiambo@???
odhiambo@??? cannot be resolved at this time: error in
redirect data: missing or malformed local part (expected word or "<") in
"${lookup ldapm
{user=CN%3Ddovecot%2CCN%3DUsers%2CDC%3DNEWIDEATEST%2CDC%3DLOCAL
pass="XXXXX"
ldap:///CN%3DUsers%2CDC%3DNEWIDEATEST%2CDC%3DLOCAL?mail?sub?(memberOf=${lookup
ldapdn{user=CN%3Ddovecot%2CCN%3DUsers%2CDC%3DNEWIDEATEST%2CDC%3DLOCAL
pass="XXXXXX"
ldap:///CN%3DUsers%2CDC%3DNEWIDEATEST%2CDC%3DLOCAL??sub?(mail=${quote_ldap:$local_part@
$domain})}})}}"

Here is the router:
user_ad_aliases:
   debug_print = "R: user_ad_aliases for $local_part@$domain"
   driver = redirect
   domains = +local_domains
   data = \${lookup ldapm {user=LOCAL_AD_BIND_DN pass=LOCAL_AD_PASS \
              ldap:///LOCAL_AD_BASE_DN?mail?sub?(memberOf=\${lookup \
              ldapdn{user=LOCAL_AD_BIND_DN pass=LOCAL_AD_PASS \


ldap:///LOCAL_AD_BASE_DN??sub?(mail=\${quote_ldap:\$local_part@
\$domain})}})}}


*root@adc0:/var/log/dovecot# samba-tool user show odhiambo*
ldb_wrap open of secrets.ldb
dn: CN=Odhiambo Washington,CN=Users,DC=newideatest,DC=local
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Odhiambo Washington
sn: Washington
givenName: Odhiambo
instanceType: 4
whenCreated: 20201120101420.0Z
displayName: Odhiambo Washington
uSNCreated: 4086
name: Odhiambo Washington
objectGUID: e6969596-8b28-41af-b5d8-cea63cc97f98
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
primaryGroupID: 513
objectSid: S-1-5-21-701866827-3355127779-3787685610-1106
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: odhiambo
sAMAccountType: 805306368
userPrincipalName: odhiambo@???
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=newideatest,DC=local
mail: odhiambo@???
loginShell: /bin/bash
userAccountControl: 512
pwdLastSet: 132505181852397220
whenChanged: 20201122112945.0Z
uSNChanged: 4104
distinguishedName: CN=Odhiambo Washington,CN=Users,DC=newideatest,DC=local

I hope those very familiar with LDAP can spot my mistake somewhere.

Thanks in advance.


--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)