FlyerTalk Forums - View Single Post - Email filtering using procmail
View Single Post
Old Oct 21, 2012 | 9:15 am
  #5  
LIH Prem
 
2M
All eyes on you!
25 Years on Site
 
Join Date: Nov 2000
Location: Upcountry Maui, HI
Posts: 13,726
You need something after the From: and before the spammers email address.

Code:
:0:
* ^From:[  ]*spammer@yahoo\.com
/dev/null
inside the square brackets you want a space followed by a tab. (I couldn't type a tab here.)

That will only match [email protected] and won't inadvertently match similar email addresses that end with the same string like [email protected]

the space tab inside the square brackets followed by the asterisk matches white space, so the expression matches "From:" at the beginning of the line, followed by zero or more white space characters, followed by [email protected]

You could use .* instead of the white space expression but that could produce some extra matches.

Anyway, try that, see if it works.

-David

Last edited by LIH Prem; Oct 21, 2012 at 10:55 am
LIH Prem is offline