From b502c1e8cbee89cf8a5d75793c7fec5a8e011eb5 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Sat, 16 May 2020 20:24:29 +0100 Subject: [PATCH] mutt: add mutt/ --- install | 2 +- mutt/aliases | 106 +++++++++++++++++++ mutt/gpg.rc | 82 +++++++++++++++ mutt/keybind | 286 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 475 insertions(+), 1 deletion(-) create mode 100644 mutt/aliases create mode 100644 mutt/gpg.rc create mode 100644 mutt/keybind diff --git a/install b/install index 369c820..c2fe7d5 100755 --- a/install +++ b/install @@ -11,7 +11,7 @@ BASE=$(pwd) # touch bashrc-extra mkdir -pv bak -for rc in *rc *profile tmux.conf bashrc.d ; do +for rc in *rc *profile tmux.conf bashrc.d mutt ; do if [ ! -r $rc ] ; then continue fi diff --git a/mutt/aliases b/mutt/aliases new file mode 100644 index 0000000..bb45653 --- /dev/null +++ b/mutt/aliases @@ -0,0 +1,106 @@ +alias ruth Ruth Wade +alias ruth-work Ruth Wade +alias roxanne Roxanne Dunning +alias dan Daniel Thompson +alias greg.bear Greg Bear +alias danb Daniel Berrange +alias charles Charles Talibard +alias lin Sia Lin Chan +alias matt Matt Taylor +alias culture busstop@culturelist.org +alias evan Evan Vetere +alias haakon Håkon T Sønderland +alias mattmcleod matt@boggle.org +alias rob Rob Andrews +alias carolm Carol Mulholland +alias richd Richard Downer +alias work pwalker@broadcom.com +alias marcus Marcus +alias brad Brad DeLong +alias elench elench@yahoogroups.com +alias liam Liam Wickins +alias paula Paula-Lou Masters +alias oletheros matt rhodes +alias simon Simon Avery +alias gord Gord Sellar +alias magnework Magne Vigulf Sandven +alias robtognoni Rob Tognoni +alias philpoole Phil Poole +alias paula paula lou +alias magne Henriette K. og Magne V. Sandven +alias kim Kim Randell +alias rik Rik Burke +alias rich Richard Baker +alias babb gARetH baBB +alias josh Josh Brandt +alias pagoda Pagoda +alias mepbm Middle Earth PBM +alias lalhome Lalith Vipulananthan +alias jolyon Jolyon Thompson +alias anthony Anthony Kemble +alias jeffmill eogan_ma@yahoo.com +alias carol Carol Mulholland +alias paul.appleby Paul Appleby +alias spamcop-submit SpamCop +alias hugh Hugh O\'Donnell +alias nk norskklassen@yahoogroups.com +alias flybuf games@flyingbuffalo.com +alias cryptography cryptography@metzdowd.com +alias claire-b Claire Bickell +alias charlie Charlie Bell +alias danh Dan Hon +alias mop Marianne Ohl Phillips +alias ptomblin Paul Tomblin +alias dad jrwalker49@hotmail.com +alias hannah Hannah Storie +alias dymond Andrew Dymond +alias kate Katherine Randell +alias bark bark-project@guckes.net +alias scott Scott Beeler +alias diana Diana +alias milan Milan +alias kathy k-drummond@excite.com +alias connolly John Connolly +alias jen Jenny Thompson +alias brendan Brendan Nelson +alias randi James Randi +alias me-darth Paul Walker +alias bert Bert Hindle +alias paulcox Paul Cox +alias ellen Ellen Carlsen +alias ali Alasdair Farmer +alias ali-work Ali Farmer +alias andy.sheen Andy Sheen +alias dave David Cook +alias chris Chris Smith +alias rachel Rachel Warrington +alias martinhughes Martin Hughes +alias kandis Kandis Ip +alias simon_dunn Simon Dunn +alias louise Jeremy and Louise Pocock +alias chris.vincent Chris Vincent +alias margaret Margaret Millar +alias bsllearners BritishSignLanguageLearners@yahoogroups.co.uk +alias diane.mcguinness Diane McGuinness +alias gill Gill Behenna +alias grange \"CSales.Ramada Bristol North, The Grange\" +alias claire Claire Walker +alias hodgeheg Andrew Slack +alias pinboard Pinboard +alias instapaper Instapaper +alias kindle paul_69395@kindle.com +alias kinnison Daniel Silverstone +alias mum FRIEDA WALKER +alias haywards Haywards +alias evernote Evernote +alias hoppy HoPpY +alias chriswright Christopher Wright +alias evernote_dev +alias jean Jean Vincent +alias steve Steve Colk +alias jon Jonathan Smith +alias andy Andrew Thomas +alias stash post+hdevore+7ac7b8@pinboard.in +alias kim.graham Kim Graham +alias nick.haydock STEVEN HAYDOCK +alias stefan Stefan Bates diff --git a/mutt/gpg.rc b/mutt/gpg.rc new file mode 100644 index 0000000..ab108d2 --- /dev/null +++ b/mutt/gpg.rc @@ -0,0 +1,82 @@ +# -*-muttrc-*- +# +# Command formats for gpg. +# +# This version uses gpg-2comp from +# http://muppet.faveve.uni-stuttgart.de/~gero/gpg-2comp.tar.gz +# +# $Id: gpg.rc,v 3.1 2002/03/26 22:23:58 roessler Exp $ +# +# %p The empty string when no passphrase is needed, +# the string "PGPPASSFD=0" if one is needed. +# +# This is mostly used in conditional % sequences. +# +# %f Most PGP commands operate on a single file or a file +# containing a message. %f expands to this file's name. +# +# %s When verifying signatures, there is another temporary file +# containing the detached signature. %s expands to this +# file's name. +# +# %a In "signing" contexts, this expands to the value of the +# configuration variable $pgp_sign_as. You probably need to +# use this within a conditional % sequence. +# +# %r In many contexts, mutt passes key IDs to pgp. %r expands to +# a list of key IDs. + +# Note that we explicitly set the comment armor header since GnuPG, when used +# in some localiaztion environments, generates 8bit data in that header, thereby +# breaking PGP/MIME. + +# decode application/pgp +set pgp_decode_command="/usr/bin/gpg --charset utf-8 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" + +# verify a pgp/mime signature +set pgp_verify_command="/usr/bin/gpg --no-verbose --quiet --batch --output - --verify %s %f" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="/usr/bin/gpg --passphrase-fd 0 --no-verbose --quiet --batch --output - %f" + +# create a pgp/mime signed attachment +# set pgp_sign_command="/usr/bin/gpg-2comp --comment '' --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_sign_command="/usr/bin/gpg --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f" + +# create a application/pgp signed (old-style) message +# set pgp_clearsign_command="/usr/bin/gpg-2comp --comment '' --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_clearsign_command="/usr/bin/gpg --charset utf-8 --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" + +# create a pgp/mime encrypted attachment +# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap /usr/bin/gpg --charset utf-8 --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" + +# create a pgp/mime encrypted and signed attachment +# set pgp_encrypt_sign_command="pgpewrap gpg-2comp --passphrase-fd 0 -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap /usr/bin/gpg --charset utf-8 --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" + +# import a key into the public key ring +set pgp_import_command="/usr/bin/gpg --no-verbose --import -v %f" + +# export a key from the public key ring +set pgp_export_command="/usr/bin/gpg --no-verbose --export --armor %r" + +# verify a key +set pgp_verify_key_command="/usr/bin/gpg --verbose --batch --fingerprint --check-sigs %r" + +# read in the public key ring +set pgp_list_pubring_command="/usr/bin/gpg --no-verbose --batch --quiet --with-colons --list-keys %r" + +# read in the secret key ring +set pgp_list_secring_command="/usr/bin/gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r" + +# fetch keys +# set pgp_getkeys_command="pkspxycwrap %r" + +# pattern for good signature - may need to be adapted to locale! + +# set pgp_good_sign="^gpg: Good signature from" + +# OK, here's a version which uses gnupg's message catalog: +set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`" + diff --git a/mutt/keybind b/mutt/keybind new file mode 100644 index 0000000..852c733 --- /dev/null +++ b/mutt/keybind @@ -0,0 +1,286 @@ +# Command bind : +# Syntax: bind +# Values for : +# generic, alias, attach, browser, editor, index, compose, pager, pgp, postpone +# Special values for : \t, , \r, \n, \e, , , , +# , , , , , , +# , , , , , ,..., +# +# Take care, there are some defaults hardcoded in keymap.c:km_init() +# Most defaults (Op*) are defined in functions.h. + + +# +# Generic keybindings (for all menus except pager!): +# +#bind generic \Ca first-entry +#bind generic \Ce last-entry +macro generic I ":exec change-folder\n!\n" \ + "Change to index" +macro pager I ":exec change-folder\n!\n" \ + "Change to index" +macro index A ":set pipe_decode\n|atw\n:unset pipe_decode\n" \ + "Add sender to whitelist" +macro pager A ":set pipe_decode\n|atw\n:unset pipe_decode\n" \ + "Add sender to whitelist" + +macro index \es "sa-learn --spam\n=spam.done\n" \ + "SpamAssassin learn as spam, save in spam.done" +macro index \eh "sa-learn --ham\n" \ + "SpamAssassin learn as ham" + +#macro index \es "crmlearn --learnspam\n=spam.done\n" \ +# "crm114 learn as spam, save in spam.done" +#macro index \eh "crmlearn --learnnonspam\n" \ +# "crm114 learn as ham" + +#macro generic \ee "!joe /home/paul/.muttrc\n" \ +# "Edit .muttrc" +macro generic \e1 ":set pgp_default_version=gpg ?pgp_default_version\n" \ + "switch to GNU-PG" +macro generic \e2 ":set pgp_default_version=pgp2 ?pgp_default_version\n"\ + "switch to PGP 2.*" +macro generic \e5 ":set pgp_default_version=pgp5 ?pgp_default_version\n"\ + "switch to PGP 5.*" +macro generic \e6 ":set pgp_default_version=pgp6 ?pgp_default_version\n"\ + "switch to PGP 6.*" + + +# +# index, OpMain, MENU_MAIN +# (Main Index) +# + +bind index previous-entry +bind index next-entry +bind index delete-message +bind index * flag-message +bind index = noop +macro index \ea "!$EDITOR ~/.mutt/aliases\n:source ~/.mutt/aliases\n" \ + "Edit aliases file and reload it" +macro index \Cb ":set pipe_decode\n|urlview\n:unset pipe_decode\n" \ + "call urlview to extract URLs out of a message" +macro index \eb "/~B " "Search in message headers and boddies" +bind index C noop +bind index \Ce last-entry +bind index \Ca first-entry +bind index g change-folder +bind index G group-reply +bind index \eg change-folder-readonly +bind index i sync-mailbox +bind index J noop +bind index K noop +bind index n next-entry +bind index \Cn search-next +#bind index P recall-message +bind index p previous-entry +#bind index \ep post-message # only with NNTP patch +bind index \eq query +macro index Q ":set quit=yes\nq" "Quit mutt without asking" +macro index \er ":source ~/.muttrc\n" "Reload muttrc" +#bind index S copy-message +macro index \eu "|uudeview -\n" "UUdecode Mail(s)" +bind index x sync-mailbox +bind index y print-message + +#bind index ??? next-thread +#bind index ??? read-subthread +#bind index ??? tag-subthread +#bind index ??? undelete-subthread +#bind index ??? next-unread +#bind index ??? previous-unread +#bind index ??? search-opposite +#bind index ??? current-top +#bind index ??? current-middle +#bind index ??? current-bottom +#bind index ??? exit + + + +# +# pager, OpPager, MENU_PAGER +# (Message Pager) +# + +bind pager previous-line +bind pager next-line +bind pager previous-entry +bind pager next-entry +bind pager delete-message +bind pager ^ noop +bind pager * flag-message +macro pager \; "" "Goto index and enter tag-prefix" +macro pager \e1 ":set pgp_default_version=gpg ?pgp_default_version\n" \ + "switch to GNU-PG" +macro pager \e2 ":set pgp_default_version=pgp2 ?pgp_default_version\n"\ + "switch to PGP 2.*" +macro pager \e5 ":set pgp_default_version=pgp5 ?pgp_default_version\n"\ + "switch to PGP 5.*" +macro pager \e6 ":set pgp_default_version=pgp6 ?pgp_default_version\n"\ + "switch to PGP 6.*" +bind pager \Ca top +#macro pager \ea "!~/.mutt/mutt-alias.pl\n:source ~/.mutt/source_me\n" +macro pager \ea "!$EDITOR ~/.mutt/aliases\n:source ~/.mutt/aliases\n" \ + "edit aliases file and reload it" +macro pager \Cb ":set pipe_decode\n|urlview\n:unset pipe_decode\n" \ + "call urlview to extract URLs out of a message" +#bind pager C copy-message +bind pager \ec noop +bind pager \Ce bottom +macro pager \Cf "" \ + "Forget passphrase and redisplay message" +macro pager \ef "|view-x-face\n" "Show X-Face" +bind pager g change-folder +bind pager G group-reply +bind pager \eg change-folder-readonly +macro pager \e\e0 ":set pager_index_lines=4\n:macro pager I \\e\\e1 toggle\\ pager_index_lines\n" "internal function" +macro pager \e\e1 ":set pager_index_lines=0\n:macro pager I \\e\\e0 toggle\\ pager_index_lines\n" "internal function" +#macro pager I "\e\e1" "toggle pager_index_lines" +#macro pager l "" "Goto index and limit" +macro pager \el "|less\n" "View plain message using less" +bind pager n next-entry +bind pager \Cn search-next +bind pager p previous-entry +#bind pager P recall-message +bind pager \Cp noop +macro pager \eq "" "Go to index and start a query." +macro pager \er ":source ~/.muttrc\n" "Reload muttrc" +#bind pager S copy-message +macro pager \eu "|uudeview -\n" "uudecode mail" +bind pager w previous-page # page up like in less +macro pager x "" "Goto index and sync mailbox" +bind pager y print-message + +#bind pager ??? next-thread +#bind pager ??? previous-thread +#bind pager ??? read-subthread +#bind pager ??? undelete-subthread +#bind pager ??? search-opposite +#bind pager ??? next-unread +#bind pager ??? previous-new +#bind pager ??? previous-unread +#bind pager ??? half-up +#bind pager ??? half-down + + + +# +# attach, OpAttach+OpGeneric, MENU_ATTACH +# (View Attachments Menu) +# + +macro attach \Cb ":set pipe_decode\n|urlview\n:unset pipe_decode\n" \ + "Call urlview to extract URLs out of a message" +bind attach G group-reply +bind attach i exit +macro attach \el "|less\n" "View plain message using less" + # view plain message +bind attach Q exit +macro attach \eu "|uudeview -\n" "uudecode attachment" + # uudecode attachment +bind attach v view-attach + +#bind attach ??? current-top +#bind attach ??? current-middle +#bind attach ??? current-bottom + + + +# +# compose, OpCompose+OpGerneric, MENU_COMPOSE +# (Composing Menu, shows Attachments beforesending) +# + +bind compose attach-file +bind compose detach-file +macro compose \el "|less\n" "View plain message using less" +macro compose \Cp "Fpgp +clearsig=on -fast\ny" \ + "PGP sign mail without MIME" + # pgp sign mail without MIME +bind compose Q exit +macro compose S "Fpgp +clearsig=on -fast\ny^T^Uapplication/pgp; format=text; x-action=sign\n" \ + "PGP sign mail with oldstyle MIME" +bind compose v view-attach + +#bind compose ??? search-opposite +#bind compose ??? current-top +#bind compose ??? current-middle +#bind compose ??? current-bottom + + + +# +# browser, OpBrowser+OpGeneric, MENU_FOLDER +# (File-Browser. Shows files in a directory) +# + +#bind browser ??? search-opposite +#bind browser ??? current-top +#bind browser ??? current-middle +#bind browser ??? current-bottom + + + +# +# alias, OpGeneric, MENU_ALIAS +# (Lists all aliases) +# + +#bind alias ??? search-opposite +#bind alias ??? current-top +#bind alias ??? current-middle +#bind alias ??? current-bottom + + + +# +# pgp, OpPgp+OpGeneric, MENU_PGP +# (Lists all matching PGP Keys from Keyring) +# + +bind pgp \Cn search-next +bind pgp v view-name + +#bind pgp ??? search-opposite +#bind pgp ??? current-top +#bind pgp ??? current-middle +#bind pgp ??? current-bottom + + + +# +# query, OpQuery, MENU_QUERY +# (Lists all matching Query results) +# + +bind query \eq query + +#bind query ??? search-opposite +#bind query ??? current-top +#bind query ??? current-middle +#bind query ??? current-bottom + + + +# +# , OpPost, MENU_POST +# (Postpone-Menu, lists all postponed messages) +# *not* yet configurable!!! +# + +#bind postpone ??? search-opposite +#bind postpone ??? current-top +#bind postpone ??? current-middle +#bind postpone ??? current-bottom + + + +# +# editor, OpEditor, MENU_EDITOR +# (Command line editor) +# + +bind editor delete-char + +######################## end of file ###################################### +