diff options
author | Eric Wong <e@80x24.org> | 2016-04-09 01:27:37 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-04-09 01:27:37 +0000 |
commit | dea396ae54867cc901d586c8af70d5f9fc14f1a8 (patch) | |
tree | a8c3c50daaf1f71381bb270958370e482d7b2942 /script | |
parent | 7e575fda2b05ae616530457e3ce2e6a7f6f47ee2 (diff) | |
download | public-inbox-dea396ae54867cc901d586c8af70d5f9fc14f1a8.tar.gz |
It can confuse Email::MIME if we have it.
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-learn | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/script/public-inbox-learn b/script/public-inbox-learn index 0c7b4199..81675d02 100755 --- a/script/public-inbox-learn +++ b/script/public-inbox-learn @@ -17,7 +17,12 @@ if ($train !~ /\A(?:ham|spam)\z/) { } my $pi_config = PublicInbox::Config->new; -my $mime = Email::MIME->new(eval { local $/; <> }); +my $mime = Email::MIME->new(eval { + local $/; + my $data = scalar <STDIN>; + $data =~ s/\AFrom [^\r\n]*\r?\n//s; + $data +}); # get all recipients my %dests; |