feature request: prevent linking of email

Marc Marc at f1-outsourcing.eu
Wed Mar 17 17:20:48 EET 2021


> 
> mdbox is intended to be high performance mail storage, and this would
> make copying significantly slower.

1. But copying does not happen that often.
2. You already have this copy between namespaces (with different storage)
3. If this really is an issue you could also use a command to schedule the copying, first a link, and then run some command like doveadm purge to convert the link into a copy.


> If you care more about reliability,
> maybe switch to sdbox or maildir instead?

sdbox and maildir is having that mails are stored as individual files. If you use ceph for distributed storage, you will create a considerable storage overhead when storing these small files. 
Currently I am using the mdbox_rotate_size = 4M this so it is matching the default chunk/stripe size of ceph. 

> It would be easy enough to patch though:
> 
> diff --git a/src/lib-storage/index/dbox-multi/mdbox-save.c b/src/lib-
> storage/index/dbox-multi/mdbox-save.c
> index ff6e4f77b0..b522951b1d 100644
> --- a/src/lib-storage/index/dbox-multi/mdbox-save.c
> +++ b/src/lib-storage/index/dbox-multi/mdbox-save.c
> @@ -440,7 +440,7 @@ int mdbox_copy(struct mail_save_context *_ctx,
> struct mail *mail)
>         ctx->ctx.finished = TRUE;
> 
>         if (mail->box->storage != _ctx->transaction->box->storage ||
> -           _ctx->transaction->box->disable_reflink_copy_to)
> +           _ctx->transaction->box->disable_reflink_copy_to || TRUE)
>                 return mail_storage_copy(_ctx, mail);
>         src_mbox = MDBOX_MAILBOX(mail->box);

I would offer a config option:

mdbox_message_linking = no (copy message on request)
mdbox_message_linking = delayed (schedule the copying of messages)

:)




More information about the dovecot mailing list