about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/InboxWritable.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/InboxWritable.pm b/lib/PublicInbox/InboxWritable.pm
index ce979ea2..f2ba21fc 100644
--- a/lib/PublicInbox/InboxWritable.pm
+++ b/lib/PublicInbox/InboxWritable.pm
@@ -157,12 +157,12 @@ my $from_strict = qr/^From \S+ +\S+ \S+ +\S+ [^:]+:[^:]+:[^:]+ [^:]+/;
 sub mb_add ($$$$) {
         my ($im, $variant, $filter, $msg) = @_;
         $$msg =~ s/(\r?\n)+\z/$1/s;
-        my $mime = PublicInbox::MIME->new($msg);
         if ($variant eq 'mboxrd') {
-                $$msg =~ s/^>(>*From )/$1/sm;
+                $$msg =~ s/^>(>*From )/$1/gms;
         } elsif ($variant eq 'mboxo') {
-                $$msg =~ s/^>From /From /sm;
+                $$msg =~ s/^>From /From /gms;
         }
+        my $mime = PublicInbox::MIME->new($msg);
         if ($filter) {
                 my $ret = $filter->scrub($mime) or return;
                 return if $ret == REJECT();