The sparse file idea is brilliant! Never occurred to me. :) We'd have to store the reference-pointer in the message file, so we would omit the actual attachment but eat up perhaps 50 bytes to keep the reference to the file. Shuvam > 1. Completely rewrite the message file removing the attachments and > adding any extra meta data you want in it's place > 2. Leave the message file as exactly the same size, just don't write > out the attachment content and assume your filesystem supports > sparse files (http://en.wikipedia.org/wiki/Sparse_file) > > The advantage of 2 is that it leaves the message file size correct, > and all the offsets in the file are still correct. The downsides are > that you must ensure your FS supports sparse files well, and there's > the question of where do you actually store the information that > links to the external file? ---- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/