]> diplodocus.org Git - minc/commitdiff
Move STDOUT auto-flushing to filter_mail where it belongs.
authorepg <>
Sat, 3 Apr 2004 05:45:43 +0000 (05:45 +0000)
committerepg <>
Sat, 3 Apr 2004 05:45:43 +0000 (05:45 +0000)
minc

diff --git a/minc b/minc
index cfac97f247651f21ed6d603f440dd9072bc55b1f..790ecfeab2ab42a0f9dbd448bd416eded9ed2b9f 100755 (executable)
--- a/minc
+++ b/minc
@@ -36,9 +36,6 @@ use Log::Dispatch;
 use Log::Dispatch::File;
 use POSIX qw(strftime WEXITSTATUS WIFEXITED);
 
 use Log::Dispatch::File;
 use POSIX qw(strftime WEXITSTATUS WIFEXITED);
 
-# Autoflush STDOUT for the benefit of the status reporting in kill_spam().
-STDOUT->autoflush(1);
-
 # If a filter set's header is $MAGIC_TO_TOKEN, that set is compared
 # against headers matching this regex (taken from procmail).
 my $MAGIC_TO_REGEX = '^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope |Apparently(-Resent)?)-To)';
 # If a filter set's header is $MAGIC_TO_TOKEN, that set is compared
 # against headers matching this regex (taken from procmail).
 my $MAGIC_TO_REGEX = '^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope |Apparently(-Resent)?)-To)';
@@ -591,6 +588,8 @@ sub filter_mail {
 
     @baton = spam_start_hook();
 
 
     @baton = spam_start_hook();
 
+
+    STDOUT->autoflush(1);
     print("$msgcount messages...");
     foreach $msg (@msglist) {
         if (spam_check($msg, @baton)) {
     print("$msgcount messages...");
     foreach $msg (@msglist) {
         if (spam_check($msg, @baton)) {