Re: [exim] ACL condition

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Greg
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] ACL condition
Thanks, this helped me figure out the rest.



Thank you,
Greg Borbonus
*Nix Server administrator

On 10/12/2012 3:20 AM, Phil Pennock wrote:
> On 2012-10-12 at 01:13 -0700, Phil Pennock wrote:
>> Instead, I'd write this as three condition rules in the ACL:
>> ----------------------------8< cut here >8------------------------------
>>    condition = ${if exists{${acl_m1_home}/.spamd/ip.whitelist}}
>>    hosts = iplsearch;$acl_m1_home/.spamd/ip.whitelist
>>    !condition = ${if inlisti{$sender_address_local_part}{postmaster:no-reply:no_reply}}
>> ----------------------------8< cut here >8------------------------------

>>
>> Note that inlisti was added in Exim 4.77, so before that you might
>> instead use:
>> ----------------------------8< cut here >8------------------------------
>>    !condition = ${if forany{postmaster:no-reply:no_reply}{eqi{$item}{$sender_address_local_part}}}
>> ----------------------------8< cut here >8------------------------------
> Actually, I'd re-order, so that the simple string comparison is done
> before the filesystem stat, and the possible opening of the file to read
> and scan.

>
> So this version:
>    !condition = ${if forany{postmaster:no-reply:no_reply}{eqi{$item}{$sender_address_local_part}}}
>    condition = ${if exists{${acl_m1_home}/.spamd/ip.whitelist}}
>    hosts = iplsearch;$acl_m1_home/.spamd/ip.whitelist

>
> should be more efficient and work back as far as 4.67, when forany was
> added. But inlisti is still clearer, for 4.77 onwards.
>
> -Phil