9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rsc@swtch.com (Russ Cox)
Subject: [9fans] Unescaped "From" in mail items
Date: Sun, 20 Jul 2008 03:31:07 -0400	[thread overview]
Message-ID: <20080720072831.BA0FC1E8C1F@holo.morphisms.net> (raw)
In-Reply-To: <kgrlk5yeiqg.fsf@w-cl28-g34-c.its.monash.edu.au>

> Date: Tue Feb  5 23:56:46 EST 2008
>
> I've just been archiving a bunch of old email that was sitting in IMAP
> folders on a unix system somewhere into local folders on a plan9 system.
> I used acme mail to access the remote IMAP folder then save the items I
> wanted to local folders.
>
> Some of these have an unescaped "^From" in the text, which seems to have
> caused problems when I've saved them to the local mail folders.

This is acme mail's fault.  The easiest fix is to change
/acme/mail/src/mesg.c to do two writes: first use write
to write the header, and then use write2 to write the body
(write2 is in reply.c and knows how to escape From).
You'll probably also want to make write2 return whether
or not it succeeded.

Russ




  parent reply	other threads:[~2008-07-20  7:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-11  8:51 [9fans] 'From' in outgoing mail considered harmful Richard Miller
2008-02-06  5:50 ` [9fans] Unescaped "From" in mail items Adrian Tritschler
2008-02-06  9:57   ` erik quanstrom
2008-07-20  7:31   ` Russ Cox [this message]
2008-07-22  1:21     ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080720072831.BA0FC1E8C1F@holo.morphisms.net \
    --to=rsc@swtch.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).