RCS file: /home/cvs/root/annalate/annalate.pl,v Working file: annalate.pl head: 1.11 branch: locks: strict access list: keyword substitution: kv total revisions: 12; selected revisions: 12 description: ---------------------------- revision 1.11 date: 2007/04/19 01:47:53; author: car; state: Exp; lines: +49 -26 annalate.pl: Don't try and do two things at once with the same connection -- like COPY while you've got an unfinished SEARCH -- this works with local mailboxes but causes core dumps over IMAP. I tried running two simulataneous connections, one to SEARCH, one to COPY, which completed early (after one message) without error. Dunno why, but the simpler solution is just to make a list of the search output and then act on it. Also, LoginHandler modified to behave well if called multiple times -- i.e. not ask for another password unless it has to. We'll cache the fact that we've called CREATE on "new" mailboxes, so that we only call it once per session. ---------------------------- revision 1.10 date: 2007/04/16 22:34:17; author: car; state: Exp; lines: +3 -1 annalate.pl: All this time I've been testing with copies. Come to do a move and I find I've not completed MoveMessage to cope with dynamic mailbox names. ---------------------------- revision 1.9 date: 2007/04/16 21:48:54; author: car; state: Exp; lines: +4 -2 annalate.pl: Catch parse_datetime in eval block. If it dies, substitute now for message DateTime and watch the crap float to the top. ---------------------------- revision 1.8 date: 2007/04/16 21:24:48; author: car; state: Exp; lines: +68 -7 annalate.pl: Make the mail stream produce debug output if we're veryVerbose. Add the all-important magic before and after switches. I hate inventing syntax, however simple, and would have loved to use DateTime::Format::Natural, which would have made everyone's life easier. Unfortunately it was even more of a pain in arse top compile than Mail::Cclient, and the documented examples didn't work. Perils of Perl. ---------------------------- revision 1.7 date: 2007/04/16 00:35:35; author: car; state: Exp; lines: +89 -67 annalate.pl: reorder spaghetti into distinct phases ---------------------------- revision 1.6 date: 2007/04/16 00:13:18; author: car; state: Exp; lines: +26 -7 annalate.pl: Comment the potentially non-obvious. Make log and debug output subject to $verbose. ---------------------------- revision 1.5 date: 2007/04/15 23:52:59; author: car; state: Exp; lines: +48 -8 annalate.pl: Make default operation 'list', not 'archive'. Archive isn't really a special mode of its own, it's a combination of copy/delete, calculated destination mailboxes and some cleverness specifying search criteria, to come later. Allow destination mailbox to be specified as a strftime(3C) format, to be filled according to RFC822 date extracted from each message. Create destination mailboxes on the fly. Mailbox creation, unlike move and copy, can be anywhere, despite being connected to a stream -- this means that we need to prepend the destination mailbox name with any server/protocol or driver information that the source may have had. I should comment this. ---------------------------- revision 1.4 date: 2007/04/15 09:01:46; author: car; state: Exp; lines: +20 -14 annalate.pl: I've been using the wrong kind of CamelCase. Also, register a simple callback for debug logging. ---------------------------- revision 1.3 date: 2007/04/15 01:09:42; author: car; state: Exp; lines: +11 -3 annalate.pl: A little usage detail, lest I forget. ---------------------------- revision 1.2 date: 2007/04/15 01:03:19; author: car; state: Exp; lines: +16 -1 annalate.pl: Copy PATH-dependent perl selection magic from pca. Add short description and reference to GPL, probably tidy this up later. ---------------------------- revision 1.1 date: 2007/04/15 00:50:04; author: car; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2007/04/15 00:50:04; author: car; state: Exp; lines: +0 -0 Imported. =============================================================================