diff options
author | Eric Wong <e@80x24.org> | 2019-10-16 00:39:56 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-10-16 08:13:11 +0000 |
commit | 37724c7e792ca0e1df9f64cfc17cebf7359ca9f0 (patch) | |
tree | 60363627f5760625a2589d65c48a2d18f23304d8 /script | |
parent | 356e1db5135802ed468719dfcd1f1c3f9dba9fff (diff) | |
download | public-inbox-37724c7e792ca0e1df9f64cfc17cebf7359ca9f0.tar.gz |
Since -mda now supports List-ID to better support mirroring of existing mailing lists, it probably makes sense to support disabling the precheck function to provide more accurate (though potentially spammier) mirrors of lists
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-mda | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/script/public-inbox-mda b/script/public-inbox-mda index 2655a6c5..9b8753da 100755 --- a/script/public-inbox-mda +++ b/script/public-inbox-mda @@ -5,7 +5,8 @@ # Mail delivery agent for public-inbox, run from your MTA upon mail delivery use strict; use warnings; -my $usage = 'public-inbox-mda < rfc2822_message'; +my $usage = 'public-inbox-mda [OPTIONS] < rfc2822_message'; +my $precheck = grep(/\A--no-precheck\z/, @ARGV) ? 0 : 1; my ($ems, $emm); sub do_exit { @@ -55,7 +56,9 @@ $dst->{mainrepo} or do_exit(67); $dst = PublicInbox::InboxWritable->new($dst); # pre-check, MDA has stricter rules than an importer might; -do_exit(0) unless PublicInbox::MDA->precheck($simple, $dst->{address}); +if ($precheck && !PublicInbox::MDA->precheck($simple, $dst->{address})) { + do_exit(0); +} $simple = undef; my $spam_ok; if ($spamc) { |