Revision as of 21:48, January 26, 2014 by Duncan.Britton (Talk) (~/.mutt/muttrc)

Mutt is a popular mail reader for Linux systems. This page is being created as a good place for people to place their mutt configurations to share with others. These configuration settings go in the user's ~/.muttrc file.

Essential Mutt

set pager_stop

This turns off the default behavior of mutt where hitting space to scroll will automatically move to the next message when the end of the current message is reached. This is very annoying when scrolling in long emails like cron jobs, and the line above sets this behavior to off.

angry_vincent's .muttrc:


Interesting Color Options

golodhrim's mutt config

First I split up my muttconfig in several subfiles under ~/.mutt. The resulting files will be:

  • ~/.mutt/account_hooks
  • ~/.mutt/colors
  • ~/.mutt/folder_hooks
  • ~/.mutt/gpg
  • ~/.mutt/lists
  • ~/.mutt/macros
  • ~/.mutt/mutt-alias
  • ~/.mutt/muttrc
  • ~/.mutt/sidebar
  • ~/.secret/.passwd.gpg


Next, edit ~/.mutt/account_hooks</pre>:

















# Sidebar configuration
set sidebar_width=30
set sidebar_visible=yes
set sidebar_delim='|'
color sidebar_new yellow default

# Sidebar keys
bind index \CP sidebar-prev
bind index \CN sidebar-next
bind index \CO sidebar-open
bind pager \CP sidebar-prev
bind pager \CN sidebar-next
bind pager \CO sidebar-open


For this file follow the next steps:

  • Step 1:

Create a folder ~/.secret and inside a file .passwd and enter the following into it:

user1:    passwd1
user2:    passwd2

where user1 and user2 are your identifiers for the accounts you added in account_hooks and folder_hooks and at the start of muttrc.

  • Step 2:

Now encrypt the file with your gpg-key, if you don't have one execute gpg --gen-key and create one first. After that don't forget to delete your unencrypted passwordstorage.

$ gpg -r 0x<Your-ID-fingerprint> -o .passwd.gpg --encrypt .passwd
$ rm -f .passwd

Mutt postfix setup

Postfix is another popular and powerful mail transfer agent which somehow easier to configure than sendmail. Let's start a quick postfix mail transfer setup that will work with mutt. Set sasl,berkdb USE flags to mail-mta/potsfix and mail-client/mutt

# echo "mail-mta/postfix berkdb sasl" >> /etc/portage/package.use/mail
# echo "mail-client/mutt berkdb sasl" >> /etc/portage/package.use/mail
# emerge -uN1 mutt postfix

Edit /etc/postfix/ and add the following lines:


Create and edit above mentioned authorization file gmail_passwd

# touch /etc/postfix/gmail_passwd
# echo "" >> /etc/postfix/gmail_passwd

Where <> is gmail account and passwd is account password. Convert gmail_passwd into Berkeley DB format, secure the file and finaly restart the postfix daemon

# postmap /etc/postfix/gmail_passwd
# chown root:postfix /etc/postfix/gmail_passwd*
# chmod 0640 /etc/postfix/gmail_passwd*
# /etc/init.d/postfix restart