procmail
[Top] [All Lists]

Re: Me again...

1998-10-19 15:09:14
On Mon, 19 Oct 1998, Hrothgar wrote:
Well, I got some mail today from a couple mailing lists and procmail
didn't sort it.  My .procmailrc reads:

:H:

First off, though a minor quibble, it usually is written ":0H:".

   * ^TO: .*\<discuss(_at_)nowhere\(_dot_)com\>
   * ^CC: .*\<discuss(_at_)nowhere\(_dot_)com\>
   nowhere

Depending on your version of procmail, and I recommend going to 3.11pre7,
the ^TO construct contains all of that internal to it.  I admit that this
is not well documented, but it says "`^TO_' it will be substituted by
`(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):\
(.*[^-a-zA-Z0-9_.])?)'".  What you have asked for, in your recipe, is that
anything that has a header line that starts out "TO:{space}{followed by
any characters, which are then followed by ...}<discuss(_at_)nowhere(_dot_)com 
",
should be written to the file "nowhere".  Since email is usually written
"To: xxx", most times your recipe will miss it, due to the upper case O.

I was hoping that would perform a logical OR to see if the To: or Cc:
contained the mailing list address.  Can someone tell me how to do this
right?  The man pages are confusing to me.  Thanks again...

As you can see by the regexp above, ^TO looks for To: or Cc: or Bcc:, as
well as other headers.  The single line should be sufficent.

Steve

--                                                             --
Steve Hill                                      Mountain View, CA
  Email: steveh(_at_)iname(_dot_)com                            650-961-7889
-----------------------------------------------------------------

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