Bug 60310

Summary: Inconsistent 'From ' escaping
Product: Apache httpd-2 Reporter: Sebb <sebb>
Component: mod_mboxAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 2.4.20   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.1   

Description Sebb 2016-10-27 10:04:49 UTC
Body text lines starting with 'From ' need to be escaped in mbox files otherwise they may be mistaken for the message separator.

On display, the lines need to be unescaped.

The simplest way to do this is to convert 'From ' to '>From ' on output, and reverse the process when reading the file.

However this does not preserve text lines starting with '>From '.
So a variant of this is to add another '`>' to lines starting with one or more '>' followed by 'From '.

mod_mbox only adds a single '>' to 'From ' lines.
It does not unescape on display.

So the display of such messages is always wrong, as is the raw message.

The contents of the mbox file is wrong for messages containing '>From '