Re: [exim] discard mail from all local users except

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Victor Sudakov
Data:  
Para: exim-users
Assunto: Re: [exim] discard mail from all local users except
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 "root@???" in this file?
> > > Check it by hands: exim -be '${lookup {root@???} ...}'.
> >
> > root@http1:~ # exim -C /usr/local/etc/exim/configure.nolocalmail -be '${lookup{root@???}lsearch{/etc/mail/whitelist.local}}'
> >
> > root@http1:~ # grep root@??? /etc/mail/whitelist.local
> > root@???
> > root@http1:~ #
>
> All works as programmed: Lookup for "root@???" 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