procmail
[Top] [All Lists]

Re: passing MATCH

1999-08-26 07:40:39
[August 26:
S.Toms asked this last Saturday, and I responded privately because this list
kept knocking me off for others' bounces, but I had wanted to post my
response to the list.  Now I'll try to post it.]

I had previously posted,

Of course it will still bomb if the header line with the list address
contains additional text.  What you really need is to find the line in
$MAILINGLISTS that appears within an address line in the headers.

S.Toms replied,

|   Thats about how I rewrote it, the only thing missing now is instead of
| the header line being saved to LISTADDRESS, I'm looking to save the line
| that grep is searching for ...

That's what I was saying.  You need the line from your file, not the line
from the message.  Unfortunately, neither fgrep nor egrep nor grep has a
way to take a pattern list from stdin or to restrict output to the part of
the found line that matches the pattern.

| For example, grep is searching for
| address(_at_)mailing(_dot_)com and finds it in one of the headers. I want to 
have it
| then run on the following
|
| :0a
| $LISTADDRESS

You'll still need the second colon on the colon line to get a local lockfile.

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