procmail
[Top] [All Lists]

Re: whitespace regex

2001-10-26 14:02:04

Hiya.

Your use of brackets is a little odd.  I don't think you want to be
matching everything those rules will match.  Something more along the
lines of:

:0:
* ^Subject:.*\ \ \ \ \ [^\ ]*$
spam

would likely be more appropriate.  The regexp is actually just matching
the last five spaces on the line which are followed by non-spaces until
the end of the line.  I have rules like this, along with a large pile of
others protecting me from spam downloadable at
http://www.it.ca/software/procmail-spamtrap .  With that file on an
INCLUDE line in your procmailrc, you can file spam with:

        :0:
        * ^X-spamtrap:
        spamtrap

Enjoy.


On Fri, Oct 26, 2001 at 01:24:08PM -0400, S. Morgan Friedman wrote:


hi all -

i've noticed that a significant amount of spam i receive contain, in the 
subject line, after a spam-style subject message ("FREE MONEY"!), a whole 
string of black white spaces, often followed by a few letters or sometimes 
letters.

so i wrote a little procmail command that i hoped would put into the folder 
all mail that, in the subject line, contained over six-ish white spaces (no 
personal e-mail i receive ever contains so many), followed by a number(s). 
so i wrote the following:

:0:
* ^Subject.*([        ]+[0-9]+)
spam

this didn't work and i then tried variations such as:

:0:
* ^Subject.*([\ \ \ \ \ \ \ \ ]+[0-9]+)
spam

(very clunky, i know) but all to no avail. reading the literature i found 
online hasn't proved helpful, nor the archives to the procmail mailing 
lists i found.

does anyone have any suggestions on how to modify this code so as recognize 
the whitespace? thanks! :)

-morgan

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
  IT Canada                                            http://www.it.ca/

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>