[Dovecot] SIS Implementation

Timo Sirainen tss at iki.fi
Fri Aug 14 22:18:41 EEST 2009


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20090814/5b05b3f7/attachment.bin 


More information about the dovecot mailing list