procmail
[Top] [All Lists]

Regex syntax for From: (numbers)@domain (was: Unidentified subject!)

1997-09-01 08:11:24
On Mon, 1 Sep 1997 10:04:52 -0400 (EDT), 0123456789(_at_)filterthis(_dot_)edu
wrote:
I tried to puzzle out the regular expression syntax but could not find a
way to detect 'everything between From: and @ is all numbers'

You just missed a good discussion about it. 

Here's how to write what you mention in Procmail regex syntax:

    :0
    * ^From: [0-9]+@
    /dev/null  # or whatever

I believe you'll find that most of the spam of this type has exactly
eight digits in the user ID part, and typically doesn't contain the
domain (the stuff after @) anywhere in the Received: lines (although
this would be the case with legitimate mail from e.g. iki.fi also). 

/* era */

Perhaps you want to look in the archives: 
  <http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/>

Beginners' texts about regular expressions are easy to find. Most
"Unix for spineless amphibians" -type titles that the bookstores are
full of these days should have a section on regexes.

-- 
 Paparazzis of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

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