procmail
[Top] [All Lists]

Re: Fixing mail format to RFC 822

1999-09-30 03:16:46
On Thu, 30 Sep 1999 12:00:07 +0200 (MET DST), Martin Mokrejs
<mmokrejs(_at_)natur(_dot_)cuni(_dot_)cz> wrote:
I have a simple question. How can I fix mailbox format from some
unknown to RFC 822 style? Even better, how can I determine in which
mail format is it?

Uhm, "from some unknown format" sounds pretty vague :-)

The file is at http://www.natur.cuni.cz/~mmokrejs/krb4.txt

Something seems to have changed the From_ line of the first message
and all the subsequent ones to >From -- it's basically Berkeley mbox
format, but it needs a slight repair.

The file is big and I haven't looked whether it contains any invalid
quoted From_ lines which shouldn't be converted back. You may have to
change some messages by hand (you would see a message being snipped in
the middle followed by a new message with very mysterious-looking
headers if a >From shouldn't have been changed back).

  sed -e 's/^>From/From/' krb4.txt >new.mbox

Then read the mail from new.mbox. (If you can -- the text appears to
be in Swedish :-)

Probably someone sent you a huge mailbox as the body of a message and
told you to just save the body and read it as a normal mailbox? This
usually doesn't work, you have to use some sort of transfer encoding
(quoted-printable is usually fine, although it's ugly, or tar+gz the
file and send the resulting binary as an attachment) to hide the From_
lines from the mail transport layer. (If you don't know what the heck
a From_ line is, the FAQ has a brief explanation. You can find it at
<http://www.iki.fi/era/procmail/mini-faq.html> ... obPlug.)

Hope this helps,

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

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