[ingo] Fwd: Re: [Tickets #4035] RESOLVED: Filtering on body with Procmail

Ben Chavet ben at horde.org
Wed Jun 14 09:32:06 PDT 2006



----- Forwarded message from jmc at coursimault.com -----
     Date: Wed, 14 Jun 2006 18:14:07 +0200
     From: Jean-Marc Coursimault <jmc at coursimault.com>
  Subject: Re: [Tickets #4035] RESOLVED: Filtering on body with Procmail
       To: ben at horde.org

> Tweaked and commited, thanks!

Thanks. But I think that removing my code to add the flags for each
condition is a mistake : that means that the "B" flag will only be
added at the start of a recipe, when you want in fact add the "B" flag
for each individual match, such as this :

14: ##### [msec] INFECTED #####
  15: :0
  16: * ^Subject:.*\[msec\]
  17: {
  18:   :0 DB
  19:   * .*INFECTED
  20:   AxperiaSARL/Admin/INFECTED\ chkrootkit
  21: }

and not

14: ##### [msec] INFECTED #####
  15: :0 DB
  16: * ^Subject:.*\[msec\]
  17: {
  18:   :0
  19:   * .*INFECTED
  20:   AxperiaSARL/Admin/INFECTED\ chkrootkit
  21: }

It took me some time to understand the addFlag / $flags stuff.

addFlag should be used for the flags to be set at the beginning of
each recipe (for example the E flag) and use the variable $flags,
which is local to each condition, to set the flag(s) for each.

I understand that it was probably not intended this way, but the fact
is that you need to have to have recipe-wide AND per-condition flags.

This way, you can have :

14: ##### [msec] INFECTED #####
  15: :0
  16: * ^Subject:.*\[msec\]
  17: AxperiaSARL/Admin/INFECTED\ chkrootkit
  18:
  19: :0 EDB
  20: * .*RootBoink \.\.\. INFECTED
  21: AxperiaSARL/Admin/INFECTED\ chkrootkit
  22:
  23: :0 EDB
  24: * .*37337Roo7\.\.\.INFECTED
  25: AxperiaSARL/Admin/INFECTED\ chkrootkit

(which is not quite a real example, but you see what I mean).

Cheers

bugs at bugs.horde.org a dit:

> DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
>
> Ticket URL: http://bugs.horde.org/ticket/?id=4035
> -----------------------------------------------------------------------
> Ticket             | 4035
> Updated By         | Ben Chavet <ben at horde.org>
> Summary            | Filtering on body with Procmail
> Queue              | Ingo
> Version            | HEAD
> -State              | Assigned
> +State              | Resolved
> Priority           | 1. Low
> Type               | Enhancement
> Owners             | Ben Chavet
> -----------------------------------------------------------------------
>
>
> Ben Chavet <ben at horde.org> (2006-06-14 08:44) wrote:
>
>
>



-- Jean Marc

----- End forwarded message -----

-------------- next part --------------
An embedded message was scrubbed...
From: Jean-Marc Coursimault <jmc at coursimault.com>
Subject: Re: [Tickets #4035] RESOLVED: Filtering on body with Procmail
Date: Wed, 14 Jun 2006 18:14:07 +0200
Size: 4148
Url: http://lists.horde.org/archives/ingo/attachments/20060614/36a84af2/attachment.mht
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: PGP Digital Signature
Url : http://lists.horde.org/archives/ingo/attachments/20060614/36a84af2/attachment.bin


More information about the ingo mailing list