Re: Procmail virus filtering
From: Jonas Anden (dajudge@home.se)Date: 12/06/01
- Previous message: Jim Meier: "Re: Outgoing connection to port 6000 from port 25..."
- In reply to: Richard Garand: "Procmail virus filtering"
- Next in thread: Richard Garand: "Re: Procmail virus filtering"
- Next in thread: Michael Rowe: "Re: Procmail virus filtering"
- Reply: Richard Garand: "Re: Procmail virus filtering"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Jonas Anden <dajudge@home.se> To: Richard Garand <richard@garandnet.net> Date: 06 Dec 2001 08:11:33 +0100
> :0
> * "gone.scr"
> /var/spool/infectedmail
> I tried manually egreping the message (I saw a mention of procmail passing
> the recipe string to egrep in the manpage), and the second one matched two
> lines, so why doesn't procmail match at least the second rule?
I see three problems with the rule:
1. You need to remove the quotation marks. The actual mail doesn't
include the quotation marks (at least not on both sides of the
filename), and egrep filters out the quotation marks when it finds a
matching pair at the start and end of a regexp.
2. You are egrepping the header. By default, the rules only scan the
headers for information (this is a whole lot faster, and most of the
time this is what you want). You need to add the 'B' flag to the rule to
say 'egrep the body'.
3. In addition to that, you need to prepend the '.' with a '\'. The dot
is the 'any' key of regexp which will match anything. The string
"gone.scr" will match, but so will the string "goneascr".
Try this for a rule:
:0 B :
* name=gone\.scr"
/var/spool/infectedmail
Hint: 'man procmailrc' gives lots of tips, 'man procmailex' gives lots
of examples.
// J
- Previous message: Jim Meier: "Re: Outgoing connection to port 6000 from port 25..."
- In reply to: Richard Garand: "Procmail virus filtering"
- Next in thread: Richard Garand: "Re: Procmail virus filtering"
- Next in thread: Michael Rowe: "Re: Procmail virus filtering"
- Reply: Richard Garand: "Re: Procmail virus filtering"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|