Dump (using Data::Dumper) the FILTERS hash and exit. This is useful
for testing the syntax of .mincfilter.
+=item B<-f>
+
+Filter only, then exit. This is useful after running B<minc -s>.
+
=item B<-h>
Show help.
=cut
my $dumpfilters = 0;
+my $filteronly = 0;
my $run = 1;
my $spamonly = 0;
our $opt_d;
+our $opt_f;
our $opt_h;
our $opt_n;
our $opt_s; # ;; # stupid cperl-mode
$run = 0;
}
-if ($opt_s) { # ))){ # stupid cperl-mode
+if ($opt_f) {
+ $filteronly = 1;
+} elsif ($opt_s) { # ))){ # stupid cperl-mode
$spamonly = 1;
}
exit(&EX_OK);
}
- @msglist = kill_spam(getfiles("$MAILDIR/new"));
+ @msglist = getfiles("$MAILDIR/new");
+
+ if (not $filteronly) {
+ @msglist = kill_spam(@msglist);
+ }
if (not $spamonly) {
filter_mail(@msglist);