about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/Mbox.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm
index bc4d639e..332e89a7 100644
--- a/lib/PublicInbox/Mbox.pm
+++ b/lib/PublicInbox/Mbox.pm
@@ -42,7 +42,11 @@ sub emit_msg {
 
         $buf = $simple->body;
         $simple->body_set('');
-        $buf =~ s/^(From )/>$1/gm;
+
+        # mboxrd quoting style
+        # ref: http://www.qmail.org/man/man5/mbox.html
+        $buf =~ s/^(>*From )/>$1/gm;
+
         $buf .= "\n" unless $buf =~ /\n\z/s;
 
         $fh->write($buf);