Mail::Box, Maildir and the right way to find a message

View: New views
1 Messages — Rating Filter:   Alert me  

Mail::Box, Maildir and the right way to find a message

by Gaylord Holder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have my mail in Maildir format and the folders have thousands of messages.
I want to find all the messages which have been moved into this folder
since the last time I checked so I can train my spam filter.
The spam filter will want to change the

One way is to open the folder, trundle through each message, and compare
each messageID with a list of old IDs.
This seems slow.

Another way, is to keep a list of all the files in the folder and see
which file are new to the folder and by-pass Mail::Box altogether.
I'm concerned about multi-session access.

My current idea is to convert the file name into Mail::Box index and
access it that way.  Is that enough locking?

What is the right way to do this?

Advice is always welcome.
-Gaylord

_______________________________________________
Mailbox mailing list
Mailbox@...
http://lists.utsl.gen.nz/mailman/listinfo.cgi/mailbox
LightInTheBox - Buy quality products at wholesale price!