Hi,
Some of you may remember reading my posts a few months back. It seems that
the PGP version 6.5 plugin for Microsoft Outlook and Microsoft Outlook
Express is quite broken. Sending a message from Mutt to Outlook which is
PGP encrypted causes Outlook not to recognize the message. This is the case
even when pgp_create_traditional is set.
Outlook appears to scan the body of the message for PGP content rather than
the message header. It will only do this if the message is plaintext, not
Application/PGP. The following patch implements a new quadoption
(pgp_outlook_compat). When set along with pgp_create_traditional, mutt will
generate a message which Outlook will recognize and decrypt. Mutt will not
recognize this message unless one has the recommended procmail recipes
installed.
This may not be the correct format to send in but the fact is, there are a
lot of Outlook users out there and IMO, it is necessary to have
interoperability between these programs.
On a more technical note, there are a few things I am not sure of, not being
a Mutt developer myself. This could probably be implemented as a filter but
this was just easier. Also, is it ok to just define another bit in
pgplib.h? Not sure but it looks alright to me.
Anyways, here it is. I would appreciate hearing from you if you are
successful or otherwise.
Cheers,
Shane
diff -urN mutt-1.2.5.orig/init.h mutt-1.2.5/init.h
--- mutt-1.2.5.orig/init.h Fri Sep 8 11:44:36 2000
+++ mutt-1.2.5/init.h Fri Sep 8 11:50:17 2000
@@ -1208,6 +1208,7 @@
** `reverse-'.
*/
{ "pgp_create_traditional", DT_QUAD, R_NONE, OPT_PGPTRADITIONAL, M_NO },
+ { "pgp_outlook_compat", DT_QUAD, R_NONE, OPT_PGPOUTLOOK, M_NO },
/*
** .pp
** This option controls whether Mutt generates old-style PGP encrypted
diff -urN mutt-1.2.5.orig/mutt.h mutt-1.2.5/mutt.h
--- mutt-1.2.5.orig/mutt.h Thu Jun 8 03:00:14 2000
+++ mutt-1.2.5/mutt.h Fri Sep 8 11:53:17 2000
@@ -233,6 +233,7 @@
#ifdef HAVE_PGP
OPT_VERIFYSIG, /* verify PGP signatures */
OPT_PGPTRADITIONAL, /* create old-style PGP messages */
+ OPT_PGPOUTLOOK, /* Create even older broken outlook compatible messages */
#endif
OPT_PRINT,
diff -urN mutt-1.2.5.orig/pgp.c mutt-1.2.5/pgp.c
--- mutt-1.2.5.orig/pgp.c Fri Mar 3 02:10:11 2000
+++ mutt-1.2.5/pgp.c Fri Sep 8 12:31:44 2000
@@ -1477,12 +1477,20 @@
b->encoding = ENC7BIT;
- b->type = TYPEAPPLICATION;
- b->subtype = safe_strdup ("pgp");
-
- mutt_set_parameter ("format", "text", &b->parameter);
- mutt_set_parameter ("x-action", flags & PGPENCRYPT ? "encrypt" : "sign",
- &b->parameter);
+ /* Outlook seems to work by scanning the message itself for PGP information, */
+ /* not the headers. If the headers are anything but text/plain, it will */
+ /* not recognize the message. */
+ if (flags & PGPOUTLOOK) {
+ b->type = TYPETEXT;
+ b->subtype = safe_strdup ("plain");
+ } else {
+ b->type = TYPEAPPLICATION;
+ b->subtype = safe_strdup ("pgp");
+
+ mutt_set_parameter ("format", "text", &b->parameter);
+ mutt_set_parameter ("x-action", flags & PGPENCRYPT ? "encrypt" : "sign",
+ &b->parameter);
+ }
b->filename = safe_strdup (pgpoutfile);
@@ -1535,8 +1543,13 @@
{
if ((i = query_quadoption (OPT_PGPTRADITIONAL, _("Create an application/pgp
message?"))) == -1)
return -1;
- else if (i == M_YES)
+ else if (i == M_YES) {
traditional = 1;
+ if ((i = query_quadoption (OPT_PGPOUTLOOK, _("Create an Outlook compatible
+message?"))) == -1)
+ return -1;
+ else if (i == M_YES)
+ flags |= PGPOUTLOOK;
+ }
}
mutt_message _("Invoking PGP...");
diff -urN mutt-1.2.5.orig/pgplib.h mutt-1.2.5/pgplib.h
--- mutt-1.2.5.orig/pgplib.h Fri Mar 3 02:10:12 2000
+++ mutt-1.2.5/pgplib.h Fri Sep 8 12:24:07 2000
@@ -23,6 +23,7 @@
#define PGPSIGN (1 << 1)
#define PGPKEY (1 << 2)
#define PGPGOODSIGN (1 << 3)
+#define PGPOUTLOOK (1 << 4)
#define KEYFLAG_CANSIGN (1 << 0)
#define KEYFLAG_CANENCRYPT (1 << 1)
--
Shane Wegner: [EMAIL PROTECTED]
Personal website: http://www.cm.nu/~shane/
PGP signature