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

Re: What should go into 1.5.7?



On Jan 26, Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx> wrote:

> If there are any patches you want to see included with 1.5.7, please
> re-submit them to mutt-dev by Thursday evening.  1.5.7 due on Friday.
I'm attaching a selection of patches from the Debian package.
I believe that others have been already sent to you by the other
maintainer.

080_Md.gpg_import_nonverbose
A gpg command line contains both --verbose and --no-verbose, remove
the first.

100_arc.smime_descripitive_messages
Add some sanity checks to smime_keys.pl.

patch-1.5.3.Md.gpg_status_fd
Parse machine-parseable status messages instead of the user interface.
This patch has been in the package for over four years and it works
*much* better than the current method, which used to break all the time.

000_patch-1.3.23.1.ametzler.pgp_good_sign
Improve the check for good signatures.
For details: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=110414 .
Added 2001-11-30.

patch-1.5.4.fw.maildir_inode_sort
Read maildirs sorted by inode. See the patch text for details.
Added 2003-10-24.

patch-1.5.4.hsteoh.pgpewrap
Do not make pgpewrap segfault if called without arguments.
Added 2003-03-20.

patch-1.5.4.vk.pgp_verbose_mime
Add a filename and description to MIME signatures.
Added 2003-09-13.

patch-1.5.5.1.nt.xtitles.3.ab.1
Set the xterm title, nice to have.
Added before 2002.

patch.asp.%p-escape-agent-compatible.1
Make the default Muttrc work out the box for people using gnupg-agent.
Wrote and applied a one-line patch to make the %?p? conditional escape
work correctly, patch forwarded upstream. (Closes: #277646)

-- 
ciao,
Marco
diff -ruN mutt.orig/contrib/gpg.rc mutt/contrib/gpg.rc
--- mutt.orig/contrib/gpg.rc    2003-08-17 15:23:59.000000000 +0200
+++ mutt/contrib/gpg.rc 2003-08-17 15:23:48.000000000 +0200
@@ -56,7 +56,7 @@
 set pgp_encrypt_sign_command="pgpewrap /usr/bin/gpg  --charset utf-8 
--passphrase-fd 0  --batch --quiet  --no-verbose  --textmode --output - 
--encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
 
 # import a key into the public key ring
-set pgp_import_command="/usr/bin/gpg  --no-verbose --import -v %f"
+set pgp_import_command="/usr/bin/gpg  --no-verbose --import %f"
 
 # export a key from the public key ring
 set pgp_export_command="/usr/bin/gpg   --no-verbose --export --armor %r"
diff -ruN mutt-1.5.5.1.orig/smime_keys.pl mutt-1.5.5.1/smime_keys.pl
--- mutt-1.5.5.1.orig/smime_keys.pl     2004-01-14 23:09:02.000000000 +0100
+++ mutt-1.5.5.1/smime_keys.pl  2004-01-14 23:08:41.000000000 +0100
@@ -58,8 +58,16 @@
 
 my $tmpdir;
 my $private_keys_path = mutt_Q 'smime_keys';
+die "smime_keys is not set in mutt's configuration file"
+       if length $private_keys_path == 0;
+
 my $certificates_path = mutt_Q 'smime_certificates';
+die "smime_certificates is not set in mutt's configuration file"
+       if length $certificates_path == 0;
 my $root_certs_path   = mutt_Q 'smime_ca_location';
+die "smime_ca_location is not set in mutt's configuration file"
+       if length $root_certs_path == 0;
+
 my $root_certs_switch;
 if ( -d $root_certs_path) {
        $root_certs_switch = -CApath;
diff -urN mutt-1.5.3.orig/PATCHES mutt-1.5.3/PATCHES
--- mutt-1.5.3.orig/PATCHES     2002-12-17 10:47:20.000000000 +0100
+++ mutt-1.5.3/PATCHES  2002-12-30 04:16:53.000000000 +0100
@@ -1,0 +1 @@
+Debian.Md.gpg_status_fd
diff -urN mutt-1.5.3.orig/contrib/gpg.rc mutt-1.5.3/contrib/gpg.rc
--- mutt-1.5.3.orig/contrib/gpg.rc      2002-03-26 23:23:58.000000000 +0100
+++ mutt-1.5.3/contrib/gpg.rc   2002-12-30 04:16:22.000000000 +0100
@@ -31,13 +31,13 @@
 # breaking PGP/MIME.
 
 # decode application/pgp
-set pgp_decode_command="/usr/bin/gpg  --charset utf-8   %?p?--passphrase-fd 0? 
--no-verbose --quiet  --batch  --output - %f"
+set pgp_decode_command="/usr/bin/gpg  --charset utf-8   --status-fd=2 
%?p?--passphrase-fd 0? --no-verbose --quiet  --batch  --output - %f"
 
 # verify a pgp/mime signature
-set pgp_verify_command="/usr/bin/gpg   --no-verbose --quiet  --batch  --output 
- --verify %s %f"
+set pgp_verify_command="/usr/bin/gpg   --status-fd=2 --no-verbose --quiet  
--batch  --output - --verify %s %f"
 
 # decrypt a pgp/mime attachment
-set pgp_decrypt_command="/usr/bin/gpg   --passphrase-fd 0 --no-verbose --quiet 
 --batch  --output - %f"
+set pgp_decrypt_command="/usr/bin/gpg   --status-fd=2 --passphrase-fd 0 
--no-verbose --quiet  --batch  --output - %f"
 
 # create a pgp/mime signed attachment
 # set pgp_sign_command="/usr/bin/gpg-2comp --comment '' --no-verbose --batch  
--output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
@@ -78,5 +78,8 @@
 # set pgp_good_sign="^gpg: Good signature from"
 
 # OK, here's a version which uses gnupg's message catalog:
-set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
+# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
+
+# This version uses --status-fd messages
+set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
 
diff -urN mutt-1.5.3.orig/pgp.c mutt-1.5.3/pgp.c
--- mutt-1.5.3.orig/pgp.c       2002-12-16 16:27:26.000000000 +0100
+++ mutt-1.5.3/pgp.c    2002-12-30 04:14:21.000000000 +0100
@@ -120,6 +120,8 @@
        dprint (2, (debugfile, "pgp_copy_checksig: \"%s\" doesn't match 
regexp.\n",
                    line));
       
+      if (strncmp (line, "[GNUPG:] ", 9) == 0)
+       continue;
       fputs (line, fpout);
       fputc ('\n', fpout);
     }
Date: Mon, 6 Oct 2003 10:04:04 +0200
To: mutt-dev@xxxxxxxx
Subject: Maildir parsing optimization for ext3/Linux 2.6
From: Florian Weimer <fw@xxxxxxxxxxxxx>

Linux 2.6 adds hashed directory support to ext3.  As a result, readdir()
returns directory entries in a pretty wild order.  Opening files in
this order results in enormous seek overhead.  This overhead can be
reduced if the files are sorted by inode number first.

Without the patch below, mutt needs 200 seconds to open a maildir folder
with 18,500 messages which does not reside in the dentry/page cache.  If
the patch is applied, less than 15 seconds are required.  If the folder
is in cache, 3.1 vs. 3.3 seconds are needed.

If necessary, I can add some autoconf hackery to activate this
optimization only on Linux systems (where the d_ino field is always
available).

diff -urN mutt.orig/PATCHES mutt/PATCHES
--- mutt.orig/PATCHES   1970-01-01 01:00:00.000000000 +0100
+++ mutt/PATCHES        2003-08-09 15:51:11.000000000 +0200
@@ -1,0 +1 @@
+patch-1.5.4.fw.maildir_inode_sort
diff -u -r3.17 mh.c
--- mutt/mh.c   19 Sep 2003 13:03:25 -0000      3.17
+++ mutt/mh.c   6 Oct 2003 07:51:40 -0000
@@ -30,6 +30,7 @@
 #include "sort.h"
 
 #include <sys/stat.h>
+#include <sys/types.h>
 #include <dirent.h>
 #include <limits.h>
 #include <unistd.h>
@@ -47,6 +48,7 @@
   HEADER *h;
   char *canon_fname;
   unsigned header_parsed:1;
+  ino_t inode;
   struct maildir *next;
 };
 
@@ -626,7 +628,7 @@
 
 static int maildir_parse_entry (CONTEXT * ctx, struct maildir ***last,
                                const char *subdir, const char *fname,
-                               int *count, int is_old)
+                               int *count, int is_old, ino_t inode)
 {
   struct maildir *entry;
   HEADER *h = NULL;
@@ -666,6 +668,7 @@
     entry = safe_calloc (sizeof (struct maildir), 1);
     entry->h = h;
     entry->header_parsed = (ctx->magic == M_MH);
+    entry->inode = inode;
     **last = entry;
     *last = &entry->next;
 
@@ -723,7 +726,8 @@
     dprint (2,
            (debugfile, "%s:%d: parsing %s\n", __FILE__, __LINE__,
             de->d_name));
-    maildir_parse_entry (ctx, last, subdir, de->d_name, count, is_old);
+    maildir_parse_entry (ctx, last, subdir, de->d_name, count, is_old, 
+                        de->d_ino);
   }
 
   closedir (dirp);
@@ -779,6 +783,94 @@
   return r;
 }
 
+/*
+ * Merge two maildir lists according to the inode numbers.
+ */
+static struct maildir*  maildir_merge_inode (struct maildir *left,
+                                            struct maildir *right)
+{
+  struct maildir* head;
+  struct maildir* tail;
+
+  if (left && right) 
+  {
+    if (left->inode < right->inode)
+    {
+      head = left;
+      left = left->next;
+    }
+    else 
+    {
+      head = right;
+      right = right->next;
+    }
+  } 
+  else 
+  {
+    if (left) 
+      return left;
+    else 
+      return right;
+  }
+    
+  tail = head;
+
+  while (left && right) 
+  {
+    if (left->inode < right->inode) 
+    {
+      tail->next = left;
+      left = left->next;
+    } 
+    else 
+    {
+      tail->next = right;
+      right = right->next;
+    }
+    tail = tail->next;
+  }
+
+  if (left) 
+  {
+    tail->next = left;
+  }
+  else
+  {
+    tail->next = right;
+  }
+
+  return head;
+}
+
+/*
+ * Sort maildir list according to inode.
+ */
+static struct maildir* maildir_sort_inode(struct maildir* list)
+{
+  struct maildir* left = list;
+  struct maildir* right = list;
+
+  if (!list || !list->next) 
+  {
+    return list;
+  }
+
+  list = list->next;
+  while (list && list->next) 
+  {
+    right = right->next;
+    list = list->next->next;
+  }
+
+  list = right;
+  right = right->next;
+  list->next = 0;
+
+  left = maildir_sort_inode(left);
+  right = maildir_sort_inode(right);
+  return maildir_merge_inode(left, right);
+}
+
 
 /* 
  * This function does the second parsing pass for a maildir-style
@@ -834,6 +926,8 @@
     mh_update_maildir (md, &mhs);
     mhs_free_sequences (&mhs);
   }
+
+  md = maildir_sort_inode(md);
 
   if (ctx->magic == M_MAILDIR)
     maildir_delayed_parsing (ctx, md);

--- mutt-1.4.orig/pgpewrap.c.ORIG       2003-01-14 15:31:05.000000000 -0500
+++ mutt-1.4/pgpewrap.c 2003-01-14 15:33:28.000000000 -0500
@@ -10,10 +10,19 @@
 #include <unistd.h>
 #include <string.h>
 
+void print_usage(const char *progname) {
+       fprintf(stderr, "Command line usage: %s [flags] -- prefix 
[recipients]\n", progname);
+       exit(1);
+}
+
 int main(int argc, char **argv) {
        char **opts, **opt, *pfx;
        int i;
 
+       if (argc <= 1) {
+               print_usage(argv[0]);
+        }
+
        opts = malloc((2 * argc + 1) * sizeof (* opts));        /* 
__MEM_CHECKED__ */
        if(!opts) {
                perror(argv[0]);
@@ -28,8 +37,7 @@
                if(!strcmp(argv[i], "--")) {
                        i += 2;
                        if(i > argc) {
-                               fprintf(stderr, "Command line usage: %s [flags] 
-- prefix [recipients]\n", argv[0]);
-                               return 1;
+                               print_usage(argv[0]);
                        }
                        pfx = argv[i-1];
                }
diff -ruN mutt.orig/PATCHES mutt/PATCHES
--- mutt.orig/PATCHES   2003-09-13 16:23:24.000000000 +0200
+++ mutt/PATCHES        2003-09-13 16:21:53.000000000 +0200
@@ -1,0 +1 @@
+patch-1.5.4.vk.pgp_verbose_mime
diff -ruN mutt.orig/globals.h mutt/globals.h
--- mutt.orig/globals.h 2003-09-13 16:23:24.000000000 +0200
+++ mutt/globals.h      2003-09-13 16:23:18.000000000 +0200
@@ -195,6 +195,8 @@
 WHERE char *PgpListSecringCommand;
 WHERE char *PgpListPubringCommand;
 WHERE char *PgpGetkeysCommand;
+WHERE char *PgpMimeSignatureFilename;
+WHERE char *PgpMimeSignatureDescription;
 
 /*-- formerly in smime.h --*/
 WHERE char *SmimeDefaultKey;
diff -ruN mutt.orig/init.h mutt/init.h
--- mutt.orig/init.h    2003-09-13 16:23:24.000000000 +0200
+++ mutt/init.h 2003-09-13 16:21:53.000000000 +0200
@@ -1458,6 +1458,18 @@
   ** This option overrides ``$$pgp_create_traditional''
   ** (PGP only)
   */
+  { "pgp_mime_signature_filename", DT_STR, R_NONE, UL 
&PgpMimeSignatureFilename, UL "signature.asc"},
+  /*
+  ** .pp
+  ** This option sets the filename used for signature parts in PGP/MIME
+  ** signed messages.
+  */
+  { "pgp_mime_signature_description", DT_STR, R_NONE, UL 
&PgpMimeSignatureDescription, UL "Digital signature"},
+  /*
+  ** .pp
+  ** This option sets the Content-Description used for signature parts in
+  ** PGP/MIME signed messages.
+  */
 
   /* XXX Default values! */
   
diff -ruN mutt.orig/pgp.c mutt/pgp.c
--- mutt.orig/pgp.c     2003-09-13 16:23:24.000000000 +0200
+++ mutt/pgp.c  2003-09-13 16:21:53.000000000 +0200
@@ -998,6 +998,8 @@
   t->disposition = DISPINLINE;
   t->encoding = ENC7BIT;
   t->unlink = 1; /* ok to remove this file after sending. */
+  mutt_set_parameter ("name", PgpMimeSignatureFilename, &t->parameter);
+  t->description = safe_strdup (PgpMimeSignatureDescription);
 
   return (a);
 }
diff -ur ../MUTT/mutt/PATCHES mutt/PATCHES
--- ../MUTT/mutt/PATCHES        2002-12-09 18:44:54.000000000 +0100
+++ mutt/PATCHES        2004-01-19 13:50:52.000000000 +0100
@@ -1,0 +1 @@
+patch-1.5.5.1.nt.xtitles.3.ab.1
diff -ur ../MUTT/mutt/curs_main.c mutt/curs_main.c
--- ../MUTT/mutt/curs_main.c    2003-09-03 19:09:09.000000000 +0200
+++ mutt/curs_main.c    2004-01-19 13:45:37.000000000 +0100
@@ -103,6 +103,19 @@
 extern const char *ReleaseDate;
 extern size_t UngetCount;
 
+#define ASCII_CTRL_G                  0x07
+#define ASCII_CTRL_OPEN_SQUARE_BRAKET 0x1b
+ 
+void set_xterm_title_bar(char *title)
+{
+  fprintf(stderr ,"%c]2;%s%c", ASCII_CTRL_OPEN_SQUARE_BRAKET, title, 
ASCII_CTRL_G);
+}
+
+void set_xterm_icon_name(char *name)
+{
+  fprintf(stderr, "%c]1;%s%c", ASCII_CTRL_OPEN_SQUARE_BRAKET, name, 
ASCII_CTRL_G);
+}
+
 void index_make_entry (char *s, size_t l, MUTTMENU *menu, int num)
 {
   format_flag flag = M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | 
M_FORMAT_INDEX;
@@ -562,6 +575,13 @@
        mutt_paddstr (COLS, buf);
        SETCOLOR (MT_COLOR_NORMAL);
        menu->redraw &= ~REDRAW_STATUS;
+       if (option(OPTXTERMSETTITLES))
+       {
+         menu_status_line (buf, sizeof (buf), menu, NONULL (XtermTitle));
+         set_xterm_title_bar(buf);
+         menu_status_line (buf, sizeof (buf), menu, NONULL (XtermIcon));
+         set_xterm_icon_name(buf);
+       }
       }
 
       menu->redraw = 0;
diff -ur ../MUTT/mutt/globals.h mutt/globals.h
--- ../MUTT/mutt/globals.h      2003-07-15 13:41:32.000000000 +0200
+++ mutt/globals.h      2004-01-19 13:45:37.000000000 +0100
@@ -112,6 +112,8 @@
 WHERE char *Tochars;
 WHERE char *Username;
 WHERE char *Visual;
+WHERE char *XtermTitle;
+WHERE char *XtermIcon;
 
 WHERE char *LastFolder;
 
diff -ur ../MUTT/mutt/init.c mutt/init.c
--- ../MUTT/mutt/init.c 2004-01-05 19:49:00.000000000 +0100
+++ mutt/init.c 2004-01-19 13:48:45.000000000 +0100
@@ -891,6 +891,26 @@
        toggle_option (MuttVars[idx].data);
       else
        set_option (MuttVars[idx].data);
+
+      /* sanity check for xterm */
+      if ((mutt_strcmp (MuttVars[idx].option, "xterm_set_titles") == 0)
+               && option (OPTXTERMSETTITLES))
+      {
+       char *ep = getenv ("TERM");
+       /* Make sure that the terminal can take the control codes */
+       if (ep == NULL) unset_option (MuttVars[idx].data);
+       else if (mutt_strncasecmp (ep, "xterm", 5) &&
+                mutt_strncasecmp (ep, "color-xterm", 11) &&
+                mutt_strncasecmp (ep, "eterm", 5) &&
+                mutt_strncasecmp (ep, "kterm", 5) &&
+                mutt_strncasecmp (ep, "nxterm", 6) &&
+                mutt_strncasecmp (ep, "putty", 5) &&
+                mutt_strncasecmp (ep, "screen", 6) &&
+                mutt_strncasecmp (ep, "cygwin", 6) &&
+                mutt_strncasecmp (ep, "rxvt", 4) )
+         unset_option (MuttVars[idx].  data);
+
+      }
     }
     else if (DTYPE (MuttVars[idx].type) == DT_STR ||
             DTYPE (MuttVars[idx].type) == DT_PATH ||
diff -ur ../MUTT/mutt/init.h mutt/init.h
--- ../MUTT/mutt/init.h 2004-01-05 19:49:00.000000000 +0100
+++ mutt/init.h 2004-01-19 13:45:37.000000000 +0100
@@ -2670,6 +2670,27 @@
   ** Controls whether mutt writes out the Bcc header when preparing
   ** messages to be sent.  Exim users may wish to use this.
   */
+  {"xterm_icon",       DT_STR,   R_BOTH, UL &XtermIcon,  UL "M%?n?AIL&ail?"},
+  /*
+  ** .pp
+  ** Controls the format of the icon title, as long as xterm_set_titles
+  ** is enabled. This string is identical in formatting to the one used by
+  ** ``$$status_format''.
+  */
+  {"xterm_set_titles", DT_BOOL,  R_BOTH, OPTXTERMSETTITLES, 0},
+  /*
+  ** .pp
+  ** Controls whether mutt sets the xterm title bar and icon name
+  ** (as long as you're in an appropriate terminal). The default must
+  ** be off to force in the validity checking.
+  */
+  {"xterm_title",      DT_STR,   R_BOTH, UL &XtermTitle, UL "Mutt with %?m?%m 
messages&no messages?%?n? [%n NEW]?"},
+  /*
+  ** .pp
+  ** Controls the format of the title bar of the xterm provided that
+  ** xterm_set_titles has been set. This string is identical in formatting
+  ** to the one used by ``$$status_format''.
+  */
   /*--*/
   { NULL }
 };
diff -ur ../MUTT/mutt/mutt.h mutt/mutt.h
--- ../MUTT/mutt/mutt.h 2004-01-05 19:49:00.000000000 +0100
+++ mutt/mutt.h 2004-01-19 13:45:37.000000000 +0100
@@ -424,6 +424,7 @@
   OPTWRAPSEARCH,
   OPTWRITEBCC,         /* write out a bcc header? */
   OPTXMAILER,
+  OPTXTERMSETTITLES,
 
   /* PGP options */
   
diff -ur ../MUTT/mutt/pager.c mutt/pager.c
--- ../MUTT/mutt/pager.c        2004-01-05 19:49:00.000000000 +0100
+++ mutt/pager.c        2004-01-19 13:45:37.000000000 +0100
@@ -26,6 +26,8 @@
 #include "pager.h"
 #include "attach.h"
 #include "mbyte.h"
+void set_xterm_title_bar(char *title);
+void set_xterm_icon_name(char *name);
 
 #include "mx.h"
 
@@ -1740,6 +1742,13 @@
       SETCOLOR (MT_COLOR_STATUS);
       mutt_paddstr (COLS, buffer);
       SETCOLOR (MT_COLOR_NORMAL);
+      if (option(OPTXTERMSETTITLES))
+      {
+       menu_status_line (buffer, sizeof (buffer), index, NONULL (XtermTitle));
+       set_xterm_title_bar(buffer);
+       menu_status_line (buffer, sizeof (buffer), index, NONULL (XtermIcon));
+       set_xterm_icon_name(buffer);
+      }
     }
 
     redraw = 0;
--- a/PATCHES
+++ b/PATCHES
@@ -1,0 +1 @@
+Debian.asp.agent-compatible.1
--- a/pgpinvoke.c
+++ b/pgpinvoke.c
@@ -123,7 +123,7 @@
        snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
        snprintf (dest, destlen, fmt, cctx->need_passphrase ? "PGPPASSFD=0" : 
"");
       }
-      else if (!cctx->need_passphrase)
+      else if (!cctx->need_passphrase || pgp_use_gpg_agent())
        optional = 0;
       break;
     }
--- a/contrib/gpg.rc
+++ b/contrib/gpg.rc
@@ -37,15 +37,15 @@
 set pgp_verify_command="/usr/bin/gpg   --status-fd=2 --no-verbose --quiet  
--batch  --output - --verify %s %f"
 
 # decrypt a pgp/mime attachment
-set pgp_decrypt_command="/usr/bin/gpg   --status-fd=2 --passphrase-fd 0 
--no-verbose --quiet  --batch  --output - %f"
+set pgp_decrypt_command="/usr/bin/gpg   --status-fd=2 %?p?--passphrase-fd 0? 
--no-verbose --quiet  --batch  --output - %f"
 
 # create a pgp/mime signed attachment
 # set pgp_sign_command="/usr/bin/gpg-2comp --comment '' --no-verbose --batch  
--output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
-set pgp_sign_command="/usr/bin/gpg    --no-verbose --batch --quiet   --output 
- --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
+set pgp_sign_command="/usr/bin/gpg    --no-verbose --batch --quiet   --output 
- %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
 
 # create a application/pgp signed (old-style) message
 # set pgp_clearsign_command="/usr/bin/gpg-2comp --comment ''  --no-verbose 
--batch  --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? 
%f"
-set pgp_clearsign_command="/usr/bin/gpg   --charset utf-8 --no-verbose --batch 
--quiet   --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u 
%a? %f"
+set pgp_clearsign_command="/usr/bin/gpg   --charset utf-8 --no-verbose --batch 
--quiet   --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign 
%?a?-u %a? %f"
 
 # create a pgp/mime encrypted attachment
 # set pgp_encrypt_only_command="pgpewrap gpg-2comp  -v --batch  --output - 
--encrypt --textmode --armor --always-trust -- -r %r -- %f"
@@ -53,7 +53,7 @@
 
 # create a pgp/mime encrypted and signed attachment
 # set pgp_encrypt_sign_command="pgpewrap gpg-2comp  --passphrase-fd 0 -v 
--batch  --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r 
-- %f"
-set pgp_encrypt_sign_command="pgpewrap /usr/bin/gpg  --charset utf-8 
--passphrase-fd 0  --batch --quiet  --no-verbose  --textmode --output - 
--encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_sign_command="pgpewrap /usr/bin/gpg  --charset utf-8 
%?p?--passphrase-fd 0?  --batch --quiet  --no-verbose  --textmode --output - 
--encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
 
 # import a key into the public key ring
 set pgp_import_command="/usr/bin/gpg  --no-verbose --import %f"
diff -urNp mutt-1.5.4.orig/PATCHES mutt-1.5.4/PATCHES
--- mutt-1.5.4.orig/PATCHES     2002-12-09 18:44:54.000000000 +0100
+++ mutt-1.5.4/PATCHES  2003-02-14 16:42:20.000000000 +0100
@@ -1,0 +1 @@
+patch-1.3.23.1.ametzler.pgp_good_sign
diff -urNp mutt-1.5.4.orig/pgp.c mutt-1.5.4/pgp.c
--- mutt-1.5.4.orig/pgp.c       2003-02-13 10:50:00.000000000 +0100
+++ mutt-1.5.4/pgp.c    2003-02-14 16:45:01.000000000 +0100
@@ -331,7 +331,13 @@ void pgp_application_pgp_handler (BODY *
          if (s->flags & M_DISPLAY)
          {
            if (rc == 0) have_any_sigs = 1;
-           if (rc || rv) maybe_goodsig = 0;
+/*
+ * Sig is bad if
+ * gpg_good_sign-pattern did not match || pgp_decode_command returned not 0
+ * Sig _is_ correct if
+ *  gpg_good_sign="" && pgp_decode_command returned 0
+ */
+           if (rc == -1 || rv) maybe_goodsig = 0;
 
            state_putc ('\n', s);
            state_attach_puts (_("[-- End of PGP output --]\n\n"), s);

Attachment: signature.asc
Description: Digital signature