Though controversial, I feel that this patch is in the best interest of
promoting the use of PGP with Mutt.
This patch adds a new boolean variable $pgp_search_text which will cause Mutt
to search for the first non-blank line in every text/plain message to see if
it is a mislabeled old-style PGP message. NOTE: this should only be used as
a last resort if you absolutely can't use procmail to rewrite your messages
as suggested in doc/PGP-notes.txt.
I only tested this with Mutt 1.1.1i, but it should work with the 1.0 series
as well.
me
--
pgp key available from http://www.cs.hmc.edu/~me/elkins-pgp-key.asc
diff -durp mutt-1.1.1/doc/manual-6.html mutt-1.1.1.pgpsearchtext/doc/manual-6.html
--- mutt-1.1.1/doc/manual-6.htmlMon Nov 8 10:03:16 1999
+++ mutt-1.1.1.pgpsearchtext/doc/manual-6.html Wed Jan 5 00:59:47 2000
@@ -1617,6 +1617,21 @@ variable is only used if ``mime_forward'
``mime_forward_decode'' is EMunset/EM.
P
P
+H3A NAME="pgp_search_text"/A pgp_search_text/H3
+
+PType: booleanBR
+Default: no
+P
+PControls whether Mutt will search text/plain messages for old style
+PGP message which are not properly labled using MIME header fields.
+If the first non-blank line in a message contains quot;-BEGIN PGPquot;
+it will be assumed that it is an aplication/pgp content-type.
+NOTE: this option should only be used as a last resort when procmail
+is not available on your system. See doc/PGP-notes.txt for the
+recommended way to handle old-style messages. Using this option may
+lead to longer time required to parse your mailbox.
+P
+P
H3A NAME="pipe_split"/A pipe_split/H3
PType: booleanBR
diff -durp mutt-1.1.1/doc/manual.sgml mutt-1.1.1.pgpsearchtext/doc/manual.sgml
--- mutt-1.1.1/doc/manual.sgml Mon Nov 8 10:01:46 1999
+++ mutt-1.1.1.pgpsearchtext/doc/manual.sgmlWed Jan 5 00:59:34 2000
@@ -4249,6 +4249,22 @@ variable is only used if ``mimelowbar;f
``mimelowbar;forwardlowbar;decode'' is emunset/em.
+sect2pgplowbar;searchlowbar;textlabel id="pgp_search_text"
+p
+Type: booleannewline
+Default: no
+
+p
+Controls whether Mutt will search text/plain messages for old style
+PGP message which are not properly labled using MIME header fields.
+If the first non-blank line in a message contains dquot;-BEGIN PGPdquot;
+it will be assumed that it is an aplication/pgp content-type.
+NOTE: this option should only be used as a last resort when procmail
+is not available on your system. See doc/PGP-notes.txt for the
+recommended way to handle old-style messages. Using this option may
+lead to longer time required to parse your mailbox.
+
+
sect2pipelowbar;splitlabel id="pipe_split"
p
Type: booleannewline
diff -durp mutt-1.1.1/doc/muttrc.man mutt-1.1.1.pgpsearchtext/doc/muttrc.man
--- mutt-1.1.1/doc/muttrc.man Mon Nov 8 10:01:47 1999
+++ mutt-1.1.1.pgpsearchtext/doc/muttrc.man Wed Jan 5 00:59:48 2000
@@ -2226,6 +2226,23 @@ variable is only used if \(lqmime_forwar
.TP
+.B pgp_search_text
+.nf
+Type: boolean
+Default: no
+.fi
+.IP
+Controls whether Mutt will search text/plain messages for old style
+PGP message which are not properly labled using MIME header fields.
+If the first non-blank line in a message contains \(rq-BEGIN PGP\(rq
+it will be assumed that it is an aplication/pgp content-type.
+NOTE: this option should only be used as a last resort when procmail
+is not available on your system. See doc/PGP-notes.txt for the
+recommended way to handle old-style messages. Using this option may
+lead to longer time required to parse your mailbox.
+
+
+.TP
.B pipe_split
.nf
Type: boolean
diff -durp mutt-1.1.1/init.h mutt-1.1.1.pgpsearchtext/init.h
--- mutt-1.1.1/init.h Sun Nov 7 13:15:24 1999
+++ mutt-1.1.1.pgpsearchtext/init.h Wed Jan 5 00:58:50 2000
@@ -1276,6 +1276,18 @@ struct option_t MuttVars[] = {
{ "forw_decrypt",DT_SYN, R_NONE, UL "forward_decrypt", 0 },
/*
*/
+ { "pgp_search_text", DT_BOOL, R_NONE, OPTPGPSEARCHTEXT, 0 },
+ /*
+ ** .pp
+ ** Controls whether Mutt will search text/plain messages for old style
+ ** PGP message which are not properly labled using MIME header fields.
+ ** If the first non-blank line in a message contains "-BEGIN PGP"
+ ** it will be assumed that it is an aplication/pgp content-type.
+ ** NOTE: this option should only be used as a last resort when procmail
+ ** is not available on your system. See doc/PGP-notes.txt for the
+ ** recommended way to handle old-style messages. Using this option may
+ ** lead to longer time required to parse your mailbox.
+ */
#endif /* _PGPPATH */
{ "pipe_split", DT_BOOL, R_NONE, OPTPIPESPLIT, 0 },
diff -durp mutt-1.1.1/mutt.h mutt-1.1.1.pgpsearchtext/mutt.h
--- mutt-1.1.1/mutt.h Sun Nov 7 13:15:30 1999
+++ mutt-1.1.1.pgpsearchtext/mutt.h Wed Jan 5 00:37:53 2000
@@ -355,6 +355,7 @@ enum
OPTPGPSTRICTENC,
OPTFORWDECRYPT,
OPTPGPSHOWUNUSABLE,
+ OPTPGPSEARCHTEXT,
#endif
/* pseudo options */
diff -durp mutt-1.1.1/parse.c