procmail
[Top] [All Lists]

RE: How do I capture the value of the TO header in my procmail log?

2008-06-23 12:09:23
Dallman Ross wrote Monday, June 23, 2008 8:57 PM:

S.A. Birl wrote Monday, June 23, 2008 6:59 PM:

:0
* ^Return-Path:[${WS}]*\/.*
{
        RETURNPATH=$MATCH
}

FYI, your use of $WS there will do absolutely nothing.

It's worse than that: you forgot the $ that's needed near
the start of the condition.  The $WS will never expand,
even if your syntax were useful to begin with.

   :0
   * ^Return-Path:[$WS]*\/.*
   { }

   LOG = "This is Return-Path: >$MATCH<
"

And I fell into the same trap.  (Mainly that's because
I had copied-and-pasted your condition line, then changed
it a tiny bit.


You want this instead, if your goal is not to 
capture the leading space:

   * ^Return-Path:.*\/[^$WS].*

Properly, this time:

    * $ ^Return-Path:.*\/[^$WS].*

Dallman

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