procmail
[Top] [All Lists]

Capture MATCH?

2001-07-16 13:15:59
Hello all:

I want to grab some incoming mail, add a header if a condition is met, then forward it to an internal exchange server. I can do this if I put in a recipe for each user, but would like to just have one rule that captures the user name. Below is what I have been working on. The problems with this are: 1. obviously I can not do a variable assignment inside of a recipe........should I write a scribe that would assign the variable and pipe it through it......any other ideas? 2. my first \/ is grabbing everything after "To: " and not stopping at the @ sign, so even if I could capture it, it still contains the wrong data.

:0BH
 * ^To: \/(_dot_)*(_at_)externalserver(_dot_)mysite(_dot_)org
 USER=$MATCH
 * ^Content-(Type|Disposition):.*name=.*\.\/(exe|com|zip|vbs|shs|hta|scr|chm)
 {
        :0f
        | formail -I "X-VIRUSWARNING: This file had a $MATCH attachment"
        ! $USER(_at_)internalserver(_dot_)mysite(_dot_)org
 }


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