procmail
[Top] [All Lists]

Re: Help with multi-line matching.

2007-06-06 16:15:53
On Wed, Jun 06, 2007 at 07:19:04PM +0200, Dallman Ross wrote:
On Wed, Jun 06, 2007 at 09:17:44AM -0700, Ray Van Dolson wrote:
I have tried a number of different recipes to match on this, and am
currently using the following:

:0
* ^List-Id: .*$^[        ]*<fedora-devel-list.redhat.com>
${MAILDIR}.fedora-devel-list/

Procmail unfolds header lines automatically.  You are never going
to match on a header with two, let alone one, linefeeds in it.
(Both $ and ^ represent linefeeds in your condition.)

Ah, I didn't realize this.  I swear I did read through the manpage!
Good to know. :)

Here's what I'd do:

  :0
  * ^List-Id:(.*\<)?fedora-devel-list[.]redhat[.]com\>
  ${MAILDIR}.fedora-devel-list/

Or even:

  :0
  * ^List-Id:(.*\<)?\/[a-z-]+[.]
  * MATCH ?? ^^\/[a-z-]+
  $MAILDIR.$MATCH/

to match automatically on various lists with similar syntax.

These did indeed work.  Thanks much for the detailed explanation as
well.  Much appreciated.

Ray
____________________________________________________________
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

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