[Dovecot] deliver saving mails with hard linking
tss at iki.fi
Mon Jun 2 00:06:51 EEST 2008
On Jun 1, 2008, at 11:59 PM, Karsten Bräckelmann wrote:
>> - Am I forgetting something?..
> Cleaning up? Quoting the part from option (2) of your previous mail,
> which this seems to implement:
>> All messages could be then stored in some global
>> directory and hard linked from there to users' mailboxes.
> When reading that I already wondered about cleaning up and freeing
> space. If every recipient deleted their own "copy of the mail", the
> inodes link count will go down to 1 due to the still existing global
> copy. But it will survive despite being "deleted" (from the collective
> users POV), occupying disk space -- and possibly keeping data around
> that is assumed to be removed.
I think my previous mail about it described some persistent uniqueness
checks. This patch is only about delivery-time hard linking. If two
different deliveries sent the same message they would be stored using
different files. So the deliver wrapper script would be like:
cat > tempfile
deliver -p tempfile -d user1
deliver -p tempfile -d user2
rm -f tempfile
The result would be that user1 and user2 had the same file with link
count 2 and the file is gone when both of them delete it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080602/ba4294cb/attachment.bin
More information about the dovecot