[Dovecot] deliver saving mails with hard linking

Steffen Kaiser skdovecot at smail.inf.fh-bonn-rhein-sieg.de
Mon Jun 2 12:44:49 EEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 1 Jun 2008, Timo Sirainen wrote:

The SHA1 idea took me:

If deliver calculates the hash for each mail, then hardlinks each mail 
into, say, $HOME{target user}/../.inspool/{sha1_hash} (to support if you 
have your users on different physical disks).
If the hash already exists and the size is equal, hardlink the new 
recpient's file to it.

This cache would be cleaned by a cron script, e.g. once a day or something 
like that. Deliver could update the atime to reflect its last hard link or 
so.

The calculation overhead might be heavy.

But the "-p" approach seems to cry for to support LMTP.

BTW: For some accounts I run a nightly cron script that hardlinks any 
equal files, because they archive everything. I do first collect all mails 
sorted by size, then really compare them byte-by-byte if one mail is newer 
than one day.

Bye,

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIQ8ETVJMDrex4hCIRAv/8AKCrBNsxHvpfAk0Zi17N+t+SgZy3BgCfTOl3
irK1VrncoMf874FywCrb6/o=
=ZI+x
-----END PGP SIGNATURE-----


More information about the dovecot mailing list