Browse Source

Improving Mutt PGP

Bob Mottram 11 years ago
parent
commit
dc7e01e7cd
1 changed files with 5 additions and 69 deletions
  1. 5
    69
      beaglebone.txt

+ 5
- 69
beaglebone.txt View File

@@ -2029,8 +2029,7 @@ bind pager \Cn sidebar-next
2029 2029
 bind pager \Co sidebar-open
2030 2030
 
2031 2031
 # ctrl-b toggles sidebar visibility
2032
-macro index \Cb '<enter-command>toggle sidebar_visible<enter><refresh>' "toggle sidebar"
2033
-macro pager \Cb '<enter-command>toggle sidebar_visible<enter><redraw-screen>' "toggle sidebar"
2032
+macro index,pager \Cb '<enter-command>toggle sidebar_visible<enter><redraw-screen>' "toggle sidebar"
2034 2033
 
2035 2034
 # esc-m Mark new messages as read
2036 2035
 macro index <esc>m "T~N<enter>;WNT~O<enter>;WO\CT~T<enter>" "mark all messages read"
@@ -2038,76 +2037,13 @@ macro index <esc>m "T~N<enter>;WNT~O<enter>;WO\CT~T<enter>" "mark all messages r
2038 2037
 
2039 2038
 # GPG/PGP integration
2040 2039
 
2041
-# decode application/pgp
2042
-set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
2043
-
2044
-# verify a pgp/mime signature
2045
-set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
2046
-
2047
-# decrypt a pgp/mime attachment
2048
-set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
2049
-
2050
-# create a pgp/mime signed attachment
2051
-# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
2052
-set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
2053
-
2054
-# create a application/pgp signed (old-style) message
2055
-# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
2056
-set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
2057
-
2058
-# create a pgp/mime encrypted attachment
2059
-# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
2060
-set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
2061
-
2062
-# create a pgp/mime encrypted and signed attachment
2063
-# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
2064
-set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
2065
-
2066
-# import a key into the public key ring
2067
-set pgp_import_command="gpg --no-verbose --import %f"
2068
-
2069
-# export a key from the public key ring
2070
-set pgp_export_command="gpg --no-verbose --export --armor %r"
2071
-
2072
-# verify a key
2073
-set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r"
2074
-
2075
-# read in the public key ring
2076
-set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r"
2077
-
2078
-# read in the secret key ring
2079
-set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
2080
-
2081
-# fetch keys
2082
-# set pgp_getkeys_command="pkspxycwrap %r"
2083
-# This will work when #172960 will be fixed upstream
2084
-# set pgp_getkeys_command="gpg --recv-keys %r"
2085
-
2086
-# pattern for good signature - may need to be adapted to locale!
2087
-
2088
-# set pgp_good_sign="^gpgv?: Good signature from "
2089
-
2090
-# OK, here's a version which uses gnupg's message catalog:
2091
-# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
2092
-
2093
-# This version uses --status-fd messages
2094
-set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
2095
-
2096 2040
 # this set the number of seconds to keep in memory the passphrase used to encrypt/sign
2097 2041
 set pgp_timeout=60
2098 2042
 
2099
-
2100
-# ctrl-i imports a PGP public key
2101
-macro index \Ci pgp_import_command "Import PGP public key"
2102
-macro pager \Ci pgp_import_command "Import PGP public key"
2103
-
2104
-# ctrl-e PGP encrypt a message
2105
-macro index \Ce pgp_encrypt_sign_command "PGP encrypt"
2106
-macro pager \Ce pgp_encrypt_sign_command "PGP encrypt"
2107
-
2108
-# ctrl-d PGP decrypt a message
2109
-macro index \Cd pgp_decrypt_command "PGP decrypt"
2110
-macro pager \Cd pgp_decrypt_command "PGP decrypt"
2043
+# automatically sign and encrypt
2044
+set pgp_autosign         # autosign all outgoing mails
2045
+set pgp_replyencrypt     # autocrypt replies to crypted
2046
+set pgp_replysign        # autosign replies to signed
2111 2047
 #+END_SRC
2112 2048
 
2113 2049
 Save and exit.