How-to: Manage Default Dovecot Folders Through UCR Variables

Howto Manage Default Dovecot Folders Through UCR Variables

Step 1

Stop Dovcecot service
systemctl stop dovecot

Step 2

Remove unwanted folders for a single account

doveadm expunge -v -d -u jane.doe@example.org mailbox Send\ Objects ALL

Step 3

Set default folders for all users

ucr set mail/dovecot/mailboxes/auto/NAME=[no|create|subscribe]
I.e.:
ucr set mail/dovecot/mailboxes/auto/Trash=subscribe

This allows to configure the automatic creation and subscription of folders. If set to create, the folder NAME is created automatically. If set to subscribe, it is also automatically subscribed. With the setting no nothing happens.

Mastodon