From: Matthew T. O'Connor <dbmail@dbmail.org> > Absolutely true. I would never want the flags kept with the message, > however I don't understand the purpose of splitting up messages in the > message_block table. What is the reasoning behind this? It seems like > just more work for no gain (that I am aware of).
I believe it was two-fold. Preeminently, limits in mysql would not allow a large message to be stored in a single table entry, so it was broken up. Secondly, having the headers in the first message block and message bodies in subsequent blocks makes it easy to grab just the headers without having to parse the data returned to you. It also means that if the message headers ever exceed the size of a messageblks entry (which I don't remember what that is), things break, which would be nice to fix. There is no limit to the total size of message headers, afaik (though in the "real world" I doubt there's ever a problem). With upcoming schema changes (cached headers, etc.), it'd probably be worth stepping back and looking at the best way to handle message storage, and see what improvements can be made. Even something as simple as a messageblk flag as to whether the block contains headers or the body could fix the above issue. While on the subject of storing messages, I don't know that filesystem files are suited to dbmail as it complicates database replication, which is certainly a desired feature. -- Jesse Norell jesse (at) kci.net