Maildir with Postfix/Dovecot/mutt

Written by Simone

Using the Maildir mailbox format, emails are stored in under the recipient user’s home folder /home/<username>/Maildir.

# postconf -e 'home_mailbox = Maildir/'

You might also want to add the Maildir setup to the user home directory template so that it is automatically configured when a new user account is created:

# maildirmake.dovecot /etc/skel/Maildir
# maildirmake.dovecot /etc/skel/Maildir/.Drafts
# maildirmake.dovecot /etc/skel/Maildir/.Sent
# maildirmake.dovecot /etc/skel/Maildir/.Trash
# maildirmake.dovecot /etc/skel/Maildir/.Templates

The same Maildir can be added to the current user with the commands below. Replace the $USER with any existing username:

# cp -r /etc/skel/Maildir /home/$USER/
# chown -R $USER:$USER /home/$USER/Maildir
# chmod -R 700 /home/$USER/Maildir
# adduser $USER mail

Also create a “.muttrc” file under /etc/skel and copy paste this content in it:

set mbox_type=Maildir
set folder="~/Maildir"
set mask="!^\\.[^.]"
set mbox="~/Maildir"
set record="+.Sent"
set postponed="+.Drafts"
set spoolfile="~/Maildir"

Comments

  1. Markdown is allowed. HTML is not allowed.