Re: [exim] Whitelist?

Etusivu
Poista viesti
Vastaa
Lähettäjä: Ian FREISLICH
Päiväys:  
Vastaanottaja: Jakob Hirsch
Kopio: 'Exim-users'
Aihe: 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:

accept condition = ${if eq \
{${lookup {$sender_address+$local_part@$domain} lsearch {/the/file} \
{yes}{no}}} {yes}}

Or need to format your file and use a match condition:
sender1: recipient1, recipient2

accept condition = ${if match {${lookup{$sender_address} lsearch {/the/file} \
{$value}fail}} {$local_part@$domain}}

Ian

--
Ian Freislich