Dry run; do not actually incorporate the mail, but log and report to
stdout/stderr as normal.
+=item B<-p>
+
+Print the filename of each message before checking it for spam. This
+can be handy if a particular message is giving the spam checker a
+problem.
+
=item B<-s>
Process SPAM only, then exit, leaving all non-spam messages in the
my $dumpfilters = 0;
my $filteronly = 0;
our $run = 1;
+my $printfilenames = 0;
my $spamonly = 0;
our $opt_d;
our $opt_f;
our $opt_h;
our $opt_n;
+our $opt_p;
our $opt_s; # ;; # stupid cperl-mode
-if (not getopts('dfhns')) {
+if (not getopts('dfhnps')) {
exit(&EX_USAGE);
}
$run = 0;
}
+if ($opt_p) {
+ $printfilenames = 1;
+}
+
if ($opt_f) {
$filteronly = 1;
} elsif ($opt_s) { # ))){ # stupid cperl-mode
foreach $msg (@msglist) {
printf('%sChecking for spam... %6d/%d',
"\r", ++$i, scalar(@msglist));
+ if ($printfilenames) {
+ print($msg);
+ }
if (spam_check($msg, @baton)) {
print(" SPAM\n");
store_message($msg, 'SPAM');