procmail
[Top] [All Lists]

extracting fields with formail

1999-05-13 18:49:12
I am trying to extract fields using formail. I am using the procmail 3.13.1
distribution. For example, I'd like to extract the Subject: field from the
following message, but as long as I have the "Received" lines in there, I
can't extract it. If I delete from the first Received line to the line before
the Message-ID, it works fine. How do I get it to work? Most of my mail comes
with Received headers.

Any help would be appreciated.

Bob


My test command is:

1> cat amail | formail -x Subject:

My file "amail" is:

From test(_at_)test(_dot_)com  Wed May 12 23:46:45 1999
Received: from localhost (rberman(_at_)boomer(_dot_)mindspring(_dot_)com 
[127.0.0.1])
by boomer.mindspring.com (8.9.1/8.9.3) with ESMTP id XAA09011
for <rberman(_at_)localhost>; Wed, 12 May 1999 23:46:44 -0400
Received: from pop.mindspring.com
by localhost with POP3 (fetchmail-4.7.7)
for rberman(_at_)localhost (single-drop); Wed, 12 May 1999 23:46:44 -0400 (EDT)
Received: from hopper.otherco.com ([207.204.138.66])
by mx9.mindspring.com (Mindspring Mail Service) with SMTP id rjkark.g4.37kbi17
for <rjberman(_at_)mindspring(_dot_)com>; Wed, 12 May 1999 21:31:31 -0400 (EDT)
Received: by HOPPER with Internet Mail Service (5.5.2448.0)
id <KZGX2BCL>; Wed, 12 May 1999 21:23:24 -0400
Message-ID: <132DA07C2253D2119B1C00E02924366001971242(_at_)HOPPER>
From: TestMsg <TestMsg(_at_)test(_dot_)com>
To: "'rjberman(_at_)mindspring(_dot_)com'" <rjberman(_at_)mindspring(_dot_)com>
Subject: This is a subject line
Date: Wed, 12 May 1999 21:23:18 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain

Test of formail



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