From e3c3cde22f57bf16bc47c50d8f9ac02416975cd3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 27 Aug 2015 04:34:00 +0000 Subject: mid: extract Message-ID from inside '<>' This is necessary for some mailers which include comment text in in the In-Reply-To header, merely assuming there is nothing outside of '<>' as we were doing is not enough. --- lib/PublicInbox/MID.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/MID.pm') diff --git a/lib/PublicInbox/MID.pm b/lib/PublicInbox/MID.pm index 02ac7095..8ca3c579 100644 --- a/lib/PublicInbox/MID.pm +++ b/lib/PublicInbox/MID.pm @@ -12,8 +12,9 @@ sub mid_clean { my ($mid) = @_; defined($mid) or die "no Message-ID"; # MDA->precheck did more checking for us - $mid =~ s/\A\s*?\s*\z//; + if ($mid =~ /<([^>]+)>/) { + $mid = $1; + } $mid; } -- cgit v1.2.3-24-ge0c7