- my $mime = Email::MIME->new(eval { local $/; <$fh> });
- my $hdr = $mime->header_obj;
-
- # gmane rewrites Received headers, which increases spamminess
- # Some older archives set Original-To
- foreach my $x (qw(Received To)) {
- my @h = $hdr->header_raw("Original-$x");
- if (@h) {
- $hdr->header_set($x, @h);
- $hdr->header_set("Original-$x");
- }
- }
-
- # Approved triggers for the SA HEADER_SPAM rule,
- # X-From is gmane specific
- foreach my $drop (qw(Approved X-From)) {
- $hdr->header_set($drop);
- }
-
- # appears to be an old gmane bug:
- $hdr->header_set('connect()');