[lug] Procmail Recipe to Match High-ASCII Characters?

Bill Thoen bthoen at gisnet.com
Thu Feb 8 11:19:09 MST 2007

Is there a regex that can match a range of high-ascii characters? I'm 
trying to write a procmail recipe that can tell if a mail message's 
Subject: line contains 25% or more non-english characters and tag it as 
potential spam.

Or should I reverse the logic and tag the message as spam if 25% of the 
characters are not in the desired range (e.g. [^0-9 A-Za-z]). Then, of 
course, I need to be able to count the total number of characters in the 
line and the total number of characters that match/don't match the 
filter. Can I do this with Procmail, or is there an easier way catch 
non-english mail?

- Bill Thoen

More information about the LUG mailing list