Debian 8 – Change location of maildir

Recommended is to use the Maildir directory format to store email rather than the the older mbox format. The Maildir format is well supported by Dovecot and has some advantages (no locking, allows for easy incremental back-ups and restoring of individual messages.) So you’ll need to assign a directory.

Convention is to store mail in a ~/Maildir directory in a users home directory, but nothing prevents you from using another (hidden) directory.

You configure both the Maildir format as well as it’s location with the postfix home_mailbox setting:

sudo postconf -e "home_mailbox = Maildir/"

Which is also the default location configured for most Dovecot packages.
The alternative is to configure postfix to leave local mail delivery to Dovecot with the Dovecot LDA or LSMTP.

Then configure Dovecot to look for mail in the correct location as well:

mail_location = maildir:~/Maildir/

In case of mail users actually having local user accounts (instead of only existing as virtual mail users) you may want to populate /etc/skell with a Maildir and a welcome message for new users.