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 "[EMAIL PROTECTED]: [EMAIL PROTECTED]" 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}} \
>   [EMAIL PROTECTED]

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 [EMAIL PROTECTED] 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}} [EMAIL PROTECTED]

Ian

--
Ian Freislich

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

Reply via email to