So when I tried this way I got the following output:
user'@'host:~$ doveadm -o plugin/mail_crypt_private_password=desired_password mailbox > cryptokey generate -u user -UR
user'@'host:~$

And when I tried this way I got the following output:

user'@'host:~$ doveadm -o plugin/mail_crypt_private_password=desired_password mailbox cryptokey generate -u user -UR
   Folder Public ID
user'@'host:~$ 

In both cases I sent a new email to the server, and I got errors stating the mailbox can't be opened


Sent with ProtonMail Secure Email.