This page was 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.
To install mutt, emerge it:
# emerge mutt
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.
Interesting Color Options
Golodhrim's mutt config
First, I split up my muttconfig in several subfiles under ~/.mutt. The resulting files are:
For this file follow the next steps:
- Step 1:
Create a folder ~/.secret and inside that directory, create a file called .passwd. Add the following to it:
where "user1" and "user2" are identifiers for the accounts you added in the account_hooks and folder_hooks files, as well as at the start of the muttrc. Note that if your password contains semi-colons you'll have to escape them with three backslashes.
- Step 2:
Now, encrypt the file with your gpg-key. If you don't have one, execute gpg --gen-key and create one. After that, don't forget to delete your unencrypted password storage:
$ 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 is easier to configure than sendmail. Let's start a quick postfix mail transfer setup that will work with mutt. Set the sasl,berkdb USE flags to mail-mta/potsfix and mail-client/mutt in /etc/portage/package.use/:
# 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/main.cf and add the following lines:
Create and edit the aforementioned authorization file: gmail_passwd:
# touch /etc/postfix/gmail_passwd # echo "smtp.gmail.com:587 firstname.lastname@example.org:password" >> /etc/postfix/gmail_passwd
Where <my.name> is a gmail account and passwd is the account password. Convert gmail_passwd into Berkeley DB format, secure the file, and 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