procmail
[Top] [All Lists]

Re: No good spamming bastards are using new tricks to get by the filters

2003-01-19 22:42:14
On 01/20/03 04:29 AM, Tony L. Svanstrom sat at the `puter and typed:
On Sun, 19 Jan 2003 the voices made Louis LeBlanc write:

LL> :0B:
LL> * -2^0
LL> * B ? 1^0 (<)!--
LL> | formail -Y -f -A "X-Spammer: HTML Comments out the wazoo"
LL> :0A
LL> { FOLDER=spam }
LL>
LL> Any help there?

 Why don't you test your recipes first, and then ask for help if they're not
working? Or if you're getting a result that you didn't expect, ask your
question along with a cpl of lines from your logs; logs that would have a 
great
deal to tell you about that recipe above, and the manuals (for formail and
procmail) will be of great help figuring out what flags you should be using
how.

A perfectly valid point.  Well then, the above recipe did not catch a
message with the following content in the message:

testing
<!--junk-->
<!--junk-->
<!--junk-->

Since I have my procmail filters dump everything out to a log file,
this is what they said about this particular recipes efforts:

procmail: Score:      -2      -2 ""
procmail: No match on "B ? 1^0 (<)!--"

So, it looks to me like '* B ? 1^0 (<)!--' isn't the right formula.  I tried
adjusting it to the following:

:0B:
* -2^0
* 1^0 (<)!--
| formail -Y -f -A "X-Spammer: HTML Comments out the wazoo"
:0A
{ FOLDER=spam }

But it only changed things a little.  The logfile showed this:
procmail: Score:      -2      -2 ""
procmail: Score:       1      -1 "(<)!--"

So I did a little more reading, and came up with this:

:0B
* -2^0
* 1^1 (<!--)
| formail -Y -f -A "X-Spammer: HTML Comments out the wazoo"
:0A
{ FOLDER=spam }

I'm definitely getting closer:
procmail: Score:      -2      -2 ""
procmail: Score:       3       1 "(<!--)"
procmail: Assigning "LASTFOLDER=formail -Y -f -A X-Spammer: HTML
Comments out the wazoo"
 Subject: testing <!--junk-->
  Folder: formail -Y -f -A X-Spammer: HTML Comments out the wazoo       1032
procmail: Executing "formail,-Y,-f,-A,X-Spammer: HTML Comments out the wazoo"

I'm finally figured out what the problem is.  I needed to specify the
recipe as a filter.  Simple enough to add the 'f' after ':0B'.  Now it
does exactly as expected.  And even better, it counts every instance
of '<!--' regardless of how many are on a line.  Later, I'll add a
condition to make sure it only goes after HTML mail.

Thanks
Lou
-- 
Louis LeBlanc               leblanc(_at_)keyslapper(_dot_)org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     ԿԬ

Chemistry professors never die, they just fail to react.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


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