+ \@mids;
+}
+
+sub mids ($) {
+ my ($hdr) = @_;
+ my @mids = $hdr->header_raw('Message-ID');
+ uniq_mids(extract_mids(@mids));
+}
+
+# we allow searching on X-Alt-Message-ID since PublicInbox::NNTP uses them
+# to placate some clients, and we want to ensure NNTP-only clients can
+# import and index without relying on HTTP endpoints
+sub mids_for_index ($) {
+ my ($hdr) = @_;
+ my @mids = $hdr->header_raw('Message-ID');
+ my @alts = $hdr->header_raw('X-Alt-Message-ID');
+ uniq_mids(extract_mids(@mids, @alts));