Sorry to reply to myself, I thought of a few things...

Jason wrote:
> All,
> 
> I'm attempting to send and receive email from an Exchange2007 server (I
> know, bleh :-P ).  Seeing as how Evolution-mapi is having some issues, I
> decided to eliminate all the GUI crap.
> 
> I'm able to pull all of my email with "exchange2mbox" and I plan on
> using "openchangeclient --sendmail ..." as my version of sendmail.
> 
> Unfortunately, my current hurdle is more basic.  The received mail in my
> mbox file has the following:
> 
> ######################################################################
> # From XXXXXXXXX
> # Date: Mon Sep 14 12:09:41 2009 EDT
> # From: XXXXXXXXX
> # To: XXXXXXXX
> # Cc: XXXXXXXX
> # Bcc:
> # Subject: XXXXXXXX
> # Message-ID: <XXXXXXXXXX>
> # Content-Type: multipart/mixed; boundary="DocE+XXXXXXXX"
> # Status: O
> # Content-Length: 16517113
> # Lines: 3239
> #
> #
> # --DocE+XXXXXXXXX
> # Content-Disposition: attachment; filename="smime.p7m"
> # Content-Type: "application/octet-stream"
> # Content-Transfer-Encoding: base64
> # XXXXXXXXXXXX ad nauseum
> ######################################################################
> 
> I've followed the smime howto's, imported my certs, tried .mime.types,
> .mailcap to no avail.  mutt refuses to decrypt it.  When i select the
> email, it shows "application/octet-stream".
> 
> I think if I can get mutt to realize it should pull the mimetype from
> .mime.types, _then_ do the smime_* calls, things would work much better.
> 

If I save smime.p7m to a file, I can use the following to successfully
decrypt it:

openssl smime -decrypt -passin stdin -inform DER -in smime.p7m -inkey
.smime/keys/XXXXXXXX.0

So, I think I have the keys set correctly.

Here's my ${HOME}/.muttrc

################################################################
###########################
# I added this, from gentoo howto
###########################
set pager_context=1
set pager_index_lines=6                 #show a mini-index in pager
set menu_scroll
set pgp_verify_sig=no                   #dont show pgp in pager
set status_on_top                       #put status line at top
set sort=threads                        #sort by message threads in index
set strict_threads=no

set status_format=" %r %b %f %n      Del %d      Msgs %m %l %> (%P)"
set pager_format="%-10.10i %[!%a %b %d %R]"
set date_format="!%H:%M %a %d %b     "
set index_format="%4C %Z %[%b%d] %-15.15F %s"
set folder_format="%2C %t %8s %d %N %f"

#set sendmail="/usr/bin/nbsmtp -d isp.net -h smtp.isp.net -f
yourn...@isp.net"

set from="XXXXXXXXXX"         #set to your from address
set realname="XXXXXXXX"

set record="$HOME/MuttMail/sent"        #sent mail is saved here
set delete=yes                          #delete without prompting
set include=yes                         #quote msg in reply
set fast_reply=yes                      #no prompting on reply
set beep=no                             #no noise
set markers=no                          #no + on wrapped lines
set confirmappend=no                    #no prompt for save to =keep
set to_chars=" +TCF"                    #no L for mail_list

set mailcap_path = $HOME/.mailcap
mime_lookup application/octet-stream
set folder = $HOME/MuttMail
set spoolfile = $HOME/MuttMail/inbox.mbox
mailboxes =inbox.mbox
mailboxes =keep

save-hook .* =keep                      #default mbox to (s)ave mail is
=keep

bind pager h display-toggle-weed       #toggle headers with h key

# simulate the old url menu
macro index \cb |urlview\n 'call urlview to extract URLs out of a message'
macro pager \cb |urlview\n 'call urlview to extract URLs out of a message'

#run fetchmail by hitting key of G
macro index G "!fetchmail -a -m 'procmail -d %T'\r"
macro pager G "!fetchmail -a -m 'procmail -d %T'\r"

#use to edit .muttrc and then source it...no restart necessary
macro generic ,sm ":source $HOME/.muttrc\r"
macro generic \cj "!rxvt -bg wheat -e joe $HOME/.muttrc\r"

# default list of header fields to weed out when displaying mail
#ignore them all and then unignore what you want to see
ignore *
unignore  Date To From: Subject X-Mailer Organization User-Agent
hdr_order Date From To Subject X-Mailer User-Agent Organization

### snip color settings ###

set crypt_autosign=yes
set crypt_replyencrypt=yes
set crypt_replysign=yes
set crypt_replysignencrypted=yes
set smime_ca_location="~/.smime/ca-bundle.crt"
set smime_certificates="~/.smime/certificates"
set smime_decrypt_command="openssl smime -decrypt -passin stdin -inform
DER -in %f -inkey %k -recip %c"
set smime_default_key="XXXXXXXX.0"
set smime_encrypt_command="openssl smime -encrypt -%a -outform DER -in
%f %c"
set smime_encrypt_with="des3"
set smime_get_cert_command="openssl pkcs7 -print_certs -in %f"
set smime_get_cert_email_command="openssl x509 -in %f -noout -email"
set smime_get_signer_cert_command="openssl smime -verify -in %f
-noverify -signer %c -out /dev/null"
set smime_import_cert_command="smime_keys add_cert %f"
set smime_is_default
set smime_keys="~/.smime/keys"
set smime_pk7out_command="openssl smime -verify -in %f -noverify -pk7out"
set smime_sign_command="openssl smime -sign -signer %c -inkey %k -passin
stdin -in %f -certfile %i -outform DER"
set smime_timeout=300
set smime_verify_command="openssl smime -verify -inform DER -in %s %C
-content %f"
set smime_verify_opaque_command="openssl smime -verify -inform DER -in
%s %C"
################################################################

tia,

Jason.

Reply via email to