<<< Date Index >>>     <<< Thread Index >>>

For 1.5.8: pgp-auto-decode



pgp-auto-decode makes mutt work like PGP-MIME messages with in-line
ASCII PGP messages.  That is, it makes it unnecessary to manually
decode each message when reading, searching, replying to, or
forwarding traditional PGP messages.  It works for all related
operations, including group operations.  Widely in use in Debian and
Gentoo packages, no reported bugs in years.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail.  Sorry for the inconvenience.  Thank the spammers.

diff -u mutt-1.5.7-20050209/PATCHES mutt-1.5.7-20050209.copy/PATCHES
--- mutt-1.5.7-20050209/PATCHES 2005-02-09 21:26:38.000000000 -0500
+++ mutt-1.5.7-20050209.copy/PATCHES    2005-02-09 21:28:03.000000000 -0500
@@ -1,0 +1 @@
+patch-1.5.7.ddm.pgp-auto-decode.1
diff -u mutt-1.5.7-20050209/commands.c mutt-1.5.7-20050209.copy/commands.c
--- mutt-1.5.7-20050209/commands.c      2005-02-09 21:26:38.000000000 -0500
+++ mutt-1.5.7-20050209.copy/commands.c 2005-02-09 21:21:46.000000000 -0500
@@ -966,6 +966,7 @@
     rv = 1;
   }
   
+  h->security |= PGP_TRADITIONAL_CHECKED;
   mx_close_message (&msg);
   return rv;
 }
diff -u mutt-1.5.7-20050209/curs_main.c mutt-1.5.7-20050209.copy/curs_main.c
--- mutt-1.5.7-20050209/curs_main.c     2005-02-09 21:26:38.000000000 -0500
+++ mutt-1.5.7-20050209.copy/curs_main.c        2005-02-09 21:21:46.000000000 
-0500
@@ -1139,6 +1139,8 @@
            menu->current = mutt_thread_next_unread (Context, CURHDR);
        }
  
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        if ((op = mutt_display_message (CURHDR)) == -1)
        {
          unset_option (OPTNEEDRESORT);
@@ -1815,6 +1817,8 @@
 CHECK_IMAP_ACL(IMAP_ACL_INSERT);
 #endif
 
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
         mutt_edit_message (Context, tag ? NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
 
@@ -1825,6 +1829,8 @@
        CHECK_MSGCOUNT;
         CHECK_VISIBLE;
        CHECK_ATTACH;
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        ci_send_message (SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
        break;
@@ -1839,6 +1845,8 @@
        CHECK_MSGCOUNT;
         CHECK_VISIBLE;
        CHECK_ATTACH;
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        ci_send_message (SENDREPLY|SENDGROUPREPLY, NULL, NULL, Context, tag ? 
NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
        break;
@@ -1848,6 +1856,8 @@
        CHECK_ATTACH;
        CHECK_MSGCOUNT;
         CHECK_VISIBLE;
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        ci_send_message (SENDREPLY|SENDLISTREPLY, NULL, NULL, Context, tag ? 
NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
        break;
@@ -1966,6 +1976,8 @@
        CHECK_ATTACH;
        CHECK_MSGCOUNT;
         CHECK_VISIBLE;
+       if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & 
PGP_TRADITIONAL_CHECKED))) 
+         mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw);
        ci_send_message (SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
        menu->redraw = REDRAW_FULL;
        break;
diff -u mutt-1.5.7-20050209/init.h mutt-1.5.7-20050209.copy/init.h
--- mutt-1.5.7-20050209/init.h  2005-02-09 21:26:38.000000000 -0500
+++ mutt-1.5.7-20050209.copy/init.h     2005-02-09 21:21:46.000000000 -0500
@@ -1534,6 +1534,17 @@
   ** \fBdeprecated\fP.
   ** (PGP only)
   */
+  { "pgp_auto_decode", DT_BOOL, R_NONE, OPTPGPAUTODEC, 0 },
+  /*
+  ** .pp
+  ** If set, mutt will automatically attempt to decrypt traditional PGP
+  ** messages whenever the user performs an operation which ordinarily would
+  ** result in the contents of the message being operated on.  For example,
+  ** if the user displays a pgp-traditional message which has not been manually
+  ** checked with the check-traditional-pgp function, mutt will automatically
+  ** check the message for traditional pgp.
+  */
+
 
   /* XXX Default values! */
   
diff -u mutt-1.5.7-20050209/mutt.h mutt-1.5.7-20050209.copy/mutt.h
--- mutt-1.5.7-20050209/mutt.h  2005-02-09 21:26:38.000000000 -0500
+++ mutt-1.5.7-20050209.copy/mutt.h     2005-02-09 21:21:46.000000000 -0500
@@ -461,6 +461,7 @@
   OPTPGPIGNORESUB,
   OPTPGPCHECKEXIT,
   OPTPGPLONGIDS,
+  OPTPGPAUTODEC,
 #if 0
   OPTPGPENCRYPTSELF,
 #endif

Attachment: pgpYn4OXzKbY1.pgp
Description: PGP signature