RE: limiting data acl scan

"William Rundquist" <[email protected]> Wed, 19 Jan 2005 17:59:54 -0800
Newsgroups gmane.mail.exim.exiscan.user
Organization Wetware Services, Inc
Message-ID <[email protected]>
> -----Original Message-----
> From: Peter Bowyer [mailto:[email protected]] 
> Sent: Wednesday, January 19, 2005 12:39 PM
> Subject: Re: [exiscanusers] limiting data acl scan
> 
> William Rundquist <[email protected]> wrote:
> > I'm trying to determine how to limit the data acl
> > scan (ie spam scanning) to only email that is
> > destined for local delivery.
> >
> > The situation is that I have a number of domains for
> > which I do MX secondary. All of these domains do their
> > own spam / virus scanning.  So its effort (ie cpu cycles)
> > that is in essence wasted for my server to scan email
> > that is going to be forwarded to the these domains.
> > Unfortunately, trying to check for the domain using
> > an accept domains = +local_domains isn't allowed in
> > the data acl.  So I need some other mechanism for limiting
> > the scan.
> 
> Set an acl_m variable in a RCPT acl

Ah ....  I just found that section in the documentation.
I was wondering what those could be used for.

Thanks for pointing this out Peter.

> warn set acl_m0=1
>  domains = +local_domains
> 
> Now acl_m0 is set to 1 if we've seen a local recipient - I 
> guess your rule means we must scan if we have at least one
> local recipient...
> 
> Now test $acl_m0 in a condition in your DATA acl.

Yup.  That did it.  I did do something that I don't know
if I needed to do or not.  That is, initialize the acl variable
to 0; ie:

	warn set acl_m0=0

	warn set acl_m0=1
		domains = +local_domains

Then in the data acl:

	accept ${if ={$acl_m0}{0}{1}{0}}

Thanks again Peter.  Your help was greatly appreciated.

And FWIW I'm extremely pleased with Exim and the scan patch.
I'm also looking forward to the patch migrating into the
main exim code line as a compile option.


Andy R.