I've patched abook 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.icir.org/robin/abook 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 (Note that after applying the patch, you'll have to increase the values of abook's extra_column and extra_alternative options by 3 to see the same fields as before.) To make use of the new properties, two additional Python scripts are enclosed with the patch (you'll need Python >= 2.0 for them) (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) Run abook2mutt.py without arguments to see an short explanation of its options. Example: ----- cut ------------------------------------------------------------ 1 - Name : Joe User 2 - PGP : Encrypt and sign 3 - Key ID : 0x12345678 4 - PGP/Mime : Yes E-mail addresses: 5 - joe@no.where 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 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 send-hook "joe@no\.where" set pgp_create_traditional=no pgp-hook "joe@no\.where" 0x12345678 (The default hooks may be suppressed with option -d) (2) "mail2abook.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. Finally, "abook_wrapper" is a simple wrapper script which simplifies the integration into mutt. If you edit the first few lines of it to contain the correct paths, you can insert something like this into your ".muttrc": macro index a "|abook_wrapper --mail\n:source ~/.mutt/abook\n" macro pager a "|abook_wrapper --mail\n:source ~/.mutt/abook\n" macro index A "!abook_wrapper\n:source ~/.mutt/abook\n" macro pager A "!abook_wrapper\n:source ~/.mutt/abook\n" Typing 'a' will then create an addressbook entry for the current mail and 'A' will start abook itself. In both cases, mutt's configuration is updated with the new aliases/pgp-hooks/patterns afterwards. Any comments and suggestions are welcome! Robin Sommer THANKS ====== - Jean-Sebastien Morisset for his suggestions and "abook_wrapper" - Mathias Gumz for updating the patch to abook 0.5.{1,3} - B. L. Jilek for updating the patch to abook 0.5.5