You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Reindl Harald <h....@thelounge.net> on 2016/02/21 18:23:02 UTC

regex help

since SA is using regex for RBL repsonse codes that below don't worker 
proper - the postfix/postscreen part is easy but for SA even after 
writing thouands of regex it's currently blowing my mind away
_____________________________

in theory:

header   CUST_DNSBL_21 
eval:check_rbl('cust21-lastexternal','score.senderscore.com.','^127\.0\.4\.[0-20]$')

Postfix: 127.0.4.[0..20]
_____________________________

in theory:

header   CUST_DNSBL_25 
eval:check_rbl('cust25-lastexternal','score.senderscore.com.','^127\.0\.4\.[0-69]$')

Postfix: 127.0.4.[0..69]
_____________________________

in theory:

header   CUST_DNSWL_2 
eval:check_rbl('cust35-lastexternal','score.senderscore.com.','^127\.0\.4\.[90-100]$')

Postfix: 127.0.4.[90..100]



Re: regex help

Posted by Reindl Harald <h....@thelounge.net>.

Am 22.02.2016 um 12:45 schrieb Matus UHLAR - fantomas:
>> Am 21.02.2016 um 19:08 schrieb RW:
>>> [90-100] represents a single character. You are specifying 9 or the
>>> range 0-1 with two redundant 0 characters on the end. If you meant 90
>>> to 100 inclusive, you need something like:
>>>
>>>  '^127\.0\.4\.(9[0-9]|100)$'
>
> On 21.02.16 19:20, Reindl Harald wrote:
>> thans, according to http://regexstorm.net/tester that below seems to
>> work in the meantime
>>
>> Postfix: 127.0.4.[0..20]
>> SA: ^127\.0\.4\.(0?[0-1]?[0-9]|20)$
>
> (1?[0-9]|20) should be enough, I think check_rbl doesn't keep leading
> zeroes

confirmed - thanks!


Re: regex help

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>Am 21.02.2016 um 19:08 schrieb RW:
>>[90-100] represents a single character. You are specifying 9 or the
>>range 0-1 with two redundant 0 characters on the end. If you meant 90
>>to 100 inclusive, you need something like:
>>
>>  '^127\.0\.4\.(9[0-9]|100)$'

On 21.02.16 19:20, Reindl Harald wrote:
>thans, according to http://regexstorm.net/tester that below seems to 
>work in the meantime
>
>Postfix: 127.0.4.[0..20]
>SA: ^127\.0\.4\.(0?[0-1]?[0-9]|20)$

(1?[0-9]|20) should be enough, I think check_rbl doesn't keep leading zeroes

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
BSE = Mad Cow Desease ... BSA = Mad Software Producents Desease

Re: regex help

Posted by Reindl Harald <h....@thelounge.net>.

Am 21.02.2016 um 19:08 schrieb RW:
> On Sun, 21 Feb 2016 18:23:02 +0100
> Reindl Harald wrote:
>
>
>> header   CUST_DNSWL_2
>> eval:check_rbl('cust35-lastexternal','score.senderscore.com.','^127\.0\.4\.[90-100]$')
>
>
> [90-100] represents a single character. You are specifying 9 or the
> range 0-1 with two redundant 0 characters on the end. If you meant 90
> to 100 inclusive, you need something like:
>
>   '^127\.0\.4\.(9[0-9]|100)$'

thans, according to http://regexstorm.net/tester that below seems to 
work in the meantime

Postfix: 127.0.4.[0..20]
SA: ^127\.0\.4\.(0?[0-1]?[0-9]|20)$

Postfix: 127.0.4.[0..69]
SA: ^127\.0\.4\.(0?[0-6]?[0-9])$

Postfix: 127.0.4.[90..100]
SA: ^127\.0\.4\.(9[0-9]|100)$


Re: regex help

Posted by RW <rw...@googlemail.com>.
On Sun, 21 Feb 2016 18:23:02 +0100
Reindl Harald wrote:


> header   CUST_DNSWL_2 
> eval:check_rbl('cust35-lastexternal','score.senderscore.com.','^127\.0\.4\.[90-100]$')


[90-100] represents a single character. You are specifying 9 or the
range 0-1 with two redundant 0 characters on the end. If you meant 90
to 100 inclusive, you need something like:

 '^127\.0\.4\.(9[0-9]|100)$'