-my ($name, $email, $date);
-
-if ($train eq "ham") {
- require PublicInbox::MDA;
- require PublicInbox::Filter;
- PublicInbox::Filter->run($mime);
- ($name, $email, $date) = PublicInbox::MDA->author_info($mime);
-}
-
-my $in = $mime->as_string;
-my $err = 0;
-my @output = qw(> /dev/null > /dev/null);
-
-# n.b. message may be cross-posted to multiple public-inboxes
-foreach my $recipient (keys %dests) {
- my $dst = $pi_config->lookup($recipient) or next;
- my $git_dir = $dst->{mainrepo} or next;
- my ($out, $err) = ("", "");
+sub remove_or_add ($$$$) {
+ my ($ibx, $train, $mime, $addr) = @_;