procmail
[Top] [All Lists]

Re: Virus protection.

2001-02-27 16:43:47
Sean advised Zvika,

| # Various .VBS, .BAT, and .PIF virus/worms/trojans
| :0:
| * 9876543210^0 ^Content-[-a-z0-9_]+:.*="?[^"]*\.(vbs|bat|pif)
| * 9876543210^0 B ?? ^Content-[-a-z0-9_]+:.*($[  ].*)*="?[^"]*\.(vbs|bat|pif)
| $MAILDIR/infected.mbx

explaining,

| The scoring is used here to say "if we found it in the header, don't bother
| wasting the cycles to look for it in the body."

If there is no weight on the recipe (or the "x" value of the weight is 0),
the condition is an unnegated regexp, and procmail finds a match, doesn't it
declare the condition a match and stop looking through the rest of the search
area?

As I understand, it does, so

 # Various .VBS, .BAT, and .PIF virus/worms/trojans
 :0HB:
 * ^Content-[-a-z0-9_]+:.*="?[^"]*\.(vbs|bat|pif)
 $MAILDIR/infected.mbx

should accomplish the same thing with the same efficiency, plus the addi-
tional efficiency of having far less rcfile text to slog through.

Philip?

_______________________________________________
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>