]> diplodocus.org Git - minc/log
minc
23 years ago($run): Declare with our instead of my so it will be available to the
epg [Sun, 13 Oct 2002 16:49:43 +0000 (16:49 +0000)]
($run): Declare with our instead of my so it will be available to the
user-defined is_spam function.  Document this.

23 years ago(store_message): Whoops, document that the for loop is a modified
epg [Sun, 13 Oct 2002 16:32:26 +0000 (16:32 +0000)]
(store_message): Whoops, document that the for loop is a modified
version of the maildir delivery algorithm; now some of these other
comments make more sense.

23 years agoFactor out the razor-check spam stuff. Instead, read ~/.mincspam if
epg [Sun, 13 Oct 2002 16:22:00 +0000 (16:22 +0000)]
Factor out the razor-check spam stuff.  Instead, read ~/.mincspam if
it exists, otherwise define a dummy is_spam function.  Document this.

23 years ago(get_headers): Don't allow input from the message to break the
epg [Tue, 10 Sep 2002 10:05:15 +0000 (10:05 +0000)]
(get_headers): Don't allow input from the message to break the
regex used to split headers.

Today i encountered a message with the following ilnes:

X-scanner: scanned by Inflex 1.0.12.3 -
(http: //www.gsm.com.my)

What we have is a broken pile of shit from gsm.com (unsurprisingly,
as i visit the URL they provide, i see that one of their frame
components spits out an HTML page with Content-Type: text/plain)
that doesn't know how to fold headers.  At some point, some "helpful"
mail software (perhaps even my very own postfix installation; who
knows?) mangled what appeared to it to be an '(http' header; it
added a space after the colon.

Whether the mangling had happened or not, i'm sure minc would have
been confused.  Doug Porter provided the fix (using perl's \Q and
\E in the split() regex to disable pattern meta-chars in $fieldname).

23 years agoEr, whoops, tell getopt about the -f option.
epg [Sun, 8 Sep 2002 02:21:28 +0000 (02:21 +0000)]
Er, whoops, tell getopt about the -f option.

23 years ago(store_message): Splitting the two mark failure cases, i accidentally
epg [Mon, 2 Sep 2002 01:20:16 +0000 (01:20 +0000)]
(store_message): Splitting the two mark failure cases, i accidentally
reversed the sense of a test on one.

23 years agoI was using EX_TEMPFAIL for nearly every failure case, as if this were
epg [Mon, 2 Sep 2002 01:10:13 +0000 (01:10 +0000)]
I was using EX_TEMPFAIL for nearly every failure case, as if this were
a delivery program.  Comb the file for each incidence and use a better
exit code if appropriate.

(store_message): Handle not being able to run the mark command and
being able to run it but having it fail separately.

23 years agoFix pod buglet.
epg [Sun, 1 Sep 2002 06:08:16 +0000 (06:08 +0000)]
Fix pod buglet.

23 years agoAdd new -f option, for only running filters.
epg [Sun, 1 Sep 2002 06:03:25 +0000 (06:03 +0000)]
Add new -f option, for only running filters.

23 years ago(store_message): Explain why marking is done for each message individually.
epg [Sun, 1 Sep 2002 05:50:06 +0000 (05:50 +0000)]
(store_message): Explain why marking is done for each message individually.

23 years agoRevert rev 243.
epg [Sun, 1 Sep 2002 05:32:11 +0000 (05:32 +0000)]
Revert rev 243.

23 years ago(is_spam): Move $line and $message to be declared at the top of the
epg [Sun, 1 Sep 2002 00:00:54 +0000 (00:00 +0000)]
(is_spam): Move $line and $message to be declared at the top of the
function.

23 years ago(%FOLDERS): Remove this global. Whether to print the folder's name is
epg [Sat, 31 Aug 2002 23:58:52 +0000 (23:58 +0000)]
(%FOLDERS): Remove this global.  Whether to print the folder's name is
now being subsumed into the marking unseen messages functionality
moving into filter_mail.

(store_message): Don't run mark messages unseen, and start returning
the stored message number for callers to use.

(filter_mail): Keep a hash of folders and message numbers, printing
each folder name only once and running one mark(1) command for each
folder to mark the new messages unseen.

23 years agouse Errno and Fcntl qw(O_WRONLY O_EXCL O_CREAT) .
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.

23 years ago(get_new_msgnum): New function, loops across the list returned by
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.

23 years ago(getfiles): Move definition of this function higher up, just below
epg [Fri, 30 Aug 2002 06:40:36 +0000 (06:40 +0000)]
(getfiles): Move definition of this function higher up, just below
store_message, since store_message is about to be calling (indirectly)
calling it.

23 years agoCross-reference to razor web site.
epg [Fri, 30 Aug 2002 04:40:40 +0000 (04:40 +0000)]
Cross-reference to razor web site.

23 years ago(getfiles): New function, returns a list of all entries in a
epg [Fri, 30 Aug 2002 00:27:37 +0000 (00:27 +0000)]
(getfiles): New function, returns a list of all entries in a
directory.

(MAIN): Call getfiles instead of using glob.

23 years agoMore mhpath todo commentary.
epg [Wed, 28 Aug 2002 19:29:26 +0000 (19:29 +0000)]
More mhpath todo commentary.

23 years agoChange a couple uses of C's not operator '!' to Perl's 'not'
epg [Wed, 28 Aug 2002 06:46:15 +0000 (06:46 +0000)]
Change a couple uses of C's not operator '!' to Perl's 'not'
operator.

23 years agoWrite a couple XXX todo comments.
epg [Wed, 28 Aug 2002 06:44:08 +0000 (06:44 +0000)]
Write a couple XXX todo comments.

23 years agoDocument that HOME is used to find the maildir in the absence of
epg [Tue, 27 Aug 2002 02:26:37 +0000 (02:26 +0000)]
Document that HOME is used to find the maildir in the absence of
the MAILDIR environment variable.

23 years agoCollapse the two 'use env' pragmas into one.
epg [Tue, 27 Aug 2002 02:22:13 +0000 (02:22 +0000)]
Collapse the two 'use env' pragmas into one.

23 years agoMove definition of logging constants to logging section.
epg [Tue, 27 Aug 2002 01:29:30 +0000 (01:29 +0000)]
Move definition of logging constants to logging section.

23 years ago(is_spam): Change logic of testing razor-check exit code slightly 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).

23 years ago(store_message): Test for failure when mark(1)ing the message unseen.
epg [Sun, 25 Aug 2002 22:26:40 +0000 (22:26 +0000)]
(store_message): Test for failure when mark(1)ing the message unseen.

23 years ago(_errprint): Use single-quotes for a printf format string.
epg [Sun, 25 Aug 2002 21:52:44 +0000 (21:52 +0000)]
(_errprint): Use single-quotes for a printf format string.

23 years ago(find_mh_folder): Fix logic: only use the lower-cased version of
epg [Sun, 25 Aug 2002 21:47:25 +0000 (21:47 +0000)]
(find_mh_folder): Fix logic: only use the lower-cased version of
the header string from %FILTERS for retrieving the header contents
from %headers.

23 years ago(kill_spam): Be more clear about the meaning of the number printed
epg [Sun, 25 Aug 2002 21:31:18 +0000 (21:31 +0000)]
(kill_spam): Be more clear about the meaning of the number printed
before returning.

23 years agoAudit the entire file for correct -n behavior.
epg [Sun, 25 Aug 2002 21:04:05 +0000 (21:04 +0000)]
Audit the entire file for correct -n behavior.

(store_message): Document why this calls mkfolder even in -n mode.

(is_spam): Don't actually do anything in -n mode.

23 years ago(find_mh_folder): Down-case header from %FILTERS before trying to
epg [Sun, 25 Aug 2002 20:53:31 +0000 (20:53 +0000)]
(find_mh_folder): Down-case header from %FILTERS before trying to
use it.

23 years ago(get_headers): Fix an XXX (print message and return () on encountering
epg [Sun, 25 Aug 2002 20:50:51 +0000 (20:50 +0000)]
(get_headers): Fix an XXX (print message and return () on encountering
malformed message.

(find_mh_folder): Handle get_headers failing.

23 years ago(get_headers): Remove XXX question about whitespace after discussion
epg [Sun, 25 Aug 2002 20:42:48 +0000 (20:42 +0000)]
(get_headers): Remove XXX question about whitespace after discussion
with dsp.

23 years ago(log_headers): Adapt to the %headers hash now having all-lowercase
epg [Sun, 25 Aug 2002 20:28:58 +0000 (20:28 +0000)]
(log_headers): Adapt to the %headers hash now having all-lowercase
keys.

23 years ago(kill_spam): Display progress report since this can be a lengthy
epg [Sun, 25 Aug 2002 20:26:27 +0000 (20:26 +0000)]
(kill_spam): Display progress report since this can be a lengthy
operation with no output otherwise.

23 years ago(get_headers): Down-case the header name before using it as a key to
epg [Sun, 25 Aug 2002 20:02:13 +0000 (20:02 +0000)]
(get_headers): Down-case the header name before using it as a key to
the hash.

23 years ago(is_spam): Remove the system('false') line and actually call
epg [Sun, 25 Aug 2002 19:19:53 +0000 (19:19 +0000)]
(is_spam): Remove the system('false') line and actually call
razor-check now.

23 years agoNew -s option, for processing spam only.
epg [Sun, 25 Aug 2002 18:41:32 +0000 (18:41 +0000)]
New -s option, for processing spam only.

($spamonly): New global.

(MAIN): Call filter_mail only if not $spamonly.

23 years agoNew error handling based on <err.h>.
epg [Sun, 25 Aug 2002 18:12:02 +0000 (18:12 +0000)]
New error handling based on <err.h>.

(_errprint): New function, handles printing of error messages for err
and errx.

(err): err(3) for Perl.

(errx): errx(3) for Perl.

(mkfolder):
(store_message):
(is_spam): Use err instead of die.

23 years agoBomb if HOME isn't set and if MAILDIR isn't set use $HOME/Maildir.
epg [Sun, 25 Aug 2002 09:31:41 +0000 (09:31 +0000)]
Bomb if HOME isn't set and if MAILDIR isn't set use $HOME/Maildir.

23 years agoSet svn:executable.
epg [Sun, 25 Aug 2002 09:01:10 +0000 (09:01 +0000)]
Set svn:executable.

23 years agoAdd minc program, based on an earlier minc which was not developed
epg [Sun, 25 Aug 2002 08:55:35 +0000 (08:55 +0000)]
Add minc program, based on an earlier minc which was not developed
very far.

23 years ago(no commit message)
<> [Sun, 25 Aug 2002 08:53:33 +0000 (08:53 +0000)]