Autor: Ian FREISLICH Data: A: Jakob Hirsch CC: 'Exim-users' Assumpte: Re: [exim] Whitelist?
Jakob Hirsch wrote: > j2 wrote:
>
> > I am trying to put together a white-list for a few users, basically do an
> > accept of the mail based on sender-email and recipient email via an
> > sequential search in a flat file. But I can't get it to fly on my 4.41
> > installation.
>
> put together a file with "from@domain1: rcpt@domain2" lines and add
> something like this in an early stage of your acl_check_rcpt ACL:
>
> accept condition = ${if eq \
> {${lookup {$sender_address} lsearch {/the/file} {$value}fail}} \
> {$local_part@$domain}}
That will work as long as your keys are unique.
sender1: recipient1
sender1: recipient2
Will always on the "sender1: recipient2" pair because sender1 will
match on the first line and sebsequent occurences will be ignored.
You either need to combine your sender and recipient into the key: