return $self->{lei}->child_error(1 << 8, <<"");
error reading $name: $!
+ # mutt pipes single RFC822 messages with a "From " line,
+ # but no Content-Length or "From " escaping.
+ # "git format-patch" also generates such files by default.
+ $buf =~ s/\A[\r\n]*From [^\r\n]*\r?\n//s;
$self->eml_cb(PublicInbox::Eml->new(\$buf), @args);
} else {
# prepare_inputs already validated $ifmt
lei_ok(qw(import -F eml), 't/data/message_embed.eml',
\'import single file by path');
+lei_ok(qw(q m:testmessage@example.com));
+is($lei_out, "[null]\n", 'no results, yet');
+my $oid = '9bf1002c49eb075df47247b74d69bcd555e23422';
+my $eml = eml_load('t/utf8.eml');
+my $in = 'From x@y Fri Oct 2 00:00:00 1993'."\n".$eml->as_string;
+lei_ok([qw(import -F eml -)], undef, { %$lei_opt, 0 => \$in });
+lei_ok(qw(q m:testmessage@example.com));
+is(json_utf8->decode($lei_out)->[0]->{'blob'}, $oid,
+ 'got expected OID w/o From');
+
my $str = <<'';
From: a@b
Message-ID: <x@y>