Use p_new instead of xmalloc()
[apps/madmutt.git] / contrib / gpg.rc
1 # -*-muttrc-*-
2 #
3 # Command formats for gpg.
4
5 # This version uses gpg-2comp from 
6 #   http://70t.de/download/gpg-2comp.tar.gz
7 #
8 # $Id: gpg.rc,v 3.4 2005/01/27 18:27:36 roessler Exp $
9 #
10 # %p    The empty string when no passphrase is needed,
11 #       the string "PGPPASSFD=0" if one is needed.
12 #
13 #       This is mostly used in conditional % sequences.
14 #
15 # %f    Most PGP commands operate on a single file or a file
16 #       containing a message.  %f expands to this file's name.
17 #
18 # %s    When verifying signatures, there is another temporary file
19 #       containing the detached signature.  %s expands to this
20 #       file's name.
21 #
22 # %a    In "signing" contexts, this expands to the value of the
23 #       configuration variable $pgp_sign_as.  You probably need to
24 #       use this within a conditional % sequence.
25 #
26 # %r    In many contexts, mutt passes key IDs to pgp.  %r expands to
27 #       a list of key IDs.
28
29 # Note that we explicitly set the comment armor header since GnuPG, when used
30 # in some localiaztion environments, generates 8bit data in that header, thereby
31 # breaking PGP/MIME.
32
33 # decode application/pgp
34 set pgp_decode_command="/usr/bin/gpg     --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet  --batch  --output - %f"
35
36 # verify a pgp/mime signature
37 set pgp_verify_command="/usr/bin/gpg   --status-fd=2 --no-verbose --quiet  --batch  --output - --verify %s %f"
38
39 # decrypt a pgp/mime attachment
40 set pgp_decrypt_command="/usr/bin/gpg   --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet  --batch  --output - %f"
41
42 # create a pgp/mime signed attachment
43 # set pgp_sign_command="/usr/bin/gpg-2comp --comment '' --no-verbose --batch  --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
44 set pgp_sign_command="/usr/bin/gpg    --no-verbose --batch --quiet   --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
45
46 # create a application/pgp signed (old-style) message
47 # set pgp_clearsign_command="/usr/bin/gpg-2comp --comment ''  --no-verbose --batch  --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
48 set pgp_clearsign_command="/usr/bin/gpg    --no-verbose --batch --quiet   --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
49
50 # create a pgp/mime encrypted attachment
51 # set pgp_encrypt_only_command="pgpewrapng gpg-2comp  -v --batch  --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
52 set pgp_encrypt_only_command="pgpewrapng /usr/bin/gpg      --batch  --quiet  --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
53
54 # create a pgp/mime encrypted and signed attachment
55 # set pgp_encrypt_sign_command="pgpewrapng gpg-2comp  --passphrase-fd 0 -v --batch  --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
56 set pgp_encrypt_sign_command="pgpewrapng /usr/bin/gpg   %?p?--passphrase-fd 0?  --batch --quiet  --no-verbose  --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
57
58 # import a key into the public key ring
59 set pgp_import_command="/usr/bin/gpg  --no-verbose --import %f"
60
61 # export a key from the public key ring
62 set pgp_export_command="/usr/bin/gpg   --no-verbose --export --armor %r"
63
64 # verify a key
65 set pgp_verify_key_command="/usr/bin/gpg   --verbose --batch  --fingerprint --check-sigs %r"
66
67 # read in the public key ring
68 set pgp_list_pubring_command="/usr/bin/gpg   --no-verbose --batch --quiet   --with-colons --list-keys %r" 
69
70 # read in the secret key ring
71 set pgp_list_secring_command="/usr/bin/gpg   --no-verbose --batch --quiet   --with-colons --list-secret-keys %r" 
72
73 # fetch keys
74 # set pgp_getkeys_command="pkspxycwrap %r"
75
76 # pattern for good signature - may need to be adapted to locale!
77
78 # set pgp_good_sign="^gpg: Good signature from"
79
80 # OK, here's a version which uses gnupg's message catalog:
81 # set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
82
83 # This version uses --status-fd messages
84 set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
85