[Dovecot] DoveCot compression to save HDD space

Bill Landry billl at inetmsg.com
Wed Feb 14 17:14:04 UTC 2007


Timo Sirainen wrote the following on 2/14/2007 8:59 AM -0800:
> n Wed, 2007-02-14 at 11:42 -0500, Charles Marcus wrote:
>   
>>> With maildir I suppose it's possible with hardlinks, but that's a bit
>>> kludgy.
>>>       
>> Do you know if that is how cyrus does it?
>>     
>
> I think Cyrus also uses hardlinks. Well, the only problem is what to do
> when the destination users have different UIDs. Deliver would pretty
> much have to deliver the mail as root, or use some kludgy approaches. In
> any case the file would then probably have to be owned by root (or
> another specified user) and be read-only to the destination users.
>
> I suppose it wouldn't be _too_ difficult to implement this though.
> Something like:
>
> 1. save the file to some temporary file in a directory where only
> deliver has access
> 2. change effective UID to destination user (keep the deliver group
> effective) and hardlink the file to the user's maildir
> 3. change effective UID back to root
> 4. process next user, goto 2
> 5. Unlink the temporary file
>
> This would however mean that there wouldn't be any Delivered-To header
> since all the mails will be identical.
>   
How and when would these shared storage file attachments ever get 
deleted?  If and when the last person that received the e-mail with the 
shared attachment deletes the e-mail message?  Just curious as to how 
you would manage the shared storage from maintaining files forever.

Bill


More information about the dovecot mailing list