You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by kailash vyas <vy...@gmail.com> on 2006/12/08 18:11:14 UTC

Spam assasin rules problem

Hi,

I was having some problems with spamassasin rules in local.cf
I am trying to write some custom rules but it doesnt seem to be taking these
values

I ran spamassasin -lint local.cf and it is showing no errors

After that I ran spamc -R command to run a check for the rules but it is not
reporting in the analysis

===================================================
spamc -R
Subject:Symbol
Symbol
2.6/5.0
Spam detection software, running on the system "
interlink.xcomplete-hosting.com", has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  Symbol [...]

Content analysis details:   (2.6 points, 5.0 required)

 pts rule name              description
---- ----------------------
--------------------------------------------------
-0.0 NO_RELAYS              Informational: message was not relayed via SMTP
 2.5 MISSING_HB_SEP         Missing blank line between message header and
body
 0.0 BAYES_50               BODY: Bayesian spam probability is 40 to 60%
                            [score: 0.5197]
-0.0 NO_RECEIVED            Informational: message has no Received headers
 0.1 TO_CC_NONE             No To: or Cc: header
====================================================


===local.cf=========
# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)

# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.

required_score 5
rewrite_header subject [SPAM]


use_bayes               1
bayes_auto_learn        1
skip_rbl_checks         0
use_pyzor               1

body LOCAL_DEMONSTRATION_RULE  /symbol/
score LOCAL_DEMONSTRATION_RULE 6.0
describe LOCAL_DEMONSTRATION_RULE       This is a simple test rule
=====end of local.cf=====

Best Regards,
Kailash

Re: Spam assasin rules problem

Posted by Theo Van Dinter <fe...@apache.org>.
On Mon, Dec 11, 2006 at 11:14:03AM +0000, kailash vyas wrote:
> I am not able to match : in the regular expression.
> for example I was trying to match Symbol:
> 
> body LOCAL_DEMONSTRATION_RULE  /\bsymbol:\b/i

remove the trailing \b (unless you expect there to be alphanumeric chars
right after the symbol).

> I tried putting a blackslash before :  but still not working (symbol\:)

colon isn't a special char in re, so you don't need to escape it.

-- 
Randomly Selected Tagline:
"I believe in getting into hot water; it keeps you clean." - G. K. Chesterton

Re: Spam assasin rules problem

Posted by kailash vyas <vy...@gmail.com>.
thank you for your help. that worked. but i was having another problem as
well :)
I am not able to match : in the regular expression.
for example I was trying to match Symbol:

body LOCAL_DEMONSTRATION_RULE  /\bsymbol:\b/i
score LOCAL_DEMONSTRATION_RULE 6.0
describe LOCAL_DEMONSTRATION_RULE       This is a simple test rule

This rule doesnt work though if I remove : and match with symbol or Symbol
it works.
I tried putting a blackslash before :  but still not working (symbol\:)

Thanks,
Kailash

Spainhomes.Org
http://www.spainhomes.org

On 08/12/06, Theo Van Dinter <fe...@apache.org> wrote:
>
> On Fri, Dec 08, 2006 at 05:11:14PM +0000, kailash vyas wrote:
> > I ran spamassasin -lint local.cf and it is showing no errors
>
> fwiw, it's just "spamassassin --lint".  Adding "-D" is generally useful
> too.
>
> > After that I ran spamc -R command to run a check for the rules but it is
> not
> > reporting in the analysis
>
> Have you restarted spamd?
>
> --
> Randomly Selected Tagline:
> If your feet smell and your nose runs, you were built upside down.
>
>
>

Re: Spam assasin rules problem

Posted by Theo Van Dinter <fe...@apache.org>.
On Fri, Dec 08, 2006 at 05:11:14PM +0000, kailash vyas wrote:
> I ran spamassasin -lint local.cf and it is showing no errors

fwiw, it's just "spamassassin --lint".  Adding "-D" is generally useful too.

> After that I ran spamc -R command to run a check for the rules but it is not
> reporting in the analysis

Have you restarted spamd?

-- 
Randomly Selected Tagline:
If your feet smell and your nose runs, you were built upside down.