[Dovecot] DoveCot compression to save HDD space

Jacek Osiecki joshua at hybrid.pl
Wed Feb 14 17:22:45 UTC 2007


On Wed, 14 Feb 2007, Timo Sirainen wrote:

> 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

Yes, however usually when we have cyrus it does not need user UIDs anymore
and everything is delivered to virtual users' accounts. On our system, if
anyone is allowed to get a shell account, he can access local mails with use
of pine+local imap only.

> 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

I'm not sure if cyrus does it that way with different UIDs, but it's highly
probable :)

> This would however mean that there wouldn't be any Delivered-To header
> since all the mails will be identical.

When comparing this small issue to the vast of space saved on the hard drive
- i think it's worth it :)

This would be really great if it could have been implemented...

Greetz,
-- 
Jacek Osiecki joshua at ceti.pl GG:3828944
"To nie logika, to polityka"
(c) Kabaret pod Wydrwigroszem 2006


More information about the dovecot mailing list