> Niels Kobschätzki via Exim-users <[email protected]> hat am 
> 25.07.2023 09:07 CEST geschrieben:
> 
>  
> > Jeremy Harris via Exim-users <[email protected]> hat am 21.07.2023 
> > 11:25 CEST geschrieben:
> > 
> >  
> > On 21/07/2023 09:39, Niels Kobschätzki via Exim-users wrote:
> > > When I start to quote that it won't work. I tried '$h_From:' and wrapping 
> > > ${address:$h_FROM:} and wrapping ${lc:${address:$h_From:}} but those 
> > > resulted all in a deferral iirc because the search query was broken.
> > 
> > Show the debug.
> > 
> > > But maybe I understand quoting wrong in this context. Do you mean 
> > > wrapping it in ' or do you mean using "quote_ldap"?
> > 
> > The latter.
> 
> I set a header like this:
> From: test blacklist <[email protected]>
> 
> Without quote_ldap it results in an ldap-query that has this part:
> ldap://...(|([email protected])...
> 
> I quoted now: (mailBlackList=${lc:${address:${quote_ldap:$h_From:}}})
> 
> And this results in an ldap-query with this part:
> ldap://...(|(mailBlackList=%22test%20blacklist%22%20%3ctest-blacklist%40domain.tld%3e)
> 
> And this won't be found in the ldap because the actual ldap-entry is 
> "[email protected]".
> 
> I also tried
> $bh_From: → %22test%20blacklist%22%20%3ctest-blacklist%40domain.tld%3e
> $rh_From: → 
> mailBlackList=%20%22test%20blacklist%22%20%3ctest-blacklist%40domain.tld%3e%0a
> 
> With quote_ldap I can't find a way to just extract 
> "[email protected]" from the "From:"-header. Without quote_ldap it 
> works, but that is tainted.

I think I finally have it.
I have to write

(mailBlackList=${lc:${quote_ldap:${address:$h_from:}}})

Best,

Niels

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to