On Fri, 2009-08-14 at 12:06 -0700, Daniel L. Miller wrote:
> Now do we need to implement some kind of external database for tracking 
> the attachments between mailboxes?  Any thoughts on what that should 
> look like?

I think:

Step 1) Calculate SHA256 of the attachment and get base64 sum of it. See
if you have $attachment_dir/$base64 file. If you do, assume it's the
file and use it. If not, save the attachment there.

Step 2) Instead of a single huge attachment dir add some directory
hashing. Could be as simple as
attachments/first-two-bytes-of-base64/next-two-bytes-of-base64/base64.

Step 3) Optionally also check (on background?) that the files match
byte-by-byte to handle the (really low probability of) hash collisions.
This is probably a bit trickier to do, especially on background.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to