userli icon indicating copy to clipboard operation
userli copied to clipboard

Improve `mailcrypt-encrypt-maildir` script

Open doobry-systemli opened this issue 6 years ago • 0 comments

Apparently, the current way of encrypting mails from legacy users as we do it in bin/mailcrypt-encrypt-maildir is error-prone. In particular, using doveadm fs put crypt ... seems to be dangerous. First, it injects the new mail into the Maildir "outside of dovecot". Second, if you do that at all, the file streaming should happen in /tmp first and the files be moved to /cur or /new only at the very end of altering the file.

According to user feedback, a better solution would be to use doveadm sync -1, e.g. doveadm sync -1 -R -u [email protected] maildir:...old_unencrypted/Maildir

doobry-systemli avatar Jan 13 '20 15:01 doobry-systemli