Don't load .mincspam until it is actually needed, in filter_mail.
Print the first status message (the number of messages to process)
as soon as we can, in getfiles.
our @FILTERS;
require "$HOME/.mincfilter";
our @FILTERS;
require "$HOME/.mincfilter";
-if (-f "$HOME/.mincspam") {
- require "$HOME/.mincspam";
-} else {
- eval "sub spam_start_hook { return (); }";
- eval "sub spam_stop_hook { }";
- eval "sub spam_check { return 0; }";
-}
-
+ STDOUT->autoflush(1);
+ print(scalar(@result), " messages...");
+
closedir(DIR);
return @result;
closedir(DIR);
return @result;
my $saved = 0;
my %FOLDERS = ('SPAM'=>1);
my $saved = 0;
my %FOLDERS = ('SPAM'=>1);
+ if (-f "$HOME/.mincspam") {
+ require "$HOME/.mincspam";
+ } else {
+ eval "sub spam_start_hook { return (); }";
+ eval "sub spam_stop_hook { }";
+ eval "sub spam_check { return 0; }";
+ }
+
@baton = spam_start_hook();
@baton = spam_start_hook();
- STDOUT->autoflush(1);
- print("$msgcount messages...");
foreach $msg (@msglist) {
if (spam_check($msg, @baton)) {
$mhfolder = 'SPAM';
foreach $msg (@msglist) {
if (spam_check($msg, @baton)) {
$mhfolder = 'SPAM';