Re: [exim] Whitelisting Spamcheck router

Góra strony
Delete this message
Reply to this message
Autor: Oli
Data:  
Dla: Exim Users
Temat: Re: [exim] Whitelisting Spamcheck router
Been reading up on the ACL stuff, and I can see how to set a var now and
then check it in my query later, but how can I actually get at the
IP/subnet without hardcoding anything?

I want to see if the IP in $host_address is in the subnet my mailserver
is on. I guess I could call out to an external script, but I'd rather
not do this for every message.

Bit lost here! :-)

Thanks,
-Oli

Bill Hacker wrote:
>> Afternoon All,
>>
>> I've been fiddling with the Spamcheck router to whitelist my internal
>> addresses and speed up delivery - if the sender is in my emailtable or
>> the sender's domain is in my whitelist, the Spamcheck router doesn't match.
>>
>> What I'd really like to do is stop the router running for whitelisted
>> domains and local addresses, but still run if it looks like it's from a
>> local address but came from a non-local IP.
>>
>> Is it possible to check the sender's IP against my local subnet range?
>>
>> Thanks in advance,
>> -Oli
>>
>
> You can do that in 'acl_smtp_connect', set a flag in an acl_c variable,
> copy it to an acl_m variable.
>
> or do it on HELO in acl_smtp_helo, or direclty into an acl_ variable per-
> recipient in acl_smtp_rcpt [1]
>
> acl_m variables survive into the queue with the message, and can be
> tested in the routers until the final delivery has been made for that message.
>
> The sort of test(s) that set said variable are up to you.
>
> Bill
>
> [1] with multiple recipients you will need to preserve each recipient's
> data and concatenate each *successive* recipient's ID & data into a
> structure built within the acl_m variable and extract it later, ELSE you
> will preserve only the last one processed (or over-written in the DATA phase).
>
>


--
Oli Comber

3aIT Limited

T: (0870) 881 5097
F: (0870) 116 0793
E: oli.comber@???
W: www.3ait.co.uk