diff options
author | Eric Wong <e@80x24.org> | 2018-04-19 22:42:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2018-04-19 22:43:03 +0000 |
commit | ddb61e55bc645975063673f346fceb96be7b2d70 (patch) | |
tree | 67e0a446c890d113e8a28d593a0777c4256ed418 /lib/PublicInbox/Filter/RubyLang.pm | |
parent | 03c7d76f08b78d43452463d95dcf3a38fb9c8bfe (diff) | |
download | public-inbox-ddb61e55bc645975063673f346fceb96be7b2d70.tar.gz |
I suppose it's a bug or inconsistency that altid is write-only and their deletions do not get reflected. But for now, we do not set it when training spam so there's no window where an invalid NNTP article number shows up. This should solve the problem where there's massive gaps in messages solved by spam training for ruby groups: https://public-inbox.org/meta/20180307093754.GA27748@dcvr/
Diffstat (limited to 'lib/PublicInbox/Filter/RubyLang.pm')
-rw-r--r-- | lib/PublicInbox/Filter/RubyLang.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Filter/RubyLang.pm b/lib/PublicInbox/Filter/RubyLang.pm index cb69e38a..a43d67a9 100644 --- a/lib/PublicInbox/Filter/RubyLang.pm +++ b/lib/PublicInbox/Filter/RubyLang.pm @@ -30,7 +30,7 @@ sub new { } sub scrub { - my ($self, $mime) = @_; + my ($self, $mime, $for_remove) = @_; # no msg_iter here, that is only for read-only access $mime->walk_parts(sub { my ($part) = $_[0]; @@ -43,7 +43,7 @@ sub scrub { } }); my $altid = $self->{-altid}; - if ($altid) { + if ($altid && !$for_remove) { my $hdr = $mime->header_obj; my $mids = mids($hdr); return $self->REJECT('Message-ID missing') unless (@$mids); |