I've patched abook 0.4.13 a bit to make the usage of mutt's PGP
features more comfortable. Perhaps this may be of some use for
others as well. You can get it from
http://www.uni-paderborn.de/~rsommer/abook-pgp.tgz
The patch introduces three new address book properties for a person:
- A flag indicating whether mails send to this recipient are to be
encrypted and/or signed by default.
- If encryption is activated, which key is be used for it
- What the recipient does like more: PGP/MIME or old style
application/pgp
To make use of this, two additional Python scripts are enclosed with
the patch:
(1) "abook2mutt.py" is an extended export filter. It outputs
send-hooks that activate encryption/signatures for recipients.
Additionally, it can output aliases (works as abook's export
filter) and "color index" patterns which highlight all mails
send from users in your address book (effect comparable to
abook's contrib/whitelist, but takes another approach)
Example:
----- cut ------------------------------------------------------------
1 - Name : Joe User
2 - PGP : Encrypt and sign
3 - Key ID : 0x12345678
4 - PGP/Mime : Yes
E-mail addresses:
5 - [EMAIL PROTECTED]
6 -
----- cut ------------------------------------------------------------
> ./abook2mutt.py -c cyan -a -p <~/.abook.addressbook
send-hook . set pgp_autoencrypt=no
send-hook . set pgp_autosign=no
send-hook . set pgp_create_traditional=no
alias joe Joe User <[EMAIL PROTECTED]>
color index cyan default '~f "joe@no\.where" | ~e "joe@no\.where"'
send-hook "joe@no\.where" set pgp_autoencrypt=yes
send-hook "joe@no\.where" set pgp_autosign=yes
pgp-hook "joe@no\.where" 0x12345678
(2) "alias.py" is a substitute for mutt's create-alias function (and
for abook's contrib/mail2alias.py). In addition to extracting
name and email address from the mail given on stdin, it tries to
detect whether PGP is used and inserts corresponding items into
abook's address book.
Note that this is all quite new and hardly tested.
Any comments and suggestions are welcome!
Robin
--
Robin Sommer * phone 05251/65041 * [EMAIL PROTECTED]
PGP fingerprint * 3D19 DFA8 4D49 79DA 2DFE * EAE5 D6BA 121D 7833 816E
-- "Fliegen lernt nur, wer aus allen Wolken faellt" [HRK]