[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: format and output all received: lines in an e-mail message
From: |
Valdis Klētnieks |
Subject: |
Re: format and output all received: lines in an e-mail message |
Date: |
Wed, 20 Nov 2019 13:16:31 -0500 |
On Wed, 20 Nov 2019 10:41:34 +0530, Greg Minshall said:
> hi. i'd like first, of course, to thank you all for nmh!
>
> then, i'd like to use something like fmttest(1) to print out all the
> "Received:" lines in an e-mail message. ideally, each "Received:" line
> would come out on a separate line; less ideally, but i'm sure very
> practical, a very long line would come out, with some odd ascii code
> separating the individual lines.
Well.... in the "not using mh tools at all" category, if you have procmail
installed, you can just use:
[~] cat Mail/inbox/1 | formail -c -x Received
from localhost (localhost [127.0.0.1]) by turing-police.cc.vt.edu
(8.12.6.Beta1/8.12.6.Beta1) with ESMTP id g86N6Pbs020540 for
<valdis@localhost>; Fri, 6 Sep 2002 19:06:25 -0400
from fan.cc.vt.edu [198.82.161.8] by localhost with POP3
(fetchmail-5.9.0) for valdis@localhost (single-drop); Fri, 06 Sep 2002
19:06:25 -0400 (EDT)
from dagger.cc.vt.edu ([10.1.1.11]) by gkar.cc.vt.edu (Sun Internet Mail
Server sims.3.5.2001.05.04.11.50.p10) with ESMTP id <address@hidden> for
valdis@sims-ms-daemon; Fri, 6 Sep 2002 19:05:21 -0400 (EDT)
from mail01.corp.tellme.com (mail01.corp.tellme.com [209.157.157.98]) by
dagger.cc.vt.edu (Mirapoint Messaging Server MOS 3.2.0-GA) with ESMTP id
AQM10446; Fri, 06 Sep 2002 19:05:20 -0400 (EDT)
from mail01.corp.tellme.com (localhost [127.0.0.1]) by localhost.tellme.com
(Postfix) with ESMTP id 1EE5744BDD for <address@hidden>; Fri, 06 Sep 2002
16:05:19 -0700 (PDT)
from dhcp157-180.corp.tellme.com (dhcp157-180.corp.tellme.com
[209.157.157.180]) by mail01.corp.tellme.com (Postfix) with ESMTP id
A6F5444BDA for <address@hidden>; Fri, 06 Sep 2002 16:05:18 -0700 (PDT)
(Note that this returns the *values* of the lines, not the line.
| sed -e 's/^/Received: /' if that matters to you.
pgpe9Rj1YULdC.pgp
Description: PGP signature
Re: format and output all received: lines in an e-mail message, Andy Bradford, 2019/11/21