If there are multiple messages with the same message-id (e.g. sent to nnn@
and nnn-submitter@), consider all but the first as boring.
my $xmessage = 1;
my $suppressnext = 0;
+my $found_msgid = 0;
+my %seen_msgid = ();
my $thisheader = '';
my $this = '';
$xmessage++ if ($normstate ne 'html');
$suppressnext = $normstate eq 'html';
+ $found_msgid = 0;
}
$normstate = $newstate;
$this .= $_;
} elsif ($normstate eq 'go') {
s/^\030//;
+ if (!$suppressnext && !$found_msgid &&
+ /^Message-ID: <(.*)>/i) {
+ my $msgid = $1;
+ $found_msgid = 1;
+ if ($seen_msgid{$msgid}) {
+ $suppressnext = 1;
+ } else {
+ $seen_msgid{$msgid} = 1;
+ }
+ }
if (@mail) {
push @mail, $_;
} else {
}
} elsif ($normstate eq 'go-nox') {
next if !s/^X//;
+ if (!$suppressnext && !$found_msgid &&
+ /^Message-ID: <(.*)>/i) {
+ my $msgid = $1;
+ $found_msgid = 1;
+ if ($seen_msgid{$msgid}) {
+ $suppressnext = 1;
+ } else {
+ $seen_msgid{$msgid} = 1;
+ }
+ }
if (@mail) {
push @mail, $_;
} else {