User Tools

Site Tools


email:mutt

Mutt config file here. I use Mutt for three accounts and have three separate config files for each account. The muttrc below is a basic generalization of all three. I have never gotten around to setting up Mutt to handle multiple accounts. When I want to bring up Mutt for my main account, in the terminal:

mutt

When I want to bring up my personal account (email from my server), I have an alias in .bash_aliases:

csb

Where 'csb' is aliased to:

alias csb='mutt -F .csbmuttrc'

Ditto with Gmail. In BASH, I type:

gmail

Which is aliased to a separate .muttrc config file:

alias gmail='mutt -F .gmailmuttrc'

I use imapfilter to filter email in my work account. I use msmtp to send emails. I use offlineimap to retrieve emails.

# Set alias file
set alias_file = ~/.mutt/aliases
source ~/.mutt/aliases
source ~/.mutt/colors
 
# Where new mail goes 
set folder = "~/Mail"
set spoolfile = "~/Mail/INBOX"
 
# Weed out unwanted header info
ignore *
unignore to from date subject cc organization organisation
 
# Set envelope ; common header stuff
set from="my_email"
set realname='My Name'
my_hdr Reply-to: My Name <my_email>
my_hdr Return-path: My Name <my_email>
my_hdr From: My Name <my_email>
my_hdr Organization: My Organization
my_hdr X-URL: My website
my_hdr X-Operating-System: `uname -a`
my_hdr X-Message-Flag: Random Message Here
set envelope_from=yes
 
# Set sendmail
set sendmail="/usr/bin/msmtp"
 
###############################
 
## Mail Folders
 
# Type of mail files
set mbox_type=Maildir 	
 
# Directory that contains all mail files
set folder=~/Mail
 
# Where to save postponed mail
set postponed= "+Drafts"
 
# Where to save copies of outgoing mail		
set record="~/Mail/Archives"	
 
# Save copies of outgoing mail
set copy=yes
 
# Don't ask about moving messages.  Just don't do it.
set move=no
 
# Show full date in index; various ways below
set index_format="%4C %Z %[%m/%d/%y] %-15.15L (%4c) %s"
 
###############################
 
# Save encrypted mail in the clear
set fcc_clear=yes
 
# Automatically delete messages
set delete=yes
 
# Automatically quote message
set include=yes
 
# Set folder hooks and sort by thread for all folders
folder-hook . set sort=threads
 
# No confirmation before printing
set print="yes"
 
# Use muttprint for pretty printing
#set print_command="muttprint"
 
# Print every mail extra
set print_split
 
# View html emails
auto_view text/html
alternative_order text/plain text/enriched text/html # save html for last
 
# No + signs before wrapped lines
set markers=no
 
# tell Mutt which mailing lists I subscribe to
subscribe nameoflist@host
 
# more mailing list stuff
set followup_to
set honor_followup_to=yes
 
# signature
set signature="~/.signature"
 
###############################
 
# Set editor.
set editor="/usr/bin/vim -X"
 
# Open urls with urlview
macro index \cb |w3m\n  # Follow links with w3m
macro pager \cb |w3m\n  # Follow links with w3m
 
# Search Macro
macro generic S "<shell-escape>nmzmail<return><esc>c~/.nmzmail/result<return>" "Search via nmzmail"
email/mutt.txt · Last modified: 2015/12/09 14:14 by seanburns