X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=scripts%2Fssoma-replay;h=cfb0fbd91ff215f2c895443bdab0c2592bca4966;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=46b15d7eb185d26d98304424fc33567dcdda2e34;hpb=95bdac7f09c69036efed537a4d03d5bdd2ae4eb6;p=public-inbox.git diff --git a/scripts/ssoma-replay b/scripts/ssoma-replay index 46b15d7e..cfb0fbd9 100755 --- a/scripts/ssoma-replay +++ b/scripts/ssoma-replay @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright (C) 2015-2020 all contributors +# Copyright (C) 2015-2021 all contributors # License: AGPL-3.0+ # # A work-in-progress, but one day I hope this script is no longer @@ -30,10 +30,7 @@ use Email::Simple; use URI::Escape qw/uri_escape_utf8/; use File::Temp qw/tempfile/; my ($fh, $filename) = tempfile('ssoma-replay-XXXXXXXX', TMPDIR => 1); -my $msg = eval { - local $/; - Email::Simple->new(); -}; +my $msg = Email::Simple->new(do { local $/; }); select $fh; # Note: the archive URL makes assumptions about where the @@ -52,7 +49,7 @@ if (defined $list_id) { if (defined $domain) { $archive_url = "https://$domain/$user/"; my $mid = $header_obj->header('Message-Id'); - if ($mid =~ /\A<(.+)>\z/) { + if ($mid =~ /<[ \t]*([^>]+)?[ \t]*>/s) { $mid = $1; } $mid = uri_escape_utf8($mid,