diff options
author | Eric Wong <e@80x24.org> | 2016-06-16 22:45:27 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-06-17 01:13:57 +0000 |
commit | aad496f4336e6a7b60312b0eef1a88b9527322bb (patch) | |
tree | f29ddecb0aaf04ad5e9f87fc72e29448a2c3876d /script | |
parent | 88cc653acaa8d8fddb18bfec2cce98e19aa2b0e5 (diff) | |
download | public-inbox-aad496f4336e6a7b60312b0eef1a88b9527322bb.tar.gz |
Give users some rope to do their own filtering.
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-mda | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/script/public-inbox-mda b/script/public-inbox-mda index 63096fee..26b70cfb 100755 --- a/script/public-inbox-mda +++ b/script/public-inbox-mda @@ -57,7 +57,11 @@ do_exit(0) unless $spam_ok; my $fcfg = $dst->{filter} || ''; my $filter; -if ($fcfg eq 'scrub') { # TODO: +if ($fcfg =~ /::/) { + eval "require $fcfg"; + die $@ if $@; + $filter = $fcfg->new; +} elsif ($fcfg eq 'scrub') { # TODO: require PublicInbox::Filter::Mirror; $filter = PublicInbox::Filter::Mirror->new; } else { |