procmail
[Top] [All Lists]

Re: Placing specific header into variable

2004-04-09 10:29:55
Toen wij Seth Barry kietelden, kwam er dit uit:

I've seen several examples floating around out there on how to place 
the entire header into a variable, but I need the variable to be 
filled with the value of only one header, if it exists.

var  # unset

And then use one of these:

    # including the header's name:
    :0
    * ^\/Subject[  ]*:.*
    { var = $MATCH }


    # only the header's value:
    :0
    * ^Subject[  ]*:.*\/[^  ].*
    { var = $MATCH }


The [  ] and [^  ] both contain a space and a tab.


Certain headers need specific tricks, so which header are you 
targetting?

-- 
Grtz, Ruud

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