set mutt default Maildir folder
I have recently set up a mail server running postfix as the MTA, and dovecot as the imap/pop3 daemon. Originally, and by default on Debian, it was using the mbox format. For reliability reasons, I decided that it would be best to use the Maildir format instead. Getting help from a friend, I successfully modified the postfix and dovecot servers to use the Maildir format with the mailboxes located in ~/Maildir.
However, mutt is still doing weird things when I try to access my mail using it. It wants to create a ~/Mail directory, and furthermore wants to look for an mbox in /var/mail/. There are a few users on the system, and while I know that I can use my .muttrc to solve this problem, how can I fix this problem for all users on my server?
mutt also uses a global muttrc file. Typically it's in /etc/Muttrc
or /usr/local/etc/Muttrc
if you compiled it separately from the distro. You can just put the Maildir settings there.
This mutt & Maildir Mini-HOWTO should give you an idea of what settings you need to change. Essentially you need to set folder
and mbox
and spoolfile
to all point to ~/Maildir
for everyone, and ensure mbox_type=Maildir
as well. Then there are a few other options to change the behavior.
Like most Unix / Linux programs, mutt will also read a system-wide configuration file, /etc/Muttrc
.
You can put system-wide settings (like where the home mailbox is) there.