+ \@mids;
+}
+
+sub mids ($) {
+ my ($hdr) = @_;
+ my @mids = $hdr->header_raw('Message-ID');
+ uniq_mids(extract_mids(@mids));
+}
+
+# for Resent-Message-ID and maybe others
+sub mids_in ($@) {
+ my ($eml, @headers) = @_;
+ uniq_mids(extract_mids(map { ($eml->header_raw($_)) } @headers));
+}
+
+# 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 ($) {
+ mids_in($_[0], qw(Message-ID X-Alt-Message-ID));