From mboxrd@z Thu Jan 1 00:00:00 1970 From: rsc@swtch.com (Russ Cox) Date: Sun, 20 Jul 2008 03:31:07 -0400 Subject: [9fans] Unescaped "From" in mail items In-Reply-To: Message-ID: <20080720072831.BA0FC1E8C1F@holo.morphisms.net> Topicbox-Message-UUID: ed17aa7e-ead3-11e9-9d60-3106f5b1d025 > 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