about summary refs log tree commit homepage
path: root/script/public-inbox-mda
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-26 23:06:48 +0000
committerEric Wong <e@80x24.org>2016-06-26 23:06:48 +0000
commita0c07cba0e5d8b6a518e276e83477fd3892efaec (patch)
tree025c0d0b751f9ec741f0d305be3ffda7aafb7bc7 /script/public-inbox-mda
parent10d076c7731c702e70950d06d673be163aa59be9 (diff)
downloadpublic-inbox-a0c07cba0e5d8b6a518e276e83477fd3892efaec.tar.gz
Oops...

While we're at it, drop blank lines before the "From ", too,
since it could happen.
Diffstat (limited to 'script/public-inbox-mda')
-rwxr-xr-xscript/public-inbox-mda1
1 files changed, 1 insertions, 0 deletions
diff --git a/script/public-inbox-mda b/script/public-inbox-mda
index f739ad06..d76f33a8 100755
--- a/script/public-inbox-mda
+++ b/script/public-inbox-mda
@@ -32,6 +32,7 @@ use PublicInbox::Spamcheck::Spamc;
 my $emergency = $ENV{PI_EMERGENCY} || "$ENV{HOME}/.public-inbox/emergency/";
 $ems = PublicInbox::Emergency->new($emergency);
 my $str = eval { local $/; <STDIN> };
+$str =~ s/\A[\r\n]*From [^\r\n]*\r?\n//s;
 $ems->prepare(\$str);
 my $simple = Email::Simple->new(\$str);
 my $config = PublicInbox::Config->new;