procmail
[Top] [All Lists]

Re: Setting variables based on header content? (Is it possible?)

1997-05-25 23:41:00
On Sun, 25 May 1997 13:59:30 -0700 (PDT),
Joseph Stein <joes(_at_)spiritone(_dot_)com> wrote:
I would like to write a recipe to "improve on" this:
:0
* ^Subject: .*cvs-all-digest
| formail +1 -a "Message-Id: " -a "Sender: 
owner-cvs-all(_at_)freebsd(_dot_)org" -ds >>F/cvs
so that I could copy the Message-Id: line from the digest message into
each of the bursted messages.

(Why?)

Is that possible?
How?  I've tried all the magic I can think of (pipes, etc) but nothing seems
to do what I wish to accomplish.

The following is off the top of my head but ought to work for all
messages which +have+ a Message-id:

    :0:  # tsk tsk, don't forget to lock
    * ^Subject:.*cvs-all-digest
    * ^\/Message-Id:.*
    | formail +1 -a "$MATCH" -a "Sender: owner-cvs-all(_at_)freebsd(_dot_)org" 
-ds >>F/cvs

Matching merely on the Subject seems a bit fragile to me, but it's
your mail :-)

Hope this helps,

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

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