Re: [Exim] Testing $sender_host_address against hostlist?

Góra strony
Delete this message
Reply to this message
Autor: Dave C.
Data:  
Dla: Peter N Lewis
CC: exim-users
Temat: Re: [Exim] Testing $sender_host_address against hostlist?
On Sat, 15 Jun 2002, Peter N Lewis wrote:

> Hi all,
>
> I've added support for spamassassin and razor into Exim. Very cool!
>
> However, because the spam check is being performed on my users
> (including me), and razor adds a bit of lag, and it all happens
> before the mail is accepted, it means email sending is slowed down
> somewhat.
>
> I would not mind if this was deferred, but it happens during the SMTP
> session from the MUA and so is noticeable by the user (and a waste of
> time because I will deliver it anyway, just with the X-Spam headers
> added, and besides my site is small and none of the users will send
> spam anyway).
>
> Ok, so I'd like to have spamassassin (run from local_scan) not run
> for my various clients (essentially for my relay_from_hosts list).
>
> spamassassin's local_scan config has a condition to disable running, namely"
>
> SAEximRunCond: ${if and {{def:sender_host_address} {!eq
> {$sender_host_address}{127.0.0.1}} {!eq {$h_Do-Not_Run-SA:}{Yes}} }
> {1}{0}}
>
> So basically, the question then boils down to, how can I write an
> exim condition to test $sender_host_address against a hostlist, which
> in this case will be something like:



You could do this check in an ACL, and add a header that you can detect
later..

>
> hostlist   relay_from_hosts = 127.0.0.1:203.8.112.0/24 \
>      :139.130.147.205:203.47.30.60/30

>
> Alternatively I guess a way to not run the local_scan at all for
> hosts in relay_from_hosts, or a way to set a header for
> relay_from_hosts and test it in the expression my work.
>
> Thanks,
>     Peter.

>
> --
> <http://www.interarchy.com/> <http://download.interarchy.com/>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>



--