Open /etc/dovecot/conf.d/20-imap.conf
sudo nano /etc/dovecot/conf.d/20-imap.conf
Search for mail_plugins and make the following changes on that line
from
mail_plugins = $mail_plugins
to
mail_plugins = $mail_plugins autocreate
Then add the following at the end of the file
plugin {
autocreate = Trash
autocreate2 = Junk
autocreate3 = Drafts
autocreate4 = Sent
autosubscribe = Trash
autosubscribe2 = Junk
autosubscribe3 = Drafts
autosubscribe4 = Sent
}
Restart dovecot
sudo service dovecot restart
More readings
- http://serverfault.com/questions/277430/how-do-i-setup-a-sent-and-trash-folder-with-dovecot
- https://www.digitalocean.com/community/questions/ubuntu-mail-server-postfix-dovecot-create-default-inbox-sent-and-trash-folder-per-account?answer=19410