Evgeniy Berdnikov via Exim-users wrote:
> On Mon, May 31, 2021 at 02:46:40PM +0700, Victor Sudakov via Exim-users wrote:
> > Evgeniy Berdnikov via Exim-users wrote:
> > > On Mon, May 31, 2021 at 01:57:26PM +0700, Victor Sudakov via Exim-users 
> > > wrote:
> > > > Here is -d+lookup: https://termbin.com/08fv
> > > 
> > >  Lookup failed. Have you string "[email protected]" in this 
> > > file?
> > >  Check it by hands: exim -be '${lookup {[email protected]} 
> > > ...}'.
> > 
> > root@http1:~ #  exim -C /usr/local/etc/exim/configure.nolocalmail -be 
> > '${lookup{[email protected]}lsearch{/etc/mail/whitelist.local}}'
> > 
> > root@http1:~ # grep [email protected] /etc/mail/whitelist.local
> > [email protected]
> > root@http1:~ # 
> 
>  All works as programmed: Lookup for "[email protected]" gives
>  empty string, bool{} converted it to "false", so ${if...} fails and condition
>  is wrong. You have to change this logic. Say, add value to lookup key.

Hmm, this looks excessive. I don't need a map, just a list. What's the
canonical lookup just to check if the string is listed in a file?

PS in olden times, I think I could write something like

acl_not_smtp:
     accept condition           = 
${lookup{$authenticated_sender}lsearch{/etc/mail/whitelist.local}}
     discard message

and it used to work. Then, for some reason, someone introduced all those
ifs and bools and made them obligatory in ACL conditions.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet

Attachment: signature.asc
Description: PGP signature

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to