On Mon, 2010-07-19 at 16:24 +0100, Timo Sirainen wrote:
Code status
Initial version of the attachment reading/writing code is already done and works (lacks some error handling and probably performance optimizations). The SIS plugin code is also started and should be working soon.
The initial version can be tested here: http://hg.dovecot.org/dovecot-2.0-sis/
It should work with sdbox, but the settings parsing is causing mdbox to crash at startup. I need to figure out some way to fix that.
You can enable it by setting e.g.:
dbox_attachment_dir = ~/dbox/attachments
By default is does SIS, but if you want only external attachment storage, you can set:
dbox_attachment_fs = posix
(default is dbox_attachment_fs = sis posix)
TODO has:
- attachments can generate very long metadata lines. input stream reading them probably has a limit..
- save attachments base64-decoded
- if attachment stream is too small/long, log an error
- if file is completely empty, maybe show it as spaces? this could be useful for deleting viruses by truncating their files to zero bytes
- delayed deduplication daemon?
Perhaps the settings troubles could be solved simply by making the code to be common for all storage backends, even though currently only dbox would use it. Then the setting names would be mail_attachment_fs and mail_attachment_dir.