> On Tue, 2003-07-08 at 11:18, Jesse Norell wrote: > > One other thought; I'm not recommending the approach for splitting > > message components (eg. file attachments) and saving as discrete > > components, as I think the work involved and complexity introduced > > may not be worth the benefits, but one of the benefits not yet > > mentioned could be less storage requirements for duplicate > > attachments. As I watched my wife enjoy a flash application that > > was emailed to her, and knew I'd seen it in her inbox at least once > > in the past, I thought, "we could save the md5 checksum of each > > decoded message component and would only have to store a single copy > > of any given file within the entire mail spool!" That would > > complicate matters even more for proper message reconstruction, but > > is not entirely without appeal. > > I agree this would be good to do and it's one of the things I think > exchange does well (I think...) if I sent a 10M video to 20 coworkers > the total data store on exchange only increases 10M, not 200M. I don't
That scenario could/will(?) be handled by shared message blocks, which has been discussed. I was thinking even further than that, in which seperate emails sent to seperate users at different times will still share the same storage space, if the decoded message checksum is the same (ie. it is the exact same file). > think we need to store anything outside the database to do this (not > sure if that is what you were saying). No, more what exactly were the mime part boundaries, encoding scheme, etc. - to reproduce the exact original message, you'd have to store all the individual mime headers for all the individual messages and components, and be able to re-encode the attachment in the poper form when supplying it to the client. You'd also have to look at how many levels deep of decoding to do, etc. It all gets pretty complex to be able to reproduce exactly the original message but still get the advantage of shared message components when they are identical. It's more a "neat idea" than something I expect would be done. :) > Question: Right now in dbmail, if I copy a message from my inbox to a > saved folder, does dbmail also copy all of the message_blks? Or does it > just make a new entry in the messages table that is also referenced by > by the message_blks? If not, I think this would be easy to do, and > since even moving a message in IMAP is actually a copy (I think), this > is probably a worthwhile optimization. I believe this is currently the inefficient copy-everything approach. If you move a message from one folder to another, I don't know what it does, it may just update the mailbox_idnr in the messages table entry. Search for shared folder discussions, as this is planned on being addressed (and thought to be doable within the current db schema). -- Jesse Norell jesse (at) kci.net