[Dovecot] SIS Implementation

Timo Sirainen tss at iki.fi
Fri Aug 14 21:47:33 EEST 2009


On Fri, 2009-08-14 at 11:28 -0700, Daniel L. Miller wrote:
> What would be involved in implementing SIS within Dovecot?  A new or 
> modified mailbox format?

It could be added to dbox without too much trouble. I already kind of
planned for it:

	/* Pointer to external message data. Format is:
	   1*(<start offset> <byte count> <ref>) */
	DBOX_METADATA_EXT_REF		= 'X',

Nothing uses that yet though. So what you'd need is:

1) When writing the data, extract the attachments and write them to
different files. Add pointers to those files to the EXT_REF metadata.
Dovecot's message parsers should make this not-too-difficult to
implement.

2) When reading messages, get the ext references and then you should be
able to create concat-istream by piecing together the main dbox istream
with those external istreams. Maybe implement some istream that lazily
opens the external files only when it's actually needed.

3) Once that works, figure out a way to implement SIS for those
externally written files. Creating hard links to files a global
attachment storage would probably be a workable solution. Then scan
through the storage once in a while and delete files with link count=1.
-------------- 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/77f3d458/attachment.bin 


More information about the dovecot mailing list