You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Keith De Souza <kb...@googlemail.com> on 2010/12/24 00:55:59 UTC
Whitelist Regex Rules for range of IP's
Hi,
I've got an SA rule that will whitelist and IP address:
========
header IP_WL Received=~ /\[212.74.114.16\]/
score IP_WL -99
describe IP_WL Allows relays from 212.74.114.16
========
How to I modify this so that it is for a range of IP addresses basically
covering the /24 subnet.
Many Thanks
Re: Whitelist Regex Rules for range of IP's
Posted by Benny Pedersen <me...@junc.org>.
On fre 24 dec 2010 00:55:59 CET, Keith De Souza wrote
> How to I modify this so that it is for a range of IP addresses basically
> covering the /24 subnet.
trusted_networks 212.74.114.0/24
and adjust score on ALL_TRUSTED, if to much spam pass
--
xpoint http://www.unicom.com/pw/reply-to-harmful.html
Re: Whitelist Regex Rules for range of IP's
Posted by Keith De Souza <kb...@googlemail.com>.
>
> And if you don't want it to be open to forgery
>
> X-Spam-Relays-Untrusted =~ /^[^\]]+ ip=212\.74\.114\./
>
Many thanks guys
Re: Whitelist Regex Rules for range of IP's
Posted by RW <rw...@googlemail.com>.
On Thu, 23 Dec 2010 16:05:11 -0800 (PST)
John Hardin <jh...@impsec.org> wrote:
> On Thu, 23 Dec 2010, John Hardin wrote:
>
> > On Thu, 23 Dec 2010, Keith De Souza wrote:
> >
> >> How to I modify this so that it is for a range of IP addresses
> >> basically covering the /24 subnet.
> >
> > header IP_WL Received=~ /\[212.74.114.[0-9]{1,3}\]/
>
> ...actually, you need to escape the periods too:
>
> header IP_WL Received=~ /\[212\.74\.114\.[0-9]{1,3}\]/
>
And if you don't want it to be open to forgery
X-Spam-Relays-Untrusted =~ /^[^\]]+ ip=212\.74\.114\./
Re: Whitelist Regex Rules for range of IP's
Posted by John Hardin <jh...@impsec.org>.
On Thu, 23 Dec 2010, John Hardin wrote:
> On Thu, 23 Dec 2010, Keith De Souza wrote:
>
>> Hi,
>>
>> I've got an SA rule that will whitelist and IP address:
>>
>> ========
>> header IP_WL Received=~ /\[212.74.114.16\]/
>> score IP_WL -99
>> describe IP_WL Allows relays from 212.74.114.16
>> ========
>>
>> How to I modify this so that it is for a range of IP addresses basically
>> covering the /24 subnet.
>
> header IP_WL Received=~ /\[212.74.114.[0-9]{1,3}\]/
...actually, you need to escape the periods too:
header IP_WL Received=~ /\[212\.74\.114\.[0-9]{1,3}\]/
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
"Bother," said Pooh as he struggled with /etc/sendmail.cf, "it never
does quite what I want. I wish Christopher Robin was here."
-- Peter da Silva in a.s.r
-----------------------------------------------------------------------
2 days until Christmas
Re: Whitelist Regex Rules for range of IP's
Posted by Keith De Souza <kb...@googlemail.com>.
> header IP_WL Received=~ /\[212.74.114.[0-9]{1,3}\]/
Many Thanks John - will hive it a try now.
Re: Whitelist Regex Rules for range of IP's
Posted by John Hardin <jh...@impsec.org>.
On Thu, 23 Dec 2010, Keith De Souza wrote:
> Hi,
>
> I've got an SA rule that will whitelist and IP address:
>
> ========
> header IP_WL Received=~ /\[212.74.114.16\]/
> score IP_WL -99
> describe IP_WL Allows relays from 212.74.114.16
> ========
>
> How to I modify this so that it is for a range of IP addresses basically
> covering the /24 subnet.
header IP_WL Received=~ /\[212.74.114.[0-9]{1,3}\]/
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
"Bother," said Pooh as he struggled with /etc/sendmail.cf, "it never
does quite what I want. I wish Christopher Robin was here."
-- Peter da Silva in a.s.r
-----------------------------------------------------------------------
2 days until Christmas