# This is a $HOME/.muttrc file used by the mail reader mutt.
#
# The format of this file is one command per line.  Everything after a pound
# sign (#) is a comment, unless a backward slash (\) precedes it.
#
# man mutt     "Man pages!"
# man muttrc 
#
# This is based on Dave Pearson's muttrc. <http://www.davep.org/mutt>
#
# User Defined Headers.
#
# You can put a From: and or a Reply-To: here.

my_hdr From: Your Name <your@email.address>       
my_hdr Reply-To: your@email.address
  
# POP3 support.
# If you want mutt to connect to your service provider and get your
# pop3 mail, answer the questions below, then when you're in mutt 
# and connected, press the capital 'G' key.
#
#set pop_last         # Only read last unread mail.
#set pop_delete       # Delete mail after retrieving it.
#set pop_host=""      # Your internet service providers mail server
#set pop_user=""      # Your username 
#set pop_pass=""      # Your password 

## The following options are only vaild if you have
## compiled in IMAP support.

# set imap_user=""
# set imap_pass=""
# set imap_checkinterval=""

# This is the default mailer for mutt.
#set sendmail="/usr/sbin/sendmail -oi -oem"
set sendmail="/usr/bin/msmtp"

# You can put a Return-Receipt-To: if you want to be notified by sendmail
# when mail can't be delivered and why.
#my_hdr Return-Receipt-To: your@email.address
#set dsn_notify="failure,delay"   
#set dsn_return="hdrs"            

set folder="$HOME/Mail"               # Mail folder directory.
set spoolfile="$HOME/Mail/`whoami`"   # Mail folder is whoami.

set postponed=+postponed                # Where postponed messages live.
set attribution="* %n <%a> [%{%Y-%m-%d %H:%M:%S %Z}]:\n"
set edit_headers                        # I want to edit the message headers.
set copy=ask-yes                        # Ask to keep copies of outgoing mail,
set postpone=ask-yes                    # Ask about postponing.
set print=ask-yes                       # Ask before printing.
set delete=ask-yes                      # Ask before doing a delete.
set record=+outbox                      # and it gets saved in outbox.
unset confirmappend
set autoedit
set sort=threads
set sort_aux=date-received              # Sort threads by date received.
set nobeep
set nomove
set mbox=+mbox                          # Where to put mail you read. 
set read_inc=100              
set write_inc=100              

set mailcap_path=$HOME/.mailcap:/etc/mailcap

#set editor="vi '+/^$'"         # Editor to use when composing messages
#set editor="nano +8"
set editor="mcedit +8"
#set editor=builtin

#set visual="nano +8"           # Editor invoked by ~v in the builtin editor
#set visual="vi '+/^$'"
set visual="mcedit +8"

set quote_regexp="^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"

auto_view text/html

# Ignore all headers
ignore *

# Then un-ignore the ones I want to see
unignore From:
unignore To:
unignore Reply-To:
unignore Mail-Followup-To:
unignore Subject:
unignore Date:
unignore Organization:
unignore Newsgroups:
unignore CC:
unignore BCC:
unignore Message-ID:
unignore X-Mailer:
unignore User-Agent:
unignore X-Junked-Because:
unignore X-SpamProbe:
unignore X-Virus-hagbard:

# Now order the visable header lines
hdr_order From: Subject: To: CC: BCC: Reply-To: Mail-Followup-To: Date: Organization: User-Agent: X-Mailer:

# Use the keys Ctrl-b to connect to URLs while in mutt.

macro index \cb |urlview\n
macro pager \cb |urlview\n	

#
# Colour settings for mutt.
#

# Default colour definitions
color hdrdefault black        cyan
color quoted     red          white
color signature  brightblack  white
color indicator  brightwhite  red
color attachment black        green
color error      red          white
color message    blue         white
color search     brightwhite  magenta
color status     brightyellow blue
color tree       red          white
color normal     blue         white
color tilde      green        white
color bold       brightyellow white
color markers    red          white

# Colour definitions when on a mono screen
mono bold      bold
mono underline underline
mono indicator reverse

# Colours for items in the reader
color header brightwhite cyan "^(From|Subject):"
color header red         cyan "^X-Junked-Because: "
color header red         cyan "^X-Virus-hagbard: .* FOUND"
mono  header bold             "^(From|Subject|X-Junked-Because|X-Virus-hagbard):"

# Colours for items in the index
color index brightblue  white ~N
color index brightgreen white "~N (~x hagbard\.davep\.org | ~h \"^In-[Rr]eply-[Tt]o: .*hagbard\.davep\.org\")"
color index red         white ~F
color index black       green ~T
color index brightwhite black ~D
mono  index bold              ~N
mono  index bold              ~F
mono  index bold              ~T
mono  index bold              ~D

# Highlights inside the body of a message.

# URLs
color body brightblue  white "(http|https|ftp|news|telnet|finger)://[^ \">\t\r\n]*"
color body brightblue  white "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
color body brightblue  white "news:[^ \">\t\r\n]*"
mono  body bold              "(http|https|ftp|news|telnet|finger)://[^ \">\t\r\n]*"
mono  body bold              "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
mono  body bold              "news:[^ \">\t\r\n]*"

# email addresses
color body brightblue  white "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
mono  body bold              "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"

# Various smilies and the like
color body brightgreen white "<[Gg]>"
  # <g>
color body brightgreen white "<[Bb][Gg]>"
  # <bg>
color body brightgreen white " [;:]-*[)>(<|]"
  # :-) etc...
color body brightblue  white "(^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$)"
  # *Bold* text.
color body brightblue  white "(^|[[:space:]])_[^[:space:]]+_([[:space:]]|$)"
  # _Underlined_ text.
color body brightblue  white "(^|[[:space:]])/[^[:space:]]+/([[:space:]]|$)"
  # /Italic/ text.

# Last, but not least, get mutt to display its version on startup.
push V
