# -*- mode: conf; -*- # --- preferences set from=spwhitton@spwhitton.name set realname="Sean Whitton" set reverse_name = yes set reverse_realname = no set envelope_from = yes set use_from = yes set folder=~/.fmail/ set spoolfile = +inbox set record = +sent # set postponed = +drafts # set certificate_file = ~/.mutt/certificates set move = no set delete = ask-yes #unset edit_hdrs set edit_hdrs set include set reply_to set abort_nosubject = no # alternates '(spwhitton@spwhitton.name)|(spwhitton@arizona.edu)' set hdr_format="%4C %Z %{%m/%d} %-15.15F (%4c) %s" unset help set mail_check=20 set timeout=15 set pager_index_lines=8 unset arrow_cursor set fast_reply set pager_context = 1 set reply_to = ask-yes set pager_stop set tmpdir="~/local/mutt" set resolve = yes set noconfirmappend set abort_unmodified = no set mark_old = no # better with mbsync set editor = "emacsclient -t -a \"mg -n -f auto-fill-mode +8\"" set tilde set smart_wrap set wrap=80 unset markers set wait_key=no set sort = last-date-received # use 'R' to recall, rather than asking to recall when we compose -- # this makes it less inconvenient to have multiple drafts queued set recall = no # --- CatMail hooks # reply-hook . 'set from="Sean Whitton " use_from' # reply-hook "~f arizona.edu" 'set from="Sean Whitton " use_from' # reply-hook "~t spwhitton@arizona.edu" 'set from="Sean Whitton " use_from' # send2-hook . 'set from="Sean Whitton " use_from' # send2-hook "~t arizona.edu" 'set from="Sean Whitton " use_from' # See on # avoiding infinite loops with send2-hooks # from hooks: use CatMail address for members of cmrecps group group -group cmrecps -rx edu$ -rx ac.uk$ send2-hook "!~f spwhitton@arizona.edu ^%C cmrecps" 'push Sean\ Whitton\ ' # PGP hooks: encrypt to members of the pgp_full group, do nothing for # members of pgp_none, sign to everyone else group -group pgp_none -rx arizona.edu$ send-hook "." "set crypt_autosign=no" send-hook "." "set crypt_autoencrypt=no" send-hook "!^%Cpgp_none" "set crypt_autosign=yes" send-hook "^%Cpgp_full !^%Cpgp_none" "set crypt_autoencrypt=yes" send-hook '!~g !~G ^%C pgp_full !^%C pgp_none' 'push b' send-hook '!~g !^%C pgp_full !^%C pgp_none' 'push s' send-hook '(~G|~g) ^%C pgp_none' 'push c' # --- GPG settings # can't use gpgme because some Debian services require inline PGP # signatures, which gpgme doesn't support set crypt_use_gpgme = no # general preferences about signing and encrypting set pgp_autosign = yes set pgp_sign_as = 0x0F56D0553B6D411B set pgp_replysign = yes set pgp_replysignencrypted = yes set pgp_replyencrypt = yes set pgp_timeout = 120 set fcc_clear = no # apparently unknown variable #set pgp_encrypt_self = yes set pgp_use_gpg_agent = yes #set pgp_strict_enc # redefine some settings from Debian's /etc/Muttrc.d/gpg.rc: # additionally use Debian keyrings to verify sigs set pgp_verify_command="gpg --keyring /usr/share/keyrings/debian-keyring.gpg --keyring /usr/share/keyrings/debian-maintainers.gpg --keyring /usr/share/keyrings/debian-nonupload.gpg --keyring /usr/share/keyrings/debian-role-keys.gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" # absolutely ensure that encrypted messages are readable by me (this # is probably unnecessary with NeoMutt thanks to pgp_encrypt_self above) set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --use-agent --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x0F56D0553B6D411B -- -r %r -- %f" set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg --use-agent --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x0F56D0553B6D411B -- -r %r -- %f" # --- message headers hdr_order From: Date: x-oxford-username: Message-Id: To: Cc: Reply-To: Subject: ignore * unignore From: Date: x-oxford-username: Message-Id: To: Cc: Reply-To: Subject: # --- mailboxes mailboxes +inbox +sent +lists +haskell +spam +feeds # --- message part viewing auto_view text/html alternative_order text/html text/plain text/enriched text set mailcap_path = ~/.mutt/mailcap # --- addresses #set alias_file=~/doc/mutt-aliases # this is the main alias file #source ~/doc/mutt-aliases #source ~/doc/mutt-groups # keep shortcut groups in a separate # file for simplicity # --- key bindings # filtering function keys, some from Jonathan # macro index "l((~N|~O)!~D)" "limit to mail to be processed" # macro index "lall\n" "limit to all mail" # macro index,pager "c=inbox" "switch to inbox" # macro index,pager "c=sent" "switch to sent" bind index,pager next-unread-mailbox # on startup, don't show new messages: distractions # works when I type mutt into a terminal, but not if I use xmonad launcher shortcut... # folder-hook inbox push "!~N!~O!~D" # quickly save attachments, woo macro attach S "~/tmp/y" # # extract URLS--config from http://www.memoryhole.net/~kyle/extract_url/ # # the command to use these is Ctrl-J which picks the right one # macro index,pager ,b " set my_pdsave=\$pipe_decode\ # unset pipe_decode\ # extract_url.pl\ # set pipe_decode=\$my_pdsave" "get URLs" # macro index,pager ,B " set my_pdsave=\$pipe_decode\ # set pipe_decode\ # extract_url.pl\ # set pipe_decode=\$my_pdsave" "decrypt message, then get URLs" # message-hook . 'macro index,pager \cj ,b "URL viewer"' # message-hook ~G 'macro index,pager \cj ,B "URL viewer"' # # quickly make a TODO item and flag so it doesn't get archived # # macro index \co "!k|~/bin/capture-mail\nj" # # macro pager \co "q!k|~/bin/capture-mail\nj" # macro index \co "|~/bin/capture-mail\nj" # macro pager \co "q|~/bin/capture-mail\nj" # open RSS links in browser (fails because for some reason mutt can't bind # macro index,pager "grep '\^http' | sed 's/\^/-new-tab /' | xargs firefox" "open all URLs at beginning of lines in message in browser tabs" # # open rss2email source link in browser # # macro pager "grep \"\^URL: http\" | xargs firefox -new-tab" "open rss2email source link" # macro pager ,j "egrep 'X-RSS-URL:' | cut -d' ' -f2- | xargs firefox -new-tab" "open rss2email source link" # folder-hook feeds 'macro pager \cj ,j "URL viewer"' # # train spam filter # macro index,pager ,s "unset resolveNset resolve+spam" "mark as spam" # easier scrolling bind pager ] previous-page bind pager [ next-page # Emacs-style bindings bind index n next-undeleted bind pager n next-undeleted bind index p previous-undeleted bind pager p previous-undeleted bind index ! flag-message bind pager ! flag-message bind pager t display-toggle-weed # # printing # bind index,pager \cP print-message # # safety, since mbsync trash functionality doesn't work with FastMail # bind generic,index,pager d noop # bind generic,index,pager D noop # bind generic,index,pager \cd noop # # ... but let me delete notes made on tablet computer # folder-hook . bind generic,index,pager d noop # folder-hook "notes" bind index,pager d delete-message # # ... and delete mistaken spam trains # folder-hook "spam" bind index,pager d delete-message # --- colours # make flagged & new messages more obvious color index brightred black "~F" color index brightwhite black "~N|~O" # --- mailing lists # lists [0-9]+.*@bugs.debian.org # subscribe debian-backports@lists.debian.org # subscribe debian-devel@lists.debian.org # --- mbsync # macro generic,index,pager G "mbsync fastmail"