I've got a file which 'file' reports as "lostmail: ASCII mail text, with
very long lines".
As I posted here yesterday, fetchmail was choking on ill-formed headers,
which research suggested was actually exim puking and fetchmail handling
the situation...ungracefully (fetchmail should, and may? have the option
to simply delete or bounce such mails).
Research suggested a fix was to use procmail as an MDA directly, rather
than exim (the local MTA). This should reduce load on the local box
anyway as this bypasses a redundent Spamassassin pass. So I edited
/etc/fetchmailrc and added the line 'with mda "/usr/bin/procmail".
Of course, the problem is, that this procmail process runs as the user
fetchmail is running as. Though I'm somewhat relieved I didn't lose
1107 messages, totalling 34 MiB, I'm not quite sure what to do with the
resulting file.
(BTW, the fix, I suppose, is to run a user-mode fetchmail process, not a
system daemon).
Mutt doesn't recognize it as any known mbox format. I believe it's
largely what fetchmail receives. The format is:
A line reading "Status: U"
A "Return-Path:" header.
Subsequent RFC 822 headers.
Message body.
Sample:
Status: U
Return-Path: <garycusuma1@rediffmail.com>
Received: from popd.ix.netcom.com [207.217.120.162]
by localhost with POP3 (fetchmail-6.2.3)
for karsten@localhost (single-drop); Wed, 20 Aug 2003 02:25:24 +0100 (BS
T)
Received: from azhg1483.com ([216.139.181.133])
by killdeer (EarthLink SMTP Server) with SMTP id 19Pf8U32y3NZFlr0
for <kmself@ix.netcom.com>; Tue, 19 Aug 2003 15:39:53 -0700 (PDT)
From: "MR GARY CUSUMA" <garycusuma1@rediffmail.com>
Reply-To: garycusuma1@netscape.net
To: kmself@ix.netcom.com
Date: Tue, 19 Aug 2003 23:40:14 +0100
Subject: URGENT AND CONFIDENTIAL
X-Mailer: Microsoft Outlook Express 5.00.2919.6900 DM
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Message-Id: <200308191539.19Pf8U32y3NZFlr0@killdeer>
FROM=3AGARY CUSUMA
My question is: how can I wrangle this file into a format that's
further processable? I've tried with mutt, formail simply spits out a
single, somewhat large mail message (all 34 MiB ;-).
Suggestions welcomed.
Peace.
--
Karsten M. Self <kmself@ix.netcom.com> http://kmself.home.netcom.com/
What Part of "Gestalt" don't you understand?
The golden rule of technical design: complexity is the enemy.
Attachment:
pgpvzjb9Dvm3M.pgp
Description: PGP signature