antispamsniper.com Forum Index antispamsniper.com
The reliable anti-spam protection
 
 FAQFAQ   SearchSearch     ProfileProfile   Log inLog in   RegisterRegister 

Black rules

 
Post new topic   Reply to topic    antispamsniper.com Forum Index -> AntispamSniper for TheBat!
View previous topic :: View next topic  
Author Message
micC



Joined: 03 Nov 2007
Posts: 12

PostPosted: Mon Nov 05, 2007 5:30 pm    Post subject: Black rules Reply with quote

Hello,

I wish to block the messages which have [SPAM] in the subject.

For example, I want block a mail with "[SPAM] CheapestRolexRep1ica! Exclusive Rep1icaWATCHES Online, buy fake designerWatches letter" in the subject.

[SPAM] is written by the anti-spam of my supplier of my address.

How to write the rule?

Thanks for your reply.
Back to top
View user's profile Send private message
vetaltm
Author


Joined: 05 Feb 2006
Posts: 661

PostPosted: Mon Nov 05, 2007 7:19 pm    Post subject: Reply with quote

The rule may look like this:
Header{Subject} =~ \[spam\]

Here is a brief manual on using the rules:
http://antispamsniper.com/art-rules.html

And this is a tool for testing the regular expressions:
http://antispamsniper.com/regexpcheck.html
Back to top
View user's profile Send private message Send e-mail
micC



Joined: 03 Nov 2007
Posts: 12

PostPosted: Mon Nov 05, 2007 7:28 pm    Post subject: Reply with quote

Thanks.

I had tried this: Header{Subject} =~ [SPAM]

but it did not work.

Could you explain why?
Back to top
View user's profile Send private message
vetaltm
Author


Joined: 05 Feb 2006
Posts: 661

PostPosted: Mon Nov 05, 2007 7:42 pm    Post subject: Reply with quote

micC wrote:

I had tried this: Header{Subject} =~ [spam]
Could you explain?

It doesn't work because the square brackets have a special meaning in regular expressions. The expression "[spam]" matches any (one) symbol from a set of symbols, listed between the brackets: "s" or "p" or "a" or "m". As you can see I've added a quote symbol '\' before each bracket to make the RegExp engine interpret them as usual, non-special symbols.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    antispamsniper.com Forum Index -> AntispamSniper for TheBat! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group