We will scrub for importing archives, so ensure it is usable
outside of the delivery routine.
sub err ($) { $_[0]->{err} }
+# by default, scrub is a no-op, see PublicInbox::Filter::Vger::scrub
+# for an example of the override
+sub scrub {
+ my ($self, $mime) = @_;
+ $self->ACCEPT($mime);
+}
+
# for MDA
sub delivery {
my ($self, $mime) = @_;
push @r, 'Rejected suffixes(s): '.join(', ', sort keys %sfx);
}
- @r ? $self->reject(join("\n", @r)) : $self->ACCEPT;
+ @r ? $self->reject(join("\n", @r)) : $self->scrub($mime);
}
1;
# only LKML had this, and LKML nowadays has no list trailer since Jan 2016
my $l4 = qr!Please read the FAQ at +http://www\.tux\.org/lkml/!;
-sub delivery {
+sub scrub {
my ($self, $mime) = @_;
my $s = $mime->as_string;
$self->ACCEPT($mime);
}
+sub delivery {
+ my ($self, $mime) = @_;
+ $self->scrub($mime);
+}
+
1;