[Exim] Outlook, PGP, GPG, mutt, exim filter

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Paul Makepeace
Data:  
Para: exim-users
Assunto: [Exim] Outlook, PGP, GPG, mutt, exim filter
I'd like to have mutt automagically display PGP-encrypted/signed
messages generated by Outlook. Outlook 9/MimeOLE 6 with the freeware PGP
7 plugin produces encrypted multipart messages with a text/plain
attachment containing the BEGIN PGP delimiter. There is also the dreaded
winmail.dat attachment.

Based on http://lists.slug.org.au/archives/slug/2001/June/msg00903.html
I have created this inelegant solution,

.forward:

if $h_Old-Content-Type: does not match "." and
   $h_X-Mailer:      contains "Outlook" and
   $message_body     contains "-----BEGIN PGP MESSAGE-----" and
   $message_body_end contains "-----END PGP MESSAGE-----"
then
  pipe "/home/paulm/.outlookfilter"
endif


(Depending on the size of the winmail.dat $message_body_end could quite
conceivably be punted too far back and not match.)

.outlookfilter:

#!/bin/sh
/usr/bin/formail -I Resent-To: -I Resent-Date: -I Resent-From: -I Resent-Sender: -I Resent-Message-ID: -i "Content-Type: application/pgp; format=text; x-action=encrypt" | /usr/sbin/exim -oi -t

Deleting the Resent- headers seems required for exim to feel the message
is unambigously directed.

This breaks the multipart message. I have used perl to change the
text/plain in place in the body but owing to the mail header rules it's
quite hard to do this efficiently/correctly (in the five minutes I
spent on it).

Questions:
  + Has someone done this?
  + Is my mutt just misconfigured? (Debian's mutt 1.5.3)?
  + Is it possible with exim's filters to:
    * have $message_body match at the beginning of a line? (`a la perl's
      /m regex modifier)
    * test for the existence of a header in .forward? (versus my does
      not match "." hack)
    * modify headers or body in place? (versus my pipe to filter | exim)


Thanks, Paul

--
Paul Makepeace ....................................... http://paulm.com/

"If it were just another game, then you could go home earlier than
Dave."
-- http://paulm.com/toys/surrealism/