]> diplodocus.org Git - minc/commitdiff
Implement custom scan of SPAM messages instead of using scan(1).
authorepg@google.com <>
Wed, 1 Apr 2009 23:40:27 +0000 (16:40 -0700)
committerepg@google.com <>
Wed, 1 Apr 2009 23:40:27 +0000 (16:40 -0700)
If the header of a message contains garbage characters (not 2047-quoted
garbage characters, actual multi-byte garbage!) (Chinese or Russian spam)
scan(1) will happily print them to the tty, which hurts.

(%SPAM): Replace @SPAM global list with a hash.
(store_message): Drop unused $status variable.  Don't update @SPAM .
(scan_line): Factor out the actual scan line formatting from filter_mail to
  this new function.
(filter_mail): Append message number and header hash to %SPAM .
(maildir_spam): Append message number and spam maildir file name to %SPAM .
(scan_spam): Add function to scan spam messages with scan_line .  Deal with 3
  cases: spam filtered via filter_mail and spam filtered via maildir_spam in
  either run or -n mode.  For the latter two, open the message file from the
  mh SPAM folder or from the spam maildir, respectively, to load the header.


No differences found