Re: [exim] SA-Exim and acls

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: ROGERS Richard
Dátum:  
Címzett: David Purton, Exim Users
Tárgy: Re: [exim] SA-Exim and acls
David Purton wrote:
> Hi,
>
> I'm trying to control whether emails are scanned for spam or not.
> (Debian etch, btw)
>
> So for example when mail is locally generated, I'm setting acl_m0 to
> do-not-scan in Exim's acl_check_rcpt.
>
> e.g.,
>
> acl_check_rcpt:
>   warn hosts = :
>        set acl_m0 = do-not-scan

>
> then in sa-exim.conf I have
>
> SAEximRunCond: ${if !eq {$acl_m0}{do-not-scan} {1}{0}}
>
> But it's not working :( The message gets scanned anyway.
>
> The acl is being set, since I can see this happening if I run exim in
> debug mode.
>
> but SAEximRunCond is expanding to false (it expands to true if I use
> SAEximRunCond: ${if !eq {$acl_m0}{} {1}{0}})
>
> Any ideas what I'm doing wrong?


I'm not sure you can pass the flag that way (others may be able to give
you a more detailed answer on that!). Here we use an added header (which
also has the advantage that you can see in the message why it wasn't
scanned), similar to this

In exim.conf (RCPT ACL):

warn    
 domains = +local_domains : +relay_to_domains
 hosts = !+relay_from_hosts
 condition = ${if eq {$ACL_MSG_EXEMPTION_MODE}{2}{1}{0}}
 message = X-SA-Do-Not-Run: Yes
 log_message = User whitelist entry (FROM $sender_address TO
$local_part@$domain) causes spam checks to be bypassed


Then in sa-exim.conf:
SAEximRunCond: ${if and {{def:sender_host_address} {!eq
{$sender_host_address}{127.0.0.1}} {!eq {$h_X-SA-Do-Not-Run:}{Yes}} }
{1}{0}}

Regards

Richard

--
Richard Rogers
IT Development and Innovation Manager
Information Services, Staffordshire University
Tel. ext. 3785 or 4318


The information in this email is confidential and is intended solely for the addressee. Access to this email by anyone else is unauthorised.



If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, except for the purpose of delivery to the addressee, is prohibited and may be unlawful. Kindly notify the sender and delete the message and any attachment from your computer.