diff options
author | Eric Wong <e@80x24.org> | 2015-08-23 00:02:35 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-08-23 00:02:53 +0000 |
commit | 76ce9fbacfd29e19b47aeba786daca20b2b01117 (patch) | |
tree | 733d612a8ba8ed4bd75c9825fcd8f20a50884768 /lib/PublicInbox/Mbox.pm | |
parent | f1747921cf00e251ea0d814d732fb8c9dc9e39cd (diff) | |
download | public-inbox-76ce9fbacfd29e19b47aeba786daca20b2b01117.tar.gz |
This redundantly quotes >From from to prevent losing information as described by qmail
Diffstat (limited to 'lib/PublicInbox/Mbox.pm')
-rw-r--r-- | lib/PublicInbox/Mbox.pm | 6 |
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); |