about summary refs log tree commit homepage
path: root/lib/PublicInbox/WatchMaildir.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-04-19 22:42:05 +0000
committerEric Wong <e@80x24.org>2018-04-19 22:43:03 +0000
commitddb61e55bc645975063673f346fceb96be7b2d70 (patch)
tree67e0a446c890d113e8a28d593a0777c4256ed418 /lib/PublicInbox/WatchMaildir.pm
parent03c7d76f08b78d43452463d95dcf3a38fb9c8bfe (diff)
downloadpublic-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/WatchMaildir.pm')
-rw-r--r--lib/PublicInbox/WatchMaildir.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm
index 7ee29da5..10dc6184 100644
--- a/lib/PublicInbox/WatchMaildir.pm
+++ b/lib/PublicInbox/WatchMaildir.pm
@@ -126,7 +126,8 @@ sub _remove_spam {
                         my $im = _importer_for($self, $ibx);
                         $im->remove($mime, 'spam');
                         if (my $scrub = $ibx->filter) {
-                                my $scrubbed = $scrub->scrub($mime) or return;
+                                my $scrubbed = $scrub->scrub($mime, 1);
+                                $scrubbed or return;
                                 $scrubbed == REJECT() and return;
                                 $im->remove($scrubbed, 'spam');
                         }