#set sendmail="/usr/bin/msmtp"
#set from=swatkins@fastmail.fm
#set use_from=yes
my_hdr From: Sam Watkins <sam@ucm.dev>
set from=sam@ucm.dev
set folder=~/mail
set alias_file=~/.mail_aliases
source ~/.mail_aliases
unset markers

# disable quit and exit, don't want to exit accidentally
# and re-bind exit to shift-X  (must save with $ first)
bind index q noop
bind index x noop
bind index X exit

# sam's macros:
#
macro index <f2> "l(~N|~O) (~h \^X-Spam-Level:\\ [*]|~h ^X-Mailer:\\ constantcontact|~f podarbo\.com|~f christianmingle\.com|~f newsmax\.com|~f mydailymoment\.com) !(~f a2hosting.com|~f moreland.vic.gov.au|~f frontier.co.uk|~f nevmed@gmail.com|~f @ted.com|~f @indiegamestand.com|~i @balrog.nipl.net|~f @wonderlandfunpark.com.au|~f @regenthoneyeater.org.au|~f @zoo.org.au|~f @iuf.org|~f logcheck@|~f @cleverdigital.com.au|~f @mavericksolutions.com.au|~f @bandcamp.com|~f @itch.io|~f @quora.com|~f @imaginarts.tv|~f @pandora.com|~f @storyofstuff.org|~f @isocracy.org|~f @telltalegames.com|~f @topcoder.com|~f @accounts.google.com|~f greenpeace.org|~f loans.com.au|~f okgo.net|~f @indiegogo.com|~f @aikidoshudokan.com|~f @centrecom.com.au|~f @googlecode.com|~f @rasv.com.au|~f @aikidojournal.com|~f itch.io|~f coles.com.au|~f netflix.com|~f elitedangerous.com|~f @boilingsteam.com|~f northland.marketing@|~f @toyota.com.au|~f @recognise.org.au|~f @walkfree.org|~f @theintegraldojo|~f @nab.com.au|~f @sarahhansonyoung.com|~f @storybundle.com)<enter>"
#|~f @googlegroups.com)<enter>"
macro index <f3> "l(~N|~O) (~f nagios|~f mailman|~s BANNED\\ contents|~f bugzilla-daemon|~f \"Cron Daemon\"|~f \"Content-filter\"|~f podarbo\.com|~f Mail\\ Delivery|~f HostTracker\\ Reports|~f logcheck@|~f @paypal.com|~f meetup.com|~f ubuntu.com|~f IsThereAnyDeal.com|~f root@|~f daemon@)<enter>"
macro index <f4> "l(~N|~O) (~f change.org|~f getup.org.au|~f labourstart.org|~f @et.org.au|~f avaaz.org|~f ohotto.com|~f care2.com|~f sumofus.org|~f wilderness.org.au|~f iuf.org|~f care2team.com|~f greenpeace.org|~f survivalinternational.org|~f greenamerica.org|~f zoo.org.au|~f watchdog.net|~f indiegogo.com|~f democracyinaction.org|~f amnesty.org|~f choice.com.au|~f thedaywefightback.org|~f humanappeal.org.uk|~f walkfree.org|~f jubileedebtcampaign.org.uk|~f uaw.org|~f fooddemocracynow.org|~f communityrun.org|~f freepress.net|~f acfonline.org.au|~f actu.org.au)<enter>"
macro index <f5> "l(~N|~O) (~f stackoverflow.com|~f stackexchange.com|~f facebook.com|~f facebookmail.com|~f plus.google.com|~f feedmyinbox.com|~f youtube.com|~f linkedin.com)<enter>"
macro index <f6> "l(~N|~O) (~C flow-based-programming|~s melbourne-pug|~s melbourne-pm|~s OSDC:ClubAnnounce|~f OpenPandora\\ Boards|~C @suckless.org|~C @lists.starchlinux.org|~C @lists.prgmr.com|~f pandoralive@sanqualis.com|~f @currentcircus.com|~C concatenative@yahoogroups.com|~f @ted.com|~C ccan@lists.ozlabs.org)<enter>"
macro index <f7> "l(~N|~O)<enter>"
macro index <f8> "l(~N|~O|~F)<enter>"
#macro index <f9> "lall<enter>"
macro index <f9> "l(~f time\\ out|~f thatsmelbourne|~f onlymelb|~f beat.com.au)<enter>"

macro index,pager S "<save-message>+spam<Enter>"

# macro index,pager 1 "<save-message>+1<Enter>"
# macro index,pager 2 "<save-message>+2<Enter>"
# macro index,pager 3 "<save-message>+3<Enter>"
# macro index,pager 4 "<save-message>+4<Enter>"
# macro index,pager 5 "<save-message>+5<Enter>"
# macro index,pager 6 "<save-message>+6<Enter>"
# macro index,pager 7 "<save-message>+7<Enter>"
# macro index,pager 8 "<save-message>+8<Enter>"
# macro index,pager 9 "<save-message>+9<Enter>"
# macro index,pager 0 "<save-message>+0<Enter>"

ignore *
unignore from: subject to cc mail-followup-to date x-mailer x-url
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
unignore posted-to:
unignore x-spam-status: x-spam-level:
#unignore received:

auto_view text/html

set autoedit			# go to the editor right away when composing
set noconfirmappend		# don't ask me if i want to append to mailboxes
set copy=yes			# always save a copy of outgoing messages
set delete=yes			# purge deleted messages without asking
set edit_headers		# let me edit the message header when composing
set index_format="%4C %Z %{%m/%d} %-15.15F (%4c) %s" # format of the index
set help			# show the help lines
set include			# always include messages when replying
set mbox=+INBOX			# where to store read messages
set mime_forward=ask-no		# use message/rfc822 type to forward messages
set move=no				# don't ask about moving messages, just DON'T do it!
set pager_index_lines=6		# how many index lines to show in the pager
set postponed=+drafts		# mailbox to store postponed messages in
set print_command=/bin/false	# how to print things (I like to save trees)
set noprompt_after		# ask me for a command after the external pager exits
set read_inc=25			# show progress when reading a mailbox
set record=+INBOX		# default location to save outgoing mail
set reply_to			# always use reply-to if present
set reverse_name		# use my address as it appears in the message
				# i am replying to
set nosave_empty		# remove files when no messages are left
#set signature="~/.signature"	# file which contains my signature

set sort=threads		# primary sorting method

#set sort_aux=reverse-date-received	# how to sort subthreads
#set sort_aux=last-date		# date of the last message in thread
set sort_browser=reverse-date	# how to sort files in the dir browser
set spoolfile=+/                # where my new mail is located
#set spoolfile='~/mail/gmail/[Gmail].All Mail'	# where my new mail is located
#set status_format="-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?  %l]---(%s)-%>-(%P)---"
set tilde			# virtual lines to pad blank lines in the pager
set nouse_domain		# don't qualify local addresses with $domain
set implicit_autoview=yes	# pager shows parts having a mailcap viewer
set pgp_verify_sig=no		# don't automatically verify message signatures
set write_inc=25		# show progress while writing mailboxes

#color normal white black
color normal default default
color hdrdefault red default
color quoted brightblue default
color signature red default
color indicator brightyellow red
color error brightred default
color status yellow blue
color tree magenta default	# the thread tree in the index menu
color tilde magenta default
color message brightcyan default
color markers brightcyan default
color attachment brightmagenta default
color search default green	# how to hilite search patterns in the pager

color header brightred default ^(From|Subject):
color body magenta default "(ftp|http|https)://[^ ]+"	# point out URLs
color body magenta default [-a-z_0-9.]+@[-a-z_0-9.]+	# e-mail addresses
color underline brightgreen default

mono quoted bold

bind generic "\e<" first-entry	# emacs-like bindings for moving to top/bottom
bind generic \e> last-entry
bind generic { top-page
bind generic } bottom-page
bind generic \177 last-entry

macro index \cb "<pipe-message> urlview<Enter>"	# simulate the old browse-url function


#macro index \#	"<search>bug<Enter>"	# search for bugs
#macro index "\""	"<enter-command> set realname=\"real hairy macro\" ?realname<Enter>" # and a comment to boot!
#macro index f1	"<enter-command>woohoo!"

bind pager G bottom	# just like vi and less
#macro   pager   \Ck     "<pipe-message> pgp -kaf<Enter>"   # a comment is valid here
#macro pager X "<pipe-message> morepgp<Enter>"	# pipe PGP message to a script

#bind editor \cy eol	# make ^Y jump to the end of the line

#my_hdr X-Useless-Header: Look ma, it's a \# sign! # real comment
#my_hdr X-Operating-System: `uname -a`

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Specify default filename when saving messages
#
#	save-hook [!]<pattern> <mailbox>
#
# <mailbox> is provided as default when saving messages from <pattern>

#save-hook mutt- =mutt-mail
#save-hook aol\\.com$ +spam
#save-hook ^judge +diplomacy

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Multiple spool mailboxes
#
#	mbox-hook [!]<pattern> <mbox-mailbox>
#
# Read mail in <pattern> is moved to <mbox-mailbox> when <pattern> is
# closed.

#mbox-hook =mutt-users.in =mutt-users
#mbox-hook +TEST +inbox

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Change settings based upon message recipient
#
#	send-hook [!]<pattern> <command>
#
# <command> is executed when sending mail to an address matching <pattern>

#send-hook mutt- 'set signature=~/.sigmutt; my_hdr From: Mutt User <user@example.com>'

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Specify where to save composed messages
#
#	fcc-hook [!]<pattern> <mailbox>
#
# <pattern> is recipient(s), <mailbox> is where to save a copy

#fcc-hook joe +joe
#fcc-hook bob +bob

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Change settings based on mailbox
#
#	folder-hook [!]<pattern> <command>
#
# <command> is executed when opening a mailbox matching <pattern>

#folder-hook .		'set sort=date-sent'
#folder-hook mutt	'set index_format="%4C %Z %02m/%02N %-20.20F (%4l) %s"'
#folder-hook =mutt	my_hdr Revolution: \#9 # real comment

#folder-hook .		'set reply_regexp="^re:[ \t]*"'

# this mailing list prepends "[WM]" to all non reply subjects, so set
# $reply_regexp to ignore it
# Warning: May break threads for other people.
#folder-hook +wmaker	'set reply_regexp="^(re:[ \t]*)?\[WM\][ \t]*"'

mailboxes ! +INBOX +lists #+247

unhdr_order *				# forget the previous settings
hdr_order date from subject to cc

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Identify mailing lists I subscribe to
#
#	lists <list-name> [ <list-name> ... ]

#lists ^mutt-dev@mutt\\.org$ ^mutt-users@mutt\\.org$
lists @luv\\.asn\\.au$ @googlegroups\\.com$ @linuxchix\\.org$

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Automatically use entries from ~/.mailcap to view these MIME types
#
#	auto_view <type> [ <type> ... ]

auto_view application/x-gunzip
auto_view application/x-gzip

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Scoring
#
#	score <pattern> <value>
#
# 9999 and -9999 are special values which cause processing of hooks to stop
# at that entry.  If you prefix the score with an equal sign (=), the score
# is assigned to the message and processing stops.

#score '~f ^me@cs\.hmc\.edu$' 1000
#score '~t mutt | ~c mutt' =500
#score '~f aol\.com$' -9999

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# I use Mutt on several different machines, so I put local config commands
# in a separate file so I can have the rest of the settings the same on all
# machines.
#

source ~/local/muttrc	# config commands local to this site

alternative_order text/plain text/html

# gpg settings
set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x2676BE52 -- -r %r -- %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x2676BE52 -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" 
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" 
#set pgp_autosign=yes
set pgp_sign_as=0x2676BE52
set pgp_replyencrypt=yes
set pgp_timeout=1800
set pgp_good_sign="^gpg: Good signature from"
set pgp_auto_decode=yes
unset pgp_autoencrypt



# EOF
