I can't run dovecot in lxc on Buster. I turn off PrivateTmp, but it isn't enough... Still :
[ 4850.883141] audit: type=1400 audit(1563803461.322:34): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxc-container-default-cgns" name="/" pid=23810 comm="(dovecot)" flags="rw, rslave"
Did you tried with the unconfined AppArmor value ?
Set it into your /etc/pve/lxc/CTID.conf
Updating the service unit to avoid PrivateTmp doesn't work in LXC unfortunately without granting the necessary privileges via AppArmor on the host.
After exploring the options it seems there's no longer a way to make this work from purely within the container.
To make it work I removed all edits in the container (so got rid of the PrivateTmp config) and moved to modifying the AppArmor policies as follows:
On the host, create a new AppArmor policy at
/etc/apparmor.d/lxc/lxc-dovecot
and populate it with the following:Reload AppArmor with
Set the container to use the new profile by adding the following line to your LXC container config, typically at
/var/lib/lxc/$container/config
:Restart your container: