July 2007 Archives
03-07-2007 10:58
Mutt, gnupg and outlook
Getting this combination working took me sometime but finally got it working!! I assume you know how to generate/copy your private and public key and have sent your public key to the other party [or they have grabbed it from a key server]. You need the gpg4win package installed on the Windows box using Outlook in order to get gpg working on that side. Then the only other point to note on the Outlook side is to make sure you send emails in plain text when encrypting them, otherwise Mutt doesnt decrypt them automatically and it becomes a case of saving the attachment and running it through gpg manually. a PITA! Also, to read an encypted message, it doesnt automatically ask for your key etc. You need to open the message and go Tools > Decrpyt message.
On the Mutt side, not 100% sure what did the trick for me. You need to have the public key of the sender in your keyring, I dont think auto grabbing of the key is working, or might be that the key pair I was testing with from the Outlook side was an ad-hoc made up pair that didn't exist on a key server [this does make more sense].
I will post up my muttrc and the gpg.rc file it imports [which was located at /usr/share/doc/mutt/examples/gpg.rc]
muttrc
set fast_reply set move=no set copy=yes set record="~/Mail/Sent" set postpone=ask-yes set postponed="~/Mail/Drafts" set from="" set realname="David" set encode_from=yes set reverse_alias=yes set use_from=yes # for imap accounts #set imap_user="david" #set spoolfile=imap://user@localhost/INBOX #set folder=imap://user@localhost/ #for standard local account set mbox="/var/mail/david" #set trash="~/Mail/Trash" #set date_format="!%a, %b %d, %Y at %I:%M:%S%p %Z" set index_format="%4C %Z %{%b %d} %[%H:%M] %-15.15L (%4l) %s" # Alias #alias juser abd30425@somewhere.net (Joe User) source ~/.mutt-alias source ~/.gnupg/gpg.rc set mailcap_path="~/.mailcap" # I made some edits to this to get the HTML sent outlook, but didnt solve it set pgp_create_traditional=yes # set pgp_outlook_compat=yes # errors using mutt 1.5.13-1.1 on Debian Stable
The only changes I made to the default "/usr/share/doc/mutt/examples/gpg.rc" was:
david@server:~$ diff `locate gpg.rc` 76c76 < # set pgp_getkeys_command="/usr/bin/gpg --recv-keys %r" --- > set pgp_getkeys_command="/usr/bin/gpg --recv-keys %r" 87a88 > set pgp_strict_enc=yesSo I just enabled the pgp_getkeys_command which I don't know if works and added the pgp_strict_enc option, which may of helped with Outlook.
Hope this helps someone, maybe me in the future.