=head1 SYNOPSIS
-B<minc> [-B<dnp>]
+B<minc> [-B<dmnp>]
=head1 DESCRIPTION
Show help.
+=item B<-m> I<MAX>
+
+Stop processing after I<MAX> messages.
+
=item B<-n>
Dry run; do not actually incorporate the mail, but log and report to
=cut
my $dumpfilters = 0;
+my $maxmsgs;
our $run = 1;
my $printfilenames = 0;
my %opts;
-if (not getopts('dnp', \%opts)) {
+if (not getopts('dm:np', \%opts)) {
exit(2);
}
$run = 0;
}
+if (defined($opts{'m'})) {
+ $maxmsgs = $opts{'m'};
+}
+
if ($opts{'p'}) {
$printfilenames = 1;
}
printf('%6d SPAM %6d saved %6d/%1d',
$spam, $saved, $spam + $saved, $msgcount);
+
+ $spam + $saved < $maxmsgs or last;
}
print("\n");