procmail
[Top] [All Lists]

about procmail regex operators

2010-03-27 11:36:40
Where to get a succinct review of regex operators in procmail?

Do we have any kind of counting operator like those in perl?

example:
        \d{2} <= exactly 2 digits
     [0-9]{2} <= ditto

I want to specify a number of occurrences [a-zA-Z0-9] But the number
is too high to be able to write it out neatly, it would take probably
15-18 repeats of the regex [a-zA-Z0-9].

Maybe another approach would be to use the [^] operator?
  (untested, and no way to easily test at the moment)

  something like:  Subject:[       ][^ ]+$

The messages have very long subject lines with no spaces usually but
but always appear to have at least some high number of char. in a row
with no spc.  The [^ ] based regex would catch a very high number of
these messages.

But, a regex that looks for a higher number of word char with no space
than would be reasonable in any wanted mail would probably catch even
more of these truly nasty mails I've been getting gobs of. 
   
Who ever has been putting this nasty stuff on line has gotten more and
more tricky with the spelling of common give away foul words you'd
expect in the subject of such mails, making it more and more difficult to
catch them just looking for key words.

And of course other headers are spoofed and changed as well.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

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