[MG] Difference feed setup

Michael Allan mike at zelea.com
Mon Mar 7 00:15:06 EST 2011

Conseo, re your last:

If mstor doesn't use FileLock, you'll probably have to wrap it:
Otherwise it isn't safe to read the mbox file, because the MTA may not
be finished writing it.  Postfix (for example) uses fcntl locks.
Those are compatible with Java's FileLock, assuming the code actually
uses it.

On second thought, I think we're on the wrong track.  We gave up too
easily on maildir.  Here's another approach:

    for( each file in 'new' directory )
        // all files in here are unseen, of course

        in = new InputStream( file );

        message = new javax.mail.internet.MimeMessage( in );

        process( message ); // parse it to database, or whatever

        FileX.renameFrom( file, file in 'cur' directory );
          // move it to 'cur' directory

What do you think?  We don't need JavaMail to move local mail files,
we just move them ourselves.

Michael Allan

Toronto, +1 416-699-9528

Originally posted to the mailing list of the Metagovernment Project:

More information about the Votorola mailing list