On Sun, Apr 29, 2007 at 08:13:45PM +0300, Udi Mottelo wrote:
On Sun, 29 Apr 2007, Michelle Konzack wrote:
since some days I am hit by nearly 17.000 One-Word-Spams per day over
the Debian BTS and Other Mailinglists.
Now I have following Recipe which catch this shit:
----[ '/home/michelle.konzack/.procmail/FLT_oneword' ]-------------------
####################################################################
# FLT_oneword
####################################################################
WORDS=`formail -I "" |sed '/^-- /,$d' |wc --words`
Or save one command:
WORDS=`sed -n '1,/^-- /p' |wc --words`
you can count the words inside the procmail:
:0 b
* -2^0
* 1^1 ()\>+
{
CW=$=
:0
* CW ?? ^^[1]^^
.ATTENTION.FLT_oneword/
}
Well, okay, but this all seems rather silly to me. The goal
is to see if there's more than one word in the body. I'd
do it something like this:
#-------------------------
SPACE = ' '
TAB = ' '
WS = $SPACE$TAB
:0 B
* $ [^$WS][$WS]+[^$WS]
.ATTENTION.FLT_oneword/
#-------------------------
And by the way, Udi, I think your b-flag is wrong there.
I believe you want B.
--
dman
____________________________________________________________
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