X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FFilter%2FBase.pm;h=f6355e1b9daea96ad3b91b3d697aa0ca46d2f692;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=b2bb14620667f5ae65ef6ee5d3c527271795b3a4;hpb=0f481af87d4dfca6599eac74690f8624025c80f6;p=public-inbox.git diff --git a/lib/PublicInbox/Filter/Base.pm b/lib/PublicInbox/Filter/Base.pm index b2bb1462..f6355e1b 100644 --- a/lib/PublicInbox/Filter/Base.pm +++ b/lib/PublicInbox/Filter/Base.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2016 all contributors +# Copyright (C) 2016-2021 all contributors # License: AGPL-3.0+ # # base class for creating per-list or per-project filters @@ -6,7 +6,8 @@ package PublicInbox::Filter::Base; use strict; use warnings; use PublicInbox::MsgIter; -use constant MAX_MID_SIZE => 244; # max term size - 1 in Xapian +use parent qw(Exporter); +our @EXPORT_OK = qw(REJECT); # we may export IGNORE if/when needed sub No ($) { "*** We only accept plain-text mail, No $_[0] ***" } @@ -66,9 +67,10 @@ sub reject ($$) { sub err ($) { $_[0]->{err} } # by default, scrub is a no-op, see PublicInbox::Filter::Vger::scrub -# for an example of the override +# for an example of the override. The $for_remove arg is set to +# disable altid setting for spam removal. sub scrub { - my ($self, $mime) = @_; + my ($self, $mime, $for_remove) = @_; $self->ACCEPT($mime); }