From: epg <> Date: Sat, 3 Apr 2004 05:12:44 +0000 (+0000) Subject: Er, put in the rest of the @SPAM changes. Also make store_message X-Git-Url: https://diplodocus.org/git/minc/commitdiff_plain/62507996ef028c401cfc7ee3aff8d3e4583d7e13?ds=sidebyside;hp=95a97f883e0e32b7e78b58ff11424fe8a4d4630e Er, put in the rest of the @SPAM changes. Also make store_message return the new message number. --- diff --git a/minc b/minc index 8d8b6a3..2ef6a82 100755 --- a/minc +++ b/minc @@ -44,6 +44,10 @@ STDOUT->autoflush(1); my $MAGIC_TO_REGEX = '^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope |Apparently(-Resent)?)-To)'; my $MAGIC_TO_TOKEN = ' TO'; +# List of SPAM message numbers, scanned at the end so the user can +# check for false positives. +my @SPAM; + =head1 OPTIONS =over 4 @@ -463,7 +467,9 @@ sub store_message { # fails. While it is slow, it is not safe to store multiple # messages and then have a failure before marking some (or # all). - if ($mhfolder ne 'SPAM') { + if ($mhfolder eq 'SPAM') { + push(@SPAM, $msgnum); + } else { $status = system('mark', "+$mhfolder", "$msgnum", '-sequence', 'unseen', '-add'); if (not WIFEXITED($status)) { @@ -473,6 +479,8 @@ sub store_message { } } } + + return $msgnum; } # Parse a message file into a structure describing the headers. The