[Dovecot] DoveCot compression to save HDD space

Timo Sirainen tss at iki.fi
Wed Feb 14 16:59:09 UTC 2007

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070214/fe0d9afb/attachment.pgp 

More information about the dovecot mailing list