You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Christopher Martin <ch...@ebit.com.au> on 2006/10/09 05:30:11 UTC

Careful with that regex!

The English language is a complex and varied piece of work, and 
sometimes the unforeseen can happen!

For example, if you have gotten tired of having to clear out the most 
common spams from your quarantine folder you may consider using 
milter-regex in addition to Spam Assassin and your Virus app of choice. 
And those 'erectile dysfunction' ads may give you the screaming 
heeby-jeebies, so you might write a rule like:

tempfail "An unusual error"
header /^Subject$/ /[C[\!1IL]AL[\!1IL][S\$]/ei

That will kill all of that stupid spam instantly spam. And you might 
think you're home and hosed. But then, let us suggest, you are keeping a 
'tail' on /var/log /messages and notice a butch of mails about "Support 
Specialists" getting temporary rejections... You might then revise the rule:

tempfail "An unusual error"
header /^Subject$/ /[\s][C[\!1IL]AL[\!1IL][S\$]/ei


<sigh> So, don't make this hypothetical mistake that may, or may not, 
have been made by someone like me (but not me, I swear!).

Chris M

Re: Careful with that regex!

Posted by Andreas Pettersson <an...@telia.com>.
Christopher Martin wrote:

> tempfail "An unusual error"
> header /^Subject$/ /[C[\!1IL]AL[\!1IL][S\$]/ei
>
> That will kill all of that stupid spam instantly spam. And you might 
> think you're home and hosed. But then, let us suggest, you are keeping 
> a 'tail' on /var/log /messages and notice a butch of mails about 
> "Support Specialists" getting temporary rejections...


Heh, nice one :)
I once managed to write an obscure viagra regex that matched on a 
completely unrelated swedish phrase... which I don't remember now.

-- 
Andreas