diff options
author | Eric Wong <e@80x24.org> | 2017-04-05 01:41:28 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-04-05 01:42:33 +0000 |
commit | 64cc1122d94f87badb4994518eda070d6362991e (patch) | |
tree | 0a5e0991476adb21d4f0b7439013c81294c5c672 | |
parent | 5d39caaf83799ba3a94b73463a3597c181816425 (diff) | |
download | public-inbox-64cc1122d94f87badb4994518eda070d6362991e.tar.gz |
This matches the behavior of the -watch daemon since 6d534038285ddd760709ba76ea007f9108200097 ("watch: watchspam affects all configured inboxes")
-rwxr-xr-x | script/public-inbox-learn | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/script/public-inbox-learn b/script/public-inbox-learn index 38c83243..71aa50f9 100755 --- a/script/public-inbox-learn +++ b/script/public-inbox-learn @@ -51,6 +51,18 @@ foreach my $h (qw(Cc To)) { } } +if ($train eq 'spam') { + $pi_config->each_inbox(sub { + my ($ibx) = @_; + my $git = $ibx->git; + my $name = $ibx->{name}; + my $addr = $ibx->{-primary_address}; + my $im = PublicInbox::Import->new($git, $name, $addr, $ibx); + $im->remove($mime); + $im->done; + }); +} + require PublicInbox::MDA if $train eq "ham"; # n.b. message may be cross-posted to multiple public-inboxes |