瀏覽代碼

GPG integration with Mutt

Bob Mottram 11 年之前
父節點
當前提交
4d4e0f4590
共有 1 個文件被更改,包括 81 次插入0 次删除
  1. 81
    0
      beaglebone.txt

+ 81
- 0
beaglebone.txt 查看文件

@@ -1180,6 +1180,13 @@ service dovecot restart
1180 1180
 #+END_SRC
1181 1181
 
1182 1182
 ** Create Email folders and rules
1183
+
1184
+#+BEGIN_VERSE
1185
+/Yes, the NSA set fire to the Internet but it’s the business models of Google, Facebook, etc, that provide the firewood.  Trusting the companies supplying the firewood to be your fire fighters is naïve at best./
1186
+
1187
+-- Aral Balkan
1188
+#+END_VERSE
1189
+
1183 1190
 *** Rules for mailing lists
1184 1191
 A common situation with email is that you may be subscribed to various mailing lists and want incoming email from those to be automatically grouped into a separate folder for each list.
1185 1192
 
@@ -1707,6 +1714,80 @@ macro pager \Cb '<enter-command>toggle sidebar_visible<enter><redraw-screen>' "t
1707 1714
 
1708 1715
 # esc-m Mark new messages as read
1709 1716
 macro index <esc>m "T~N<enter>;WNT~O<enter>;WO\CT~T<enter>" "mark all messages read"
1717
+
1718
+
1719
+# GPG/PGP integration
1720
+
1721
+# decode application/pgp
1722
+set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
1723
+
1724
+# verify a pgp/mime signature
1725
+set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
1726
+
1727
+# decrypt a pgp/mime attachment
1728
+set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
1729
+
1730
+# create a pgp/mime signed attachment
1731
+# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
1732
+set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
1733
+
1734
+# create a application/pgp signed (old-style) message
1735
+# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
1736
+set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
1737
+
1738
+# create a pgp/mime encrypted attachment
1739
+# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
1740
+set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
1741
+
1742
+# create a pgp/mime encrypted and signed attachment
1743
+# 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"
1744
+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"
1745
+
1746
+# import a key into the public key ring
1747
+set pgp_import_command="gpg --no-verbose --import %f"
1748
+
1749
+# export a key from the public key ring
1750
+set pgp_export_command="gpg --no-verbose --export --armor %r"
1751
+
1752
+# verify a key
1753
+set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r"
1754
+
1755
+# read in the public key ring
1756
+set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r"
1757
+
1758
+# read in the secret key ring
1759
+set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
1760
+
1761
+# fetch keys
1762
+# set pgp_getkeys_command="pkspxycwrap %r"
1763
+# This will work when #172960 will be fixed upstream
1764
+# set pgp_getkeys_command="gpg --recv-keys %r"
1765
+
1766
+# pattern for good signature - may need to be adapted to locale!
1767
+
1768
+# set pgp_good_sign="^gpgv?: Good signature from "
1769
+
1770
+# OK, here's a version which uses gnupg's message catalog:
1771
+# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
1772
+
1773
+# This version uses --status-fd messages
1774
+set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
1775
+
1776
+# this set the number of seconds to keep in memory the passphrase used to encrypt/sign
1777
+set pgp_timeout=60
1778
+
1779
+
1780
+# ctrl-i imports a PGP public key
1781
+macro index \Ci pgp_import_command "Import PGP public key"
1782
+macro pager \Ci pgp_import_command "Import PGP public key"
1783
+
1784
+# ctrl-e PGP encrypt a message
1785
+macro index \Ce pgp_encrypt_sign_command "PGP encrypt"
1786
+macro pager \Ce pgp_encrypt_sign_command "PGP encrypt"
1787
+
1788
+# ctrl-d PGP decrypt a message
1789
+macro index \Cd pgp_decrypt_command "PGP decrypt"
1790
+macro pager \Cd pgp_decrypt_command "PGP decrypt"
1710 1791
 #+END_SRC
1711 1792
 
1712 1793
 Save and exit.