Juergen Fiedler wrote:
> > If present, filter upon X-Envelope-To: or Delivered-To: headers.
> > Otherwise, check whether the last Received: header contains the
> > username, e.g.
> >
> > Received: from ferret.lmh.ox.ac.uk ([EMAIL PROTECTED] [163.1.138.204])
> > by server.sensei.co.uk (8.8.5/8.8.2) with SMTP id EAA23934
> > for <[EMAIL PROTECTED]>; Fri, 26 Mar 1999 04:29:43 GMT
> > ^^^^^^^^^^^^^^^^^^
> >
> > and if it does, use that.
> [...]
>
> OK... I _almost_ see how I would do that. The Received: header seems to be
> the only reliable source of information here. But I can't quite figure out
> what the recipe for such a test would have to look like.
> How do I tell procmail only to check the last Received: header?
:0
* ^Received:.*by server\.sensei\.co\.uk.*for <glynn@sensei\.co\.uk>
> How do I test for the 'for' field in the header. It seems to be some lines
> below the start of the Received: header (most of the time 2 lines below,
> but sometimes more). How do I make a condition that encompasses several
> lines? Do I need some fancy juggling with environment variables here?
Procmail automatically unfolds headers (each header is treated as a
single line).
--
Glynn Clements <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]