You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by irzyxel <ir...@gmail.com> on 2007/12/08 23:08:18 UTC

only simple text rules work, no regex at all

ive created a custome.cf in my spamassassin folder, sa is readin it, cause my
simple text rule 

body TEST_RULE /gwx/
score TEST_RULE 0.1 0.1 0.1 0.1
describe TEST_RULE Test Regel

is working. but as soon as i do the slightest regex, it doesnt trigger
anymore ...

rawbody KETYCASINO /www\.ketycasino\.com/i
score KETYCASINO 0.1 0.1 0.1 0.1
describe KETYCASINO bk.ru Regel

rawbody BK_RU /bk\.ru\?subject=/
score BK_RU 0.1 0.1 0.1 0.1
describe BK_RU bk.ru Regel

any idea what could be the reason for that ?
-- 
View this message in context: http://www.nabble.com/only-simple-text-rules-work%2C-no-regex-at-all-tp14232617p14232617.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: only simple text rules work, no regex at all

Posted by irzyxel <ir...@gmail.com>.
the rawbody is still from an earlier complete try, cause its a  
irzyxel wrote:
> ive created a custome.cf in my spamassassin folder, sa is readin it, cause
> my
> simple text rule 
>
> body TEST_RULE /gwx/
> score TEST_RULE 0.1 0.1 0.1 0.1
> describe TEST_RULE Test Regel
>
> is working. but as soon as i do the slightest regex, it doesnt trigger
> anymore ...
>
> rawbody KETYCASINO /www\.ketycasino\.com/i
> score KETYCASINO 0.1 0.1 0.1 0.1
> describe KETYCASINO bk.ru Regel
>   
Well, there's noting fancy about that rule.. it's a basic
case-insensitive exact-text match and really does noting special as far
as regex is concerned.

The only "fancy" bit here is you've switched to rawbody. Is there a good
reason you're using this instead of uri?

rawbody doesn't remove line-breaks, so if a HTML tag is wrapped across
lines, it won't match.
> rawbody BK_RU /bk\.ru\?subject=/
> score BK_RU 0.1 0.1 0.1 0.1
> describe BK_RU bk.ru Regel
>
> any idea what could be the reason for that ?
>   




-- 
View this message in context: http://www.nabble.com/only-simple-text-rules-work%2C-no-regex-at-all-tp14232617p14244918.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: only simple text rules work, no regex at all

Posted by Matt Kettler <mk...@verizon.net>.
irzyxel wrote:
> ive created a custome.cf in my spamassassin folder, sa is readin it, cause my
> simple text rule 
>
> body TEST_RULE /gwx/
> score TEST_RULE 0.1 0.1 0.1 0.1
> describe TEST_RULE Test Regel
>
> is working. but as soon as i do the slightest regex, it doesnt trigger
> anymore ...
>
> rawbody KETYCASINO /www\.ketycasino\.com/i
> score KETYCASINO 0.1 0.1 0.1 0.1
> describe KETYCASINO bk.ru Regel
>   
Well, there's noting fancy about that rule.. it's a basic
case-insensitive exact-text match and really does noting special as far
as regex is concerned.

The only "fancy" bit here is you've switched to rawbody. Is there a good
reason you're using this instead of uri?

rawbody doesn't remove line-breaks, so if a HTML tag is wrapped across
lines, it won't match.
> rawbody BK_RU /bk\.ru\?subject=/
> score BK_RU 0.1 0.1 0.1 0.1
> describe BK_RU bk.ru Regel
>
> any idea what could be the reason for that ?
>   


Re: only simple text rules work, no regex at all

Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
irzyxel wrote:
> ive created a custome.cf in my spamassassin folder, sa is readin it, cause my
> simple text rule 
> 
> body TEST_RULE /gwx/

/gwx/ is a regex.

> score TEST_RULE 0.1 0.1 0.1 0.1

You can just use 0.1 once BTW.

> describe TEST_RULE Test Regel
> 
> is working. but as soon as i do the slightest regex, it doesnt trigger
> anymore ...
> 
> rawbody KETYCASINO /www\.ketycasino\.com/i
> score KETYCASINO 0.1 0.1 0.1 0.1
> describe KETYCASINO bk.ru Regel
> 
> rawbody BK_RU /bk\.ru\?subject=/
> score BK_RU 0.1 0.1 0.1 0.1
> describe BK_RU bk.ru Regel
> 
> any idea what could be the reason for that ?

The regex doesn't match the rawbody in question.

Daryl