# -*- Muttrc -*-

## ========================================================================
#      ££       file : $HOME/mutt/muttrc
#   __,ôô         by : MuttrcBuilder <http://mutt.netliberte.org>
#    \\,_O    purpose: Setup file for the Mail program "Mutt"
#    /~
## ========================================================================

reset all
unhook *


#==========================================================================
# User description (name+email)
#--------------------------------------------------------------------------

set realname = "Ulf Erikson"
set from = "ulferikson@yahoo.com"
# set alternates = '((user|first\.last)@company\.com)|(user@(first|second)\.org)'
set use_from = yes
set envelope_from = yes
set reverse_name = yes
set reverse_realname = no


#==========================================================================
# OS Specifiques options
#--------------------------------------------------------------------------

set tmpdir = "C:/TEMP"
set editor = "C:/apps/jed/jed.bat %s -tmp -f mail_mode"
set query_command = "C:/mutt/bin/abook --mutt-query %s"
set print = yes
set print_command = "C:/apps/mutt/bin/mail2rtf.bat %s"
set sendmail = "builtin"		# requires the smtp patch


#==========================================================================
# SMTP    --  Only if smpt patch has been applied
#--------------------------------------------------------------------------

set smtp_serv = "smtp.mail.yahoo.com"
set smtp_user = "ulferikson"	# log on to $smtp_serv as $smtp_user
# set smtp_pass = ""            # use ESMPT and "AUTH LOGIN"
# Warning: password is sent as plain text (base64 encoded. no encyption)


#==========================================================================
# POP    --  Only if compiled with pop support
#--------------------------------------------------------------------------

set pop_host = "pop.mail.yahoo.com"
set pop_user = "ulferikson"
# set pop_pass = ""
set pop_delete = yes


#==========================================================================
# Folderes and Mailboxes
#--------------------------------------------------------------------------

set spoolfile = "~/Mail/inbox"
set folder = "~/Mail"
set mbox = "+received"
set record = "+sent"
set postponed = "+postponed"


#==========================================================================
# Mailing lists
#--------------------------------------------------------------------------

unlists *
subscribe mutt-users
lists mutt-dev


#==========================================================================
# Headers
#--------------------------------------------------------------------------

ignore *
unignore from: reply-to mail-followup-to to cc bcc subject date
unhdr_order *
hdr_order "From:" "Reply-To:" "Mail-Followup-To:" "To:" "Cc:" "Bcc:" "Subject:" "Date:"
set weed = yes

unmy_hdr *
set hdrs = yes
set user_agent = yes


#==========================================================================
# Signatures
#--------------------------------------------------------------------------

set sig_dashes = yes
set signature = "~/mutt/signature.txt"


#==========================================================================
# General mutt options
#--------------------------------------------------------------------------

set help = yes
set status_on_top = yes
set date_format = "%Y-%m-%d, %H:%M %Z"
set menu_scroll = yes
set beep = no
set charset = "cp850"


#==========================================================================
# Alias menu and aliases
#--------------------------------------------------------------------------

set alias_file = "~/mutt/aliases"
source "~/mutt/aliases"


#==========================================================================
# Index menu
#--------------------------------------------------------------------------

set sort = threads
set sort_aux = date             # if $sort == threads
set arrow_cursor = yes


#==========================================================================
# Pager menu
#--------------------------------------------------------------------------

set pager = "builtin"
set tilde = yes
set pager_stop = yes

# mime_lookup application/octet-stream
# auto_view text/html application/msword
# alternative_order text/plain text/enriched text/html text


#==========================================================================
# Compose menu and composing messages
#--------------------------------------------------------------------------

set edit_headers = yes
set recall = no
set fast_reply = yes
set attribution = "* %n <%a> [%d]:"
set mime_forward = ask-yes
set send_charset = "us-ascii:iso-8859-1:utf-8"


#==========================================================================
# Colours
#--------------------------------------------------------------------------

# [generic]
color normal	 white		black
color error	 red		white
color message	 blue		white
color search	 red		white
color indicator	 brightyellow	brightred
color status	 white		blue

# [index]
color index	 magenta	black	"~A"		# all
color index	 yellow		black	"~l"		# lists
color index	 green		black	"~p"		# to me
color index	 red		black	"~P"		# by me
color index	 blue		black	"~D"		# deleted
color index	 white		black	"~T"		# tagged
color tree	 white		black

# [pager]
color hdrdefault cyan		blue
color header	 brightgreen	blue	"^from: "
color header	 green		blue	"^date: "
color header	 brightyellow	blue	"^subject: "
color body	 red		black	"(((ht|f)tp)|news|telnet|finger|mailto):(//)?[^[:space:]\)>\"]+"
color body	 red		black	"(www|ftp)\\.[-a-z0-9\\.]+"
color body	 red		black	"[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
color body	 brightwhite	black	"(^|[[:space:]])_[[:alpha:]]+_([[:space:]]|$)"
color body	 brightwhite	black	"(^|[[:space:]])\\*[[:alpha:]]+\\*([[:space:]]|$)"
color bold	 brightyellow	black
color underline	 brightcyan	black
color markers	 brightred	black
color quoted	 cyan		black
color quoted1	 green		black
color attachment magenta	black 
color signature	 red		black
color tilde	 blue		black


#==========================================================================
# Key bindings
#--------------------------------------------------------------------------

bind generic	zt	current-top
bind generic	zz	current-middle
bind generic	zb	current-bottom

bind index	x	noop
bind index	q	noop
bind index	Q	quit
bind index	<up>	previous-entry
bind index	<down>	next-entry
bind index	<delete> delete-message
bind index	<insert> undelete-message

bind pager	<down>	next-line
bind pager	<up>	previous-line

macro index	"\n"	"<enter-command>set weed<enter><display-message>" \
			"Display message with header weeding switched on"
macro index	"h"	"<enter-command>unset weed<enter><display-message>" \
			"Display message with complete header"

macro pager	",z"	"\
<enter-command>set pager_index_lines=5<enter>\
<enter-command>macro pager z ,Z \"toggle zoom\"<enter>" "zoom out"
macro pager	",Z"	"\
<enter-command>set pager_index_lines=0<enter>\
<enter-command>macro pager z ,z \"toggle zoom\"<enter>" "zoom in"
macro pager z ,z	"toggle zoom"

macro index	\ea	"<shell-escape>/mutt/bin/abook.exe<enter>"
bind index	\ca	query

macro index "p" "\
<enter-command>set charset=iso-8859-1<enter>\
<print-message>\
<enter-command>set charset=cp850<enter>" "print the current entry"
macro pager "p" "\
<enter-command>set charset=iso-8859-1<enter>\
<print-message>\
<enter-command>set charset=cp850<enter>" "print the current entry"


# EOF
