epg [Sat, 31 Aug 2002 18:44:47 +0000 (18:44 +0000)]
use Errno and Fcntl qw(O_WRONLY O_EXCL O_CREAT) .
(get_highest_msgnum): Restructure to step through readdir itself
rather than go through getfiles, since we don't want full path names
like that returns, but only the base filenames readdir returns. Also
fix it to return the highest number in the folder, not that number
plus one, making its name accurate.
(store_message): Adapt to get_highest_msgnum returning only the
highest message number. Use better $! test. Only create the empty
message file with sysopen when not $run. Use the full filename in the
error message when we couldn't find a new filename.
epg [Fri, 30 Aug 2002 07:33:07 +0000 (07:33 +0000)]
(get_new_msgnum): New function, loops across the list returned by
getfiles and returns the number for a new message to go into an mh
folder. This is a replacement for the command 'mhpath new'.
(store_message): Address the XXX comment about using 'mhpath new' by
not using it, instead calling get_new_msgnum. Furthermore, use an
algorithm similar to the maildir delivery algorithm to get the
filename to rename to.
epg [Sun, 25 Aug 2002 22:29:48 +0000 (22:29 +0000)]
(is_spam): Change logic of testing razor-check exit code slightly to
bomb if execution of razor-check failed (as opposed to sucessful
execution with a failure exit code).