summaryrefslogtreecommitdiffstats
path: root/mail/mutt-devel
diff options
context:
space:
mode:
authorsergei <sergei@FreeBSD.org>2003-12-19 23:13:50 +0000
committersergei <sergei@FreeBSD.org>2003-12-19 23:13:50 +0000
commit43b7777539fef5079ae0e37d0cd9b8c35ce62556 (patch)
treef2222afcce6286a58ae18bbc92fdf0e40ba9c2a7 /mail/mutt-devel
parent61cb958323a125c6933781dd380d01ffbe0049fc (diff)
downloadFreeBSD-ports-43b7777539fef5079ae0e37d0cd9b8c35ce62556.zip
FreeBSD-ports-43b7777539fef5079ae0e37d0cd9b8c35ce62556.tar.gz
- Fix pgp-patch (as pointed out by it's author)
- Fix nntp-patch (also pointed out by the author) - Add new knob: WITH_MUTT_IMAP_HEADER_CACHE - Bump PORTREVISION PR: 60403 Submitted by: maintainer
Diffstat (limited to 'mail/mutt-devel')
-rw-r--r--mail/mutt-devel/Makefile33
-rw-r--r--mail/mutt-devel/distinfo5
-rw-r--r--mail/mutt-devel/files/extra-patch-imap-header-cache873
-rw-r--r--mail/mutt-devel/files/extra-patch-pgp-dw939
-rw-r--r--mail/mutt-devel/scripts/generate-plist5
5 files changed, 1104 insertions, 751 deletions
diff --git a/mail/mutt-devel/Makefile b/mail/mutt-devel/Makefile
index a501bdc..ef0be54 100644
--- a/mail/mutt-devel/Makefile
+++ b/mail/mutt-devel/Makefile
@@ -41,6 +41,9 @@
# WITH_MUTT_QUOTE_PATCH
# This is a default knob and can be disabled by WITHOUT_MUTT_QUOTE_PATCH
#
+# If you want to have the IMAP header cache define:
+# WITH_MUTT_IMAP_HEADER_CACHE
+#
# If you want to make SMIME outlook compatible define:
# WITH_MUTT_SMIME_OUTLOOK_COMPAT
# This is a default knob and can be disabled by
@@ -72,6 +75,7 @@
PORTNAME= mutt-devel
PORTVERSION= 1.5.5.1
+PORTREVISION= 1
CATEGORIES+= mail ipv6
.if defined(WITH_MUTT_NNTP)
CATEGORIES+= news
@@ -86,7 +90,7 @@ PATCH_SITES+= http://www.mutt.org.ua/download/mutt-${VVV_PATCH_VERSION}/:vvv \
http://www2.mutt.org.ua/download/mutt-${VVV_PATCH_VERSION}/:vvv \
ftp://ftp.mutt.org.ua/pub/mutt/mutt-${VVV_PATCH_VERSION}/:vvv \
ftp://ftp2.mutt.org.ua/pub/mutt/mutt-${VVV_PATCH_VERSION}/:vvv \
- http://cedricduval.free.fr/download/mutt/:cd \
+ http://cedricduval.free.fr/mutt/patches/download/:cd \
http://home.woolridge.ca/mutt/patches/:dw
MAINTAINER?= udo.schweigert@siemens.com
@@ -117,8 +121,8 @@ SCRIPTS_ENV= WRKDIR="${WRKDIR}"
.include <bsd.port.pre.mk>
-CD_PATCH_VERSION= 1.5.4
-DW_PATCH_VERSION= 1.5.x
+CD_IFDEF_PATCH_VERSION= 1.5.4
+DW_PATCH_VERSION= 1.5.5
DW_MBOX_PATCH_VERSION= 1.5.4
.if !defined(VVV_PATCH_VERSION)
VVV_PATCH_VERSION= ${PORTVERSION}
@@ -126,11 +130,14 @@ VVV_PATCH_VERSION= ${PORTVERSION}
.if !defined(CD_PATCH_VERSION)
CD_PATCH_VERSION= ${PORTVERSION}
.endif
+.if !defined(CD_IFDEF_PATCH_VERSION)
+CD_IFDEF_PATCH_VERSION= ${CD_PATCH_VERSION}
+.endif
.if !defined(DW_PATCH_VERSION)
DW_PATCH_VERSION= ${PORTVERSION}
.endif
.if !defined(DW_MBOX_PATCH_VERSION)
-DW_MBOX_PATCH_VERSION= ${PORTVERSION}
+DW_MBOX_PATCH_VERSION= ${DW_PATCH_VERSION}
.endif
# XXX
@@ -187,6 +194,10 @@ LIB_DEPENDS+= sasl.8:${PORTSDIR}/security/cyrus-sasl
pre-configure::
@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-smime-outlook
.endif
+.if defined(WITH_MUTT_IMAP_HEADER_CACHE)
+pre-configure::
+ @${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-imap-header-cache
+.endif
.if ! defined(WITHOUT_MUTT_PGP_PATCH)
SGML_NEEDED= yes
@@ -215,6 +226,7 @@ SGML_NEEDED= yes
.endif
.if defined(WITH_MUTT_NNTP)
PATCHFILES+= patch-${VVV_PATCH_VERSION}.vvv.nntp.gz:vvv
+PATCHFILES+= patch-${VVV_PATCH_VERSION}.vvv.compose.gz:vvv
CONFIGURE_ARGS+= --enable-nntp
SGML_NEEDED= yes
.endif
@@ -233,7 +245,7 @@ PATCHFILES+= patch-${CD_PATCH_VERSION}.cd.signatures_menu.2.1:cd
SGML_NEEDED= yes
.endif
.if defined(WITH_MUTT_IFDEF_PATCH)
-PATCHFILES+= patch-${CD_PATCH_VERSION}.cd.ifdef.1:cd
+PATCHFILES+= patch-${CD_IFDEF_PATCH_VERSION}.cd.ifdef.1:cd
SGML_NEEDED= yes
.endif
.if defined(WITH_MUTT_MBOX_HOOK_PATCH)
@@ -262,6 +274,9 @@ SCRIPTS_ENV+= MUTT_COMPRESSED_FOLDERS="yes"
.if ! defined(WITHOUT_MUTT_QUOTE_PATCH)
SCRIPTS_ENV+= MUTT_QUOTE_PATCH="yes"
.endif
+.if defined(WITH_MUTT_IMAP_HEADER_CACHE)
+SCRIPTS_ENV+= MUTT_IMAP_HEADER_CACHE="yes"
+.endif
.if defined(WITH_MUTT_EDIT_THREADS)
SCRIPTS_ENV+= MUTT_EDIT_THREADS="yes"
.endif
@@ -338,6 +353,14 @@ post-install:
@${ECHO} "environment." >> ${PKGMESSAGE}
@${ECHO} "====================================================" >> ${PKGMESSAGE}
.endif
+.if defined(WITH_MUTT_IMAP_HEADER_CACHE)
+ @${ECHO} "====================================================" >> ${PKGMESSAGE}
+ @${ECHO} "You have installed ${PORTNAME} with the IMAP header cache enabled." >> ${PKGMESSAGE}
+ @${ECHO} "Please be aware that this - at the moment - could result in" >> ${PKGMESSAGE}
+ @${ECHO} "incorrect display of message flags if there is another client" >> ${PKGMESSAGE}
+ @${ECHO} "simultaneously using the same mailbox." >> ${PKGMESSAGE}
+ @${ECHO} "====================================================" >> ${PKGMESSAGE}
+.endif
.if !defined(BATCH)
@${ECHO}
@${CAT} ${PKGMESSAGE}
diff --git a/mail/mutt-devel/distinfo b/mail/mutt-devel/distinfo
index 6556804..d99e519 100644
--- a/mail/mutt-devel/distinfo
+++ b/mail/mutt-devel/distinfo
@@ -1,9 +1,10 @@
MD5 (mutt/mutt-1.5.5.1i.tar.gz) = 9729ee2a2024b57e2a903ec7753970a5
MD5 (mutt/patch-1.5.5.1.rr.compressed.gz) = 12bf7e03af3a0d7529dfbdec5dd0f63a
MD5 (mutt/patch-1.5.5.1.vvv.nntp.gz) = a655b6b5ceb582640172d5476093705d
+MD5 (mutt/patch-1.5.5.1.vvv.compose.gz) = 69e946fe70735d37b9f8e6f6ef6376d1
MD5 (mutt/patch-1.5.5.1.vvv.initials.gz) = 5abdf15c3f76b5c24f29767e65e0fc32
MD5 (mutt/patch-1.5.5.1.vvv.quote.gz) = abb2ba5829110cba4be323d6b6f303dc
-MD5 (mutt/patch-1.5.4.cd.edit_threads.9.5) = f8d7fe6ea1a6a1b92c942f4446918433
-MD5 (mutt/patch-1.5.4.cd.signatures_menu.2.1) = 5b2298335071c46ee1f3ed8c689066b1
+MD5 (mutt/patch-1.5.5.1.cd.edit_threads.9.5) = a8a3a973d8693f8af526cecf7edbd71f
+MD5 (mutt/patch-1.5.5.1.cd.signatures_menu.2.1) = 22caeffb4a612f5fa6e1f585b40c51a6
MD5 (mutt/patch-1.5.4.cd.ifdef.1) = a545036cdb55519154d0b35465f52daa
MD5 (mutt/p0-patch-1.5.4.dw.mbox-hook.1) = 326f415380cc377c99d2232f16267ffe
diff --git a/mail/mutt-devel/files/extra-patch-imap-header-cache b/mail/mutt-devel/files/extra-patch-imap-header-cache
new file mode 100644
index 0000000..0c6fb79
--- /dev/null
+++ b/mail/mutt-devel/files/extra-patch-imap-header-cache
@@ -0,0 +1,873 @@
+diff -ru old/globals.h work/mutt-1.5.5.1/globals.h
+--- old/globals.h Wed Nov 5 10:41:31 2003
++++ globals.h Fri Nov 28 18:30:37 2003
+@@ -57,6 +57,7 @@
+ WHERE char *ImapHomeNamespace INITVAL (NULL);
+ WHERE char *ImapPass INITVAL (NULL);
+ WHERE char *ImapUser INITVAL (NULL);
++WHERE char *ImapHeadercache INITVAL (NULL);
+ #endif
+ WHERE char *Inbox;
+ WHERE char *Ispell;
+diff -ru old/imap/Makefile.am work/mutt-1.5.5.1/imap/Makefile.am
+--- old/imap/Makefile.am Thu Jan 24 14:35:57 2002
++++ imap/Makefile.am Fri Nov 28 18:30:37 2003
+@@ -22,4 +22,5 @@
+ noinst_HEADERS = auth.h imap_private.h message.h
+
+ libimap_a_SOURCES = auth.c auth_login.c browse.c command.c imap.c imap.h \
+- message.c utf7.c util.c $(AUTHENTICATORS) $(GSSSOURCES)
++ imap_headercache.c imap_headercache.h message.c utf7.c util.c \
++ $(AUTHENTICATORS) $(GSSSOURCES)
+diff -ru old/imap/imap.c work/mutt-1.5.5.1/imap/imap.c
+--- old/imap/imap.c Wed Nov 5 10:41:36 2003
++++ imap/imap.c Fri Nov 28 18:30:37 2003
+@@ -29,6 +29,7 @@
+ #include "browser.h"
+ #include "message.h"
+ #include "imap_private.h"
++#include "imap_headercache.h"
+ #ifdef USE_SSL
+ # include "mutt_ssl.h"
+ #endif
+@@ -546,6 +547,13 @@
+
+ /* Clean up path and replace the one in the ctx */
+ imap_fix_path (idata, mx.mbox, buf, sizeof (buf));
++
++ if (idata->hcache)
++ {
++ imap_headercache_close(idata->hcache);
++ idata->hcache = NULL;
++ }
++
+ FREE(&(idata->mailbox));
+ idata->mailbox = safe_strdup (buf);
+ imap_qualify_path (buf, sizeof (buf), &mx, idata->mailbox);
+@@ -556,6 +564,7 @@
+ idata->ctx = ctx;
+
+ /* clear mailbox status */
++ idata->uidvalidity = 0;
+ idata->status = 0;
+ memset (idata->rights, 0, (RIGHTSMAX+7)/8);
+ idata->newMailCount = 0;
+@@ -601,6 +610,15 @@
+ if ((pc = imap_get_flags (&(idata->flags), pc)) == NULL)
+ goto fail;
+ }
++ /* save UIDVALIDITY for the header cache */
++ else if (ascii_strncasecmp("OK [UIDVALIDITY", pc, 14) == 0)
++ {
++ dprint(2, (debugfile, "Getting mailbox UIDVALIDITY\n"));
++ pc += 3;
++ pc = imap_next_word(pc);
++
++ sscanf(pc, "%u", &(idata->uidvalidity));
++ }
+ else
+ {
+ pc = imap_next_word (pc);
+@@ -684,6 +702,9 @@
+ ctx->hdrs = safe_calloc (count, sizeof (HEADER *));
+ ctx->v2r = safe_calloc (count, sizeof (int));
+ ctx->msgcount = 0;
++
++ idata->hcache = imap_headercache_open(idata);
++
+ if (count && (imap_read_headers (idata, 0, count-1) < 0))
+ {
+ mutt_error _("Error opening mailbox");
+@@ -693,6 +714,7 @@
+
+ dprint (2, (debugfile, "imap_open_mailbox: msgcount is %d\n", ctx->msgcount));
+ FREE (&mx.mbox);
++
+ return 0;
+
+ fail:
+@@ -914,6 +936,7 @@
+ int n;
+ int err_continue = M_NO; /* continue on error? */
+ int rc;
++ IMAP_HEADER h;
+
+ idata = (IMAP_DATA*) ctx->data;
+
+@@ -953,8 +976,20 @@
+ /* mark these messages as unchanged so second pass ignores them. Done
+ * here so BOGUS UW-IMAP 4.7 SILENT FLAGS updates are ignored. */
+ for (n = 0; n < ctx->msgcount; n++)
+- if (ctx->hdrs[n]->deleted && ctx->hdrs[n]->changed)
+- ctx->hdrs[n]->active = 0;
++ {
++ if (ctx->hdrs[n]->deleted)
++ {
++ if (idata->hcache)
++ {
++ h.data = HEADER_DATA(ctx->hdrs[n]);
++ imap_headercache_delete(idata->hcache, &h);
++ }
++
++ if (ctx->hdrs[n]->changed)
++ ctx->hdrs[n]->active = 0;
++ }
++ }
++
+ if (imap_exec (idata, cmd.data, 0) != 0)
+ {
+ mutt_error (_("Expunge failed"));
+@@ -972,6 +1007,23 @@
+ {
+ ctx->hdrs[n]->changed = 0;
+
++ if (idata->hcache)
++ {
++ h.data = HEADER_DATA(ctx->hdrs[n]);
++
++ h.read = ctx->hdrs[n]->read;
++ h.old = ctx->hdrs[n]->old;
++ h.deleted = ctx->hdrs[n]->deleted;
++ h.flagged = ctx->hdrs[n]->flagged;
++ h.replied = ctx->hdrs[n]->replied;
++ h.changed = ctx->hdrs[n]->changed;
++ h.sid = ctx->hdrs[n]->index + 1;
++ h.received = ctx->hdrs[n]->received;
++ h.content_length = ctx->hdrs[n]->content->length;
++
++ imap_headercache_update(idata->hcache, &h);
++ }
++
+ mutt_message (_("Saving message status flags... [%d/%d]"), n+1,
+ ctx->msgcount);
+
+@@ -1099,6 +1151,11 @@
+
+ idata->reopen &= IMAP_REOPEN_ALLOW;
+ idata->state = IMAP_AUTHENTICATED;
++ if (idata->hcache)
++ {
++ imap_headercache_close(idata->hcache);
++ idata->hcache = NULL;
++ }
+ FREE (&(idata->mailbox));
+ mutt_free_list (&idata->flags);
+ idata->ctx = NULL;
+diff -ru old/imap/imap_private.h work/mutt-1.5.5.1/imap/imap_private.h
+--- old/imap/imap_private.h Wed Nov 5 10:41:36 2003
++++ imap/imap_private.h Fri Nov 28 18:30:37 2003
+@@ -21,6 +21,7 @@
+ #define _IMAP_PRIVATE_H 1
+
+ #include "imap.h"
++#include "imap_headercache.h"
+ #include "mutt_socket.h"
+
+ /* -- symbols -- */
+@@ -148,7 +149,7 @@
+ int state;
+ } IMAP_COMMAND;
+
+-typedef struct
++typedef struct IMAP_DATA
+ {
+ /* This data is specific to a CONNECTION to an IMAP server */
+ CONNECTION *conn;
+@@ -175,6 +176,7 @@
+ char *mailbox;
+ unsigned short check_status;
+ unsigned char reopen;
++ unsigned int uidvalidity;
+ unsigned char rights[(RIGHTSMAX + 7)/8];
+ unsigned int newMailCount;
+ IMAP_CACHE cache[IMAP_CACHE_LEN];
+@@ -182,6 +184,7 @@
+
+ /* all folder flags - system flags AND keywords */
+ LIST *flags;
++ IMAP_HEADERCACHE *hcache;
+ } IMAP_DATA;
+ /* I wish that were called IMAP_CONTEXT :( */
+
+diff -ru old/imap/message.c work/mutt-1.5.5.1/imap/message.c
+--- old/imap/message.c Wed Nov 5 10:41:36 2003
++++ imap/message.c Fri Nov 28 18:30:38 2003
+@@ -25,6 +25,7 @@
+ #include "mutt.h"
+ #include "mutt_curses.h"
+ #include "imap_private.h"
++#include "imap_headercache.h"
+ #include "message.h"
+ #include "mx.h"
+
+@@ -54,9 +55,14 @@
+ int msgno;
+ IMAP_HEADER h;
+ int rc, mfhrc, oldmsgcount;
++ IMAP_HEADERCACHE *hc = NULL;
++ int msgbegin_hc;
+ int fetchlast = 0;
++
+ const char *want_headers = "DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE IN-REPLY-TO REPLY-TO LINES X-LABEL";
+
++ msgno = msgbegin;
++
+ ctx = idata->ctx;
+
+ if (mutt_bit_isset (idata->capabilities,IMAP4REV1))
+@@ -87,36 +93,150 @@
+ }
+ unlink (tempfile);
+
++ oldmsgcount = ctx->msgcount;
++
++ msgbegin_hc = msgbegin;
++
++ hc = idata->hcache;
++
++restart:
+ /* make sure context has room to hold the mailbox */
+ while ((msgend) >= idata->ctx->hdrmax)
+ mx_alloc_memory (idata->ctx);
+
+- oldmsgcount = ctx->msgcount;
+ idata->reopen &= ~IMAP_NEWMAIL_PENDING;
+ idata->newMailCount = 0;
+
++ if (hc)
++ {
++ snprintf(buf, sizeof(buf), "FETCH %d:%d (UID)", msgbegin_hc + 1,
++ msgend + 1);
++ imap_cmd_start(idata, buf);
++
++ for (msgno = msgbegin_hc; msgno <= msgend; msgno++)
++ {
++ if (ReadInc && (!msgno || ((msgno+1) % ReadInc == 0)))
++ mutt_message (_("Fetching message UIDs... [%d/%d]"), msgno + 1,
++ msgend + 1);
++
++ /* XXX */
++ ctx->hdrs[msgno] = NULL;
++
++ /* XXX leaking h.data on successful exit */
++ memset (&h, 0, sizeof (h));
++ h.data = safe_calloc (1, sizeof (IMAP_HEADER_DATA));
++
++ do
++ {
++ FILE *cache_fp;
++
++ mfhrc = 0;
++
++ rc = imap_cmd_step (idata);
++ if (rc != IMAP_CMD_CONTINUE)
++ break;
++
++ if ((mfhrc = msg_fetch_header (idata->ctx, &h, idata->cmd.buf, NULL)) == -1)
++ continue;
++ else if (mfhrc < 0)
++ break;
++
++ cache_fp = imap_headercache_find(hc, &h);
++ if (cache_fp)
++ {
++ /* update context with message header */
++ ctx->hdrs[msgno] = mutt_new_header ();
++
++ ctx->hdrs[msgno]->index = h.sid - 1;
++
++ /* messages which have not been expunged are ACTIVE (borrowed from mh
++ * folders) */
++ ctx->hdrs[msgno]->active = 1;
++ ctx->hdrs[msgno]->read = h.read;
++ ctx->hdrs[msgno]->old = h.old;
++ ctx->hdrs[msgno]->deleted = h.deleted;
++ ctx->hdrs[msgno]->flagged = h.flagged;
++ ctx->hdrs[msgno]->replied = h.replied;
++ ctx->hdrs[msgno]->changed = h.changed;
++ ctx->hdrs[msgno]->received = h.received;
++ ctx->hdrs[msgno]->data = (void *) (h.data);
++
++ /* NOTE: if Date: header is missing, mutt_read_rfc822_header depends
++ * on h.received being set */
++ ctx->hdrs[msgno]->env = mutt_read_rfc822_header (cache_fp, ctx->hdrs[msgno],
++ 0, 0);
++ /* content built as a side-effect of mutt_read_rfc822_header */
++ ctx->hdrs[msgno]->content->length = h.content_length;
++
++ imap_headercache_done(hc, cache_fp);
++ }
++ }
++ while (mfhrc == -1);
++
++ /* in case we get new mail while fetching the headers */
++ if (idata->reopen & IMAP_NEWMAIL_PENDING)
++ {
++ msgbegin_hc = msgno + 1;
++ msgend = idata->newMailCount - 1;
++ goto restart;
++ }
++ /* XXX freshen... etc */
++ }
++ }
++
++ /* Remember where we left if we get new mail while fetching actual headers */
++ msgbegin_hc = msgno;
++
++ /* Now, either one of the following is true:
++ * 1. We don't have a headercache (hc == 0)
++ * 2. All messages found in the cache have ctx->hdrs[msgno] != NULL, and
++ * filled up.
++ */
++
++ /*
++ * Make one request for everything. This makes fetching headers an
++ * order of magnitude faster if you have a large mailbox.
++ *
++ * If we get more messages while doing this, we make another
++ * request for all the new messages.
++ */
++ if (!hc)
++ {
++ snprintf (buf, sizeof (buf),
++ "FETCH %d:%d (UID FLAGS INTERNALDATE RFC822.SIZE %s)", msgbegin + 1,
++ msgend + 1, hdrreq);
++
++ imap_cmd_start (idata, buf);
++ }
++
+ for (msgno = msgbegin; msgno <= msgend ; msgno++)
+ {
+ if (ReadInc && (!msgno || ((msgno+1) % ReadInc == 0)))
+ mutt_message (_("Fetching message headers... [%d/%d]"), msgno + 1,
+ msgend + 1);
+
+- if (msgno + 1 > fetchlast)
++ /* If the message is in the cache, skip it */
++ if (hc)
+ {
+- /*
+- * Make one request for everything. This makes fetching headers an
+- * order of magnitude faster if you have a large mailbox.
+- *
+- * If we get more messages while doing this, we make another
+- * request for all the new messages.
+- */
+- snprintf (buf, sizeof (buf),
+- "FETCH %d:%d (UID FLAGS INTERNALDATE RFC822.SIZE %s)", msgno + 1,
+- msgend + 1, hdrreq);
+-
+- imap_cmd_start (idata, buf);
++ if (ctx->hdrs[msgno])
++ {
++ ctx->msgcount++;
++ continue;
++ }
++ else if (msgno >= fetchlast)
++ {
++ /* Find the longest "run" of messages not in the cache and fetch it in
++ * one go
++ */
++ for (fetchlast = msgno + 1;
++ fetchlast <= msgend && !ctx->hdrs[fetchlast]; fetchlast++);
++
++ snprintf (buf, sizeof (buf),
++ "FETCH %d:%d (UID FLAGS INTERNALDATE RFC822.SIZE %s)", msgno + 1,
++ fetchlast, hdrreq);
+
+- fetchlast = msgend + 1;
++ imap_cmd_start (idata, buf);
++ }
+ }
+
+ /* freshen fp, h */
+@@ -130,6 +250,8 @@
+ */
+ do
+ {
++ size_t hdrsz;
++
+ mfhrc = 0;
+
+ rc = imap_cmd_step (idata);
+@@ -144,12 +266,16 @@
+ /* make sure we don't get remnants from older larger message headers */
+ fputs ("\n\n", fp);
+
++ hdrsz = (size_t)ftell(fp);
++
+ /* update context with message header */
+ ctx->hdrs[msgno] = mutt_new_header ();
+
+ ctx->hdrs[msgno]->index = h.sid - 1;
++#if 0
+ if (h.sid != ctx->msgcount + 1)
+ dprint (1, (debugfile, "imap_read_headers: msgcount and sequence ID are inconsistent!"));
++#endif
+ /* messages which have not been expunged are ACTIVE (borrowed from mh
+ * folders) */
+ ctx->hdrs[msgno]->active = 1;
+@@ -163,6 +289,13 @@
+ ctx->hdrs[msgno]->data = (void *) (h.data);
+
+ rewind (fp);
++
++ if (hc)
++ {
++ imap_headercache_add(hc, &h, fp, hdrsz);
++ rewind(fp);
++ }
++
+ /* NOTE: if Date: header is missing, mutt_read_rfc822_header depends
+ * on h.received being set */
+ ctx->hdrs[msgno]->env = mutt_read_rfc822_header (fp, ctx->hdrs[msgno],
+@@ -172,8 +305,7 @@
+
+ ctx->msgcount++;
+ }
+- while ((rc != IMAP_CMD_OK) && ((mfhrc == -1) ||
+- ((msgno + 1) >= fetchlast)));
++ while (mfhrc == -1);
+
+ if ((mfhrc < -1) || ((rc != IMAP_CMD_CONTINUE) && (rc != IMAP_CMD_OK)))
+ {
+@@ -186,11 +318,9 @@
+ /* in case we get new mail while fetching the headers */
+ if (idata->reopen & IMAP_NEWMAIL_PENDING)
+ {
++ msgbegin = msgno + 1;
+ msgend = idata->newMailCount - 1;
+- while ((msgend) >= ctx->hdrmax)
+- mx_alloc_memory (ctx);
+- idata->reopen &= ~IMAP_NEWMAIL_PENDING;
+- idata->newMailCount = 0;
++ goto restart;
+ }
+ }
+
+@@ -735,6 +865,7 @@
+ IMAP_DATA* idata;
+ long bytes;
+ int rc = -1; /* default now is that string isn't FETCH response*/
++ int fetch_rc;
+
+ idata = (IMAP_DATA*) ctx->data;
+
+@@ -757,9 +888,15 @@
+
+ /* FIXME: current implementation - call msg_parse_fetch - if it returns -2,
+ * read header lines and call it again. Silly. */
+- if (msg_parse_fetch (h, buf) != -2)
++ fetch_rc = msg_parse_fetch(h, buf);
++ if (fetch_rc == 0)
++ return 0;
++ else if (fetch_rc != -2)
+ return rc;
+-
++
++ if (!fp)
++ return -2;
++
+ if (imap_get_literal_count (buf, &bytes) < 0)
+ return rc;
+ imap_read_literal (fp, idata, bytes);
+diff -ru old/init.h work/mutt-1.5.5.1/init.h
+--- old/init.h Wed Nov 5 10:41:32 2003
++++ init.h Fri Nov 28 18:30:37 2003
+@@ -856,6 +856,11 @@
+ ** .pp
+ ** This variable defaults to your user name on the local machine.
+ */
++ { "imap_headercache", DT_STR, R_NONE, UL &ImapHeadercache, UL 0 },
++ /*
++ ** .pp
++ ** The location of the IMAP headercache directory.
++ */
+ #endif
+ { "implicit_autoview", DT_BOOL,R_NONE, OPTIMPLICITAUTOVIEW, 0},
+ /*
+diff -ruN old/imap/imap_headercache.c work/mutt-1.5.5.1/imap/imap_headercache.c
+--- old/imap/imap_headercache.c Thu Jan 1 01:00:00 1970
++++ imap/imap_headercache.c Fri Nov 28 18:30:55 2003
+@@ -0,0 +1,330 @@
++/*
++ * Copyright (C) 2002 Tudor Bosman <tudorb-mutt@dwyn.net>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
++ */
++
++#include "mutt.h"
++#include "imap.h"
++#include "imap_private.h"
++#include "imap_headercache.h"
++#include "mx.h"
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <errno.h>
++#include <unistd.h>
++#include <dirent.h>
++#include <assert.h>
++
++/* Delete all messages from headercache */
++static int imap_headercache_purge(IMAP_HEADERCACHE *hc)
++{
++ int rc = -1;
++ DIR *dir;
++ struct dirent *ent;
++
++ dir = opendir(hc->name);
++ if (!dir)
++ {
++ mutt_error(_("IMAP headercache: can't purge directory %s: %s"), hc->name,
++ strerror(errno));
++ mutt_sleep(2);
++ return -1;
++ }
++
++ while ((ent = readdir(dir)) != NULL)
++ {
++ if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, ".."))
++ continue;
++
++ sprintf(hc->tmpname, "%s/%s", hc->name, ent->d_name);
++ if (unlink(hc->tmpname) == -1)
++ {
++ mutt_error(_("IMAP headercache: can't unlink file %s: %s"), hc->tmpname,
++ strerror(errno));
++ mutt_sleep(2);
++ goto bail;
++ }
++ }
++
++ rc = 0;
++
++bail:
++ closedir(dir);
++
++ return rc;
++}
++
++/* Open headercache */
++IMAP_HEADERCACHE *imap_headercache_open(IMAP_DATA *idata)
++{
++ IMAP_HEADERCACHE *hc;
++ char hcdir[_POSIX_PATH_MAX + 1];
++ FILE *f;
++ size_t len;
++ char *p;
++
++ if (!ImapHeadercache || ImapHeadercache[0] == '\0')
++ return NULL;
++
++ strfcpy(hcdir, ImapHeadercache, _POSIX_PATH_MAX);
++ mutt_expand_path(hcdir, _POSIX_PATH_MAX);
++
++ hc = safe_malloc(sizeof(IMAP_HEADERCACHE));
++
++ len = strlen(hcdir) + strlen(idata->conn->account.host) +
++ strlen(idata->mailbox) + 5;
++
++ hc->name = safe_malloc(len);
++ hc->tmpname = safe_malloc(len + NAME_MAX + 2);
++
++ sprintf(hc->name, "%s/%s", hcdir, idata->conn->account.host);
++
++ if (mkdir(hcdir, 0777) == -1 && errno != EEXIST)
++ {
++ mutt_error(_("Can't create IMAP headercache root directory %s: %s"),
++ hcdir, strerror(errno));
++ mutt_sleep(2);
++ goto bail;
++ }
++
++ if (mkdir(hc->name, 0700) == -1 && errno != EEXIST)
++ {
++ mutt_error(_("Can't create IMAP headercache server directory %s: %s"),
++ hc->name, strerror(errno));
++ mutt_sleep(2);
++ goto bail;
++ }
++
++ p = idata->mailbox;
++ while ((p = strchr(p, '/')) != NULL)
++ {
++ *p = '\0';
++ sprintf(hc->name, "%s/%s/%s", hcdir,
++ idata->conn->account.host, idata->mailbox);
++
++ if (mkdir(hc->name, 0700) == -1 && errno != EEXIST)
++ {
++ mutt_error(_("Can't create IMAP headercache mailbox directory %s: %s"),
++ hc->name, strerror(errno));
++ mutt_sleep(2);
++ goto bail;
++ }
++
++ *p = '/';
++ p++;
++ }
++
++ sprintf(hc->name, "%s/%s/%s", hcdir,
++ idata->conn->account.host, idata->mailbox);
++
++ if (mkdir(hc->name, 0700) == -1 && errno != EEXIST)
++ {
++ mutt_error(_("Can't create IMAP headercache mailbox directory %s: %s"),
++ hc->name, strerror(errno));
++ mutt_sleep(2);
++ goto bail;
++ }
++
++ sprintf(hc->tmpname, "%s/uidvalidity", hc->name);
++ f = fopen(hc->tmpname, "r");
++
++ if (f)
++ {
++ fscanf(f, "%u", &hc->uidvalidity);
++ if (idata->uidvalidity != hc->uidvalidity)
++ {
++ fclose(f);
++ f = NULL;
++ }
++ }
++
++ if (!f)
++ {
++ if (imap_headercache_purge(hc) == -1)
++ goto bail;
++
++ sprintf(hc->tmpname, "%s/uidvalidity", hc->name);
++ f = fopen(hc->tmpname, "w");
++ if (!f)
++ {
++ mutt_error(_("Can't create IMAP headercache uidvalidity file %s: %s"),
++ hc->tmpname, strerror(errno));
++ mutt_sleep(2);
++ goto bail;
++ }
++
++ hc->uidvalidity = idata->uidvalidity;
++
++ fprintf(f, "%u\n", hc->uidvalidity);
++ fclose(f);
++ }
++
++ return hc;
++
++bail:
++ safe_free((void **)&hc->tmpname);
++ safe_free((void **)&hc->name);
++ safe_free((void **)&hc);
++
++ return NULL;
++}
++
++/* Close headercache */
++void imap_headercache_close(IMAP_HEADERCACHE *hc)
++{
++ safe_free((void **)&hc->tmpname);
++ safe_free((void **)&hc->name);
++ safe_free((void **)&hc);
++}
++
++static void imap_headercache_writehdr(FILE *f, IMAP_HEADER *h)
++{
++ /* Write the stuff in the header. This must have a fixed length, as it is
++ * overwritten in case of imap_headercache_update
++ */
++ fprintf(f, "%1x %1x %1x %1x %1x %1x %8x %16lx %16lx %8x\n",
++ h->read, h->old, h->deleted, h->flagged, h->replied, h->changed,
++ h->sid, h->received, h->content_length, HEADER_DATA(h)->uid);
++}
++
++/* Add message to headercache */
++int imap_headercache_add(IMAP_HEADERCACHE *hc, IMAP_HEADER *h, FILE *from,
++ size_t hdrsz)
++{
++ FILE *f;
++#define BUFSIZE 4096
++ char buf[BUFSIZE];
++ size_t sz;
++ int rc = -1;
++
++ sprintf(hc->tmpname, "%s/%u", hc->name, HEADER_DATA(h)->uid);
++
++ f = fopen(hc->tmpname, "w");
++ if (!f)
++ {
++ mutt_error(_("Can't create IMAP headercache message file %s: %s"),
++ hc->tmpname, strerror(errno));
++ mutt_sleep(2);
++ goto bail;
++ }
++
++ imap_headercache_writehdr(f, h);
++
++ while ((sz = fread(buf, 1, (hdrsz < BUFSIZE ? hdrsz : BUFSIZE), from)) != 0)
++ {
++ hdrsz -= sz;
++ fwrite(buf, 1, sz, f);
++ }
++
++ fclose(f);
++
++ rc = 0;
++
++bail:
++ return rc;
++}
++
++/* Update flags in headercache message */
++int imap_headercache_update(IMAP_HEADERCACHE *hc, IMAP_HEADER *h)
++{
++ FILE *f;
++ int rc = -1;
++
++ sprintf(hc->tmpname, "%s/%u", hc->name, HEADER_DATA(h)->uid);
++
++ f = fopen(hc->tmpname, "r+");
++ if (!f)
++ goto bail;
++
++ imap_headercache_writehdr(f, h);
++
++ fclose(f);
++
++ rc = 0;
++
++bail:
++ return rc;
++}
++
++/* Delete message from headercache */
++int imap_headercache_delete(IMAP_HEADERCACHE *hc, IMAP_HEADER *h)
++{
++ int rc = -1;
++
++ sprintf(hc->tmpname, "%s/%u", hc->name, HEADER_DATA(h)->uid);
++
++ if (unlink(hc->tmpname) == -1)
++ {
++ mutt_error(_("Can't delete IMAP headercache message %s: %s"),
++ hc->tmpname, strerror(errno));
++ mutt_sleep(2);
++ goto bail;
++ }
++
++ rc = 0;
++
++bail:
++ return rc;
++}
++
++/* Find message in headercache */
++FILE *imap_headercache_find(IMAP_HEADERCACHE *hc, IMAP_HEADER *h)
++{
++ FILE *f = NULL;
++ unsigned int flag_read, flag_old, flag_deleted, flag_flagged, flag_replied;
++ unsigned int flag_changed;
++ unsigned int uid;
++ unsigned long received;
++ unsigned long content_length;
++
++ sprintf(hc->tmpname, "%s/%u", hc->name, HEADER_DATA(h)->uid);
++
++ f = fopen(hc->tmpname, "r");
++ if (!f)
++ goto bail;
++
++ fscanf(f, "%x %x %x %x %x %x %x %lx %lx %x\n",
++ &flag_read, &flag_old, &flag_deleted, &flag_flagged, &flag_replied,
++ &flag_changed, &h->sid, &received, &content_length, &uid);
++
++ if (uid != HEADER_DATA(h)->uid)
++ {
++ fclose(f);
++ f = NULL;
++ goto bail;
++ }
++
++ h->received = received;
++ h->read = flag_read;
++ h->old = flag_old;
++ h->deleted = flag_deleted;
++ h->flagged = flag_flagged;
++ h->replied = flag_replied;
++ h->changed = flag_changed;
++ h->content_length = (long)content_length;
++
++bail:
++ return f;
++}
++
++/* Close file returned by imap_headercache_find */
++void imap_headercache_done(IMAP_HEADERCACHE *hc, FILE *f)
++{
++ fclose(f);
++}
++
+diff -ruN old/imap/imap_headercache.h work/mutt-1.5.5.1/imap/imap_headercache.h
+--- old/imap/imap_headercache.h Thu Jan 1 01:00:00 1970
++++ imap/imap_headercache.h Fri Nov 28 18:30:55 2003
+@@ -0,0 +1,47 @@
++/*
++ * Copyright (C) 2002 Tudor Bosman <tudorb-mutt@dwyn.net>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
++ */
++
++#ifndef _IMAP_HEADERCACHE_H
++#define _IMAP_HEADERCACHE_H
++#include "imap_private.h"
++#include "message.h"
++
++typedef struct IMAP_HEADERCACHE
++{
++ char *name;
++ char *tmpname;
++ unsigned int uidvalidity;
++ int exists;
++} IMAP_HEADERCACHE;
++
++struct IMAP_DATA;
++
++IMAP_HEADERCACHE *imap_headercache_open(struct IMAP_DATA *idata);
++
++void imap_headercache_close(IMAP_HEADERCACHE *hc);
++
++int imap_headercache_add(IMAP_HEADERCACHE *hc, IMAP_HEADER *h, FILE *from,
++ size_t hdrsz);
++int imap_headercache_update(IMAP_HEADERCACHE *hc, IMAP_HEADER *h);
++int imap_headercache_delete(IMAP_HEADERCACHE *hc, IMAP_HEADER *h);
++
++FILE *imap_headercache_find(IMAP_HEADERCACHE *hc, IMAP_HEADER *h);
++void imap_headercache_done(IMAP_HEADERCACHE *hc, FILE *f);
++
++#endif
++
diff --git a/mail/mutt-devel/files/extra-patch-pgp-dw b/mail/mutt-devel/files/extra-patch-pgp-dw
index c6fb104..9e40c82 100644
--- a/mail/mutt-devel/files/extra-patch-pgp-dw
+++ b/mail/mutt-devel/files/extra-patch-pgp-dw
@@ -1,767 +1,220 @@
http://www.woolridge.ca/mutt/patches/p0-patch-1.5.x.dw.pgp-menu-traditional.2
---- PATCHES Dec 2002 17:44:54 -0000 3.6
-+++ PATCHES Oct 2003 15:05:24 -0000
-@@ -0,0 +1 @@
-+patch-1.5.x.dw.pgp-menu-traditional.2
---- compose.c.orig Thu Nov 6 08:28:10 2003
-+++ compose.c Thu Nov 6 08:32:17 2003
-@@ -131,6 +131,13 @@
- addstr (_("Sign"));
- else
- addstr (_("Clear"));
-+
-+ if ((WithCrypto & APPLICATION_PGP))
-+ if ((msg->security & (ENCRYPT | SIGN)))
-+ if ((msg->security & INLINE))
-+ addstr (_(" (inline)"));
-+ else
-+ addstr (_(" (PGP/MIME)"));
- clrtoeol ();
-
- move (HDR_CRYPTINFO, 0);
-@@ -156,21 +163,25 @@
-
- static int pgp_send_menu (HEADER *msg, int *redraw)
+--- PATCHES.old Tue Apr 15 15:18:34 2003
++++ PATCHES Fri Dec 19 15:00:56 2003
+@@ -0,0 +1,3 @@
++patch-1.5.5.dw.multiple-crypt-hook.2
++patch-1.5.5.dw.crypt-autoselectkey.1
++patch-1.5.5.dw.confirm-crypt-hook.1
+--- doc/manual.sgml.head.old Wed Nov 5 10:41:34 2003
++++ doc/manual.sgml.head Fri Dec 19 15:00:56 2003
+@@ -1421,7 +1421,9 @@
+ or because, for some reasons, you need to override the key Mutt would
+ normally use. The crypt-hook command provides a method by which you can
+ specify the ID of the public key to be used when encrypting messages to
+-a certain recipient.
++a certain recipient. You may use multiple pgp-hook's with the same
++pattern; multiple matching pgp-hook's result in the use of multiple
++keyids for recipient.
+
+ The meaning of "key id" is to be taken broadly in this context: You
+ can either put a numerical key ID here, an e-mail address, or even
+--- doc/muttrc.man.head.orig Fri Dec 19 15:14:55 2003
++++ doc/muttrc.man.head Fri Dec 19 15:19:05 2003
+@@ -290 +290,4 @@
+-or even just an arbitrary search string.
++or even just an arbitrary search string. You may use multiple
++\fBpgp-hook\fPs with the same \fIpattern\fP; multiple matching
++\fBpgp-hook\fPs result in the use of multiple \fIkey-id\fPs for
++recipient.
+--- hook.c Tue Jan 21 13:25:21 2003
++++ hook.c Fri Dec 19 15:00:56 2003
+@@ -117,7 +117,11 @@
+ ptr->rx.not == not &&
+ !mutt_strcmp (pattern.data, ptr->rx.pattern))
+ {
++#ifdef M_CRYPTHOOK
++ if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_REPLYHOOK | M_CRYPTHOOK))
++#else
+ if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_REPLYHOOK))
++#endif
+ {
+ /* these hooks allow multiple commands with the same
+ * pattern, so if we've already seen this pattern/command pair, just
+@@ -443,9 +447,25 @@
+ return _mutt_string_hook (chs, M_ICONVHOOK);
+ }
+
+-char *mutt_crypt_hook (ADDRESS *adr)
++LIST *mutt_crypt_hook (ADDRESS *adr)
{
-+ int use_autoinline = 0;
- pgp_key_t p;
- char input_signas[SHORT_STRING];
-
- if (!(WithCrypto & APPLICATION_PGP))
- return msg->security;
-
-- switch (mutt_multi_choice (_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "),
-- N_("esabf")))
-+ if (! (msg->security & (SIGN | ENCRYPT)))
-+ use_autoinline = 1;
+- return _mutt_string_hook (adr->mailbox, M_CRYPTHOOK);
++ HOOK *hook;
++ LIST *key_list = NULL;
+
-+ switch (mutt_multi_choice (_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "),
-+ _("esabif")))
- {
- case 1: /* (e)ncrypt */
-- msg->security |= ENCRYPT;
-+ msg->security ^= ENCRYPT;
- break;
-
- case 2: /* (s)ign */
-- msg->security |= SIGN;
-+ msg->security ^= SIGN;
- break;
-
- case 3: /* sign (a)s */
-@@ -197,18 +208,38 @@
- break;
-
- case 4: /* (b)oth */
-- msg->security = ENCRYPT | SIGN;
-+ if ((msg->security & (ENCRYPT | SIGN)) == (ENCRYPT | SIGN))
-+ msg->security = 0;
-+ else
-+ msg->security |= (ENCRYPT | SIGN);
-+ break;
++ if (!adr && !adr->mailbox)
++ return (NULL);
+
-+ case 5: /* (i)nline */
-+ if ((msg->security & (ENCRYPT | SIGN)))
-+ msg->security ^= INLINE;
-+ else
-+ msg->security &= ~INLINE;
- break;
-
-- case 5: /* (f)orget it */
-+ case 6: /* (f)orget it */
- msg->security = 0;
- break;
- }
-
-- if (msg->security && msg->security != APPLICATION_PGP)
-- msg->security |= APPLICATION_PGP;
-- else
-- msg->security = 0;
-+ if (msg->security)
++ for (hook = Hooks; hook; hook = hook->next)
+ {
-+ if (! (msg->security & (ENCRYPT | SIGN)))
-+ {
-+ msg->security = 0;
-+ }
-+ else
-+ {
-+ msg->security |= APPLICATION_PGP;
++ if (!hook->command)
++ continue;
++ if (!(hook->type & M_CRYPTHOOK))
++ continue;
+
-+ if (use_autoinline && option (OPTPGPAUTOINLINE))
-+ msg->security |= INLINE;
-+ }
++ if ((regexec (hook->rx.rx, adr->mailbox, 0, NULL, 0) == 0) ^ hook->rx.not)
++ key_list = mutt_add_list (key_list, hook->command);
+ }
-
- if(*redraw)
- redraw_crypt_lines (msg);
---- crypt.c Sep 2003 13:03:25 -0000 3.19
-+++ crypt.c Oct 2003 15:05:24 -0000
-@@ -161,3 +161,3 @@ int crypt_valid_passphrase(int flags)
-
--int mutt_protect (HEADER *msg, HEADER *cur, char *keylist)
-+int mutt_protect (HEADER *msg, char *keylist)
- {
-@@ -166,3 +166,2 @@ int mutt_protect (HEADER *msg, HEADER *c
- BODY *tmp_pgp_pbody = NULL;
-- int traditional = 0;
- int flags = (WithCrypto & APPLICATION_PGP)? msg->security: 0;
-@@ -176,29 +175,9 @@ int mutt_protect (HEADER *msg, HEADER *c
-
-- if ((WithCrypto & APPLICATION_PGP) && (msg->security & APPLICATION_PGP))
-+ if ((WithCrypto & APPLICATION_PGP) && ((msg->security & PGPINLINE) == PGPINLINE))
- {
-- if ((msg->content->type == TYPETEXT) &&
-- !ascii_strcasecmp (msg->content->subtype, "plain"))
-- {
-- if (cur && cur->security && option (OPTPGPAUTOTRAD)
-- && (option (OPTCRYPTREPLYENCRYPT)
-- || option (OPTCRYPTREPLYSIGN)
-- || option (OPTCRYPTREPLYSIGNENCRYPTED)))
-- {
-- if(mutt_is_application_pgp(cur->content))
-- traditional = 1;
-- }
-- else
-- {
-- if ((i = query_quadoption (OPT_PGPTRADITIONAL, _("Create a traditional (inline) PGP message?"))) == -1)
-- return -1;
-- else if (i == M_YES)
-- traditional = 1;
-- }
-- }
-- if (traditional)
-+ /* they really want to send it inline... go for it */
-+ if (!isendwin ()) mutt_endwin _("Invoking PGP...");
-+ pbody = crypt_pgp_traditional_encryptsign (msg->content, flags, keylist);
-+ if (pbody)
- {
-- if (!isendwin ()) mutt_endwin _("Invoking PGP...");
-- if (!(pbody = crypt_pgp_traditional_encryptsign (msg->content, flags, keylist)))
-- return -1;
--
- msg->content = pbody;
-@@ -206,2 +185,8 @@ int mutt_protect (HEADER *msg, HEADER *c
- }
-+
-+ /* otherwise inline won't work...ask for revert */
-+ if ((i = query_quadoption (OPT_PGPMIMEASK, _("Message can't be sent inline. Revert to using PGP/MIME?"))) != M_YES)
-+ return -1;
-+
-+ /* go ahead with PGP/MIME */
- }
-@@ -391,2 +376,5 @@ int mutt_is_application_pgp (BODY *m)
- }
-+ if (t)
-+ t |= PGPINLINE;
-+
- return t;
---- init.h Sep 2003 15:10:09 -0000 3.40
-+++ init.h Oct 2003 15:05:25 -0000
-@@ -1380,2 +1380,44 @@ struct option_t MuttVars[] = {
++ return (key_list);
+ }
+
+ #ifdef USE_SOCKET
+--- init.h Wed Nov 5 10:41:32 2003
++++ init.h Fri Dec 19 15:00:46 2003
+@@ -1209,6 +1209,16 @@
+ ** when you are at the end of a message and invoke the \fInext-page\fP
+ ** function.
*/
-+ { "pgp_create_traditional", DT_SYN, R_NONE, UL "pgp_autoinline", 0 },
-+ { "pgp_autoinline", DT_BOOL, R_NONE, OPTPGPAUTOINLINE, 0 },
++
++
++ { "pgp_autoselectkey", DT_SYN, R_NONE, UL "crypt_autoselectkey", 0 },
++ { "crypt_autoselectkey", DT_BOOL, R_NONE, OPTCRYPTAUTOSELECT, 0 },
+ /*
+ ** .pp
-+ ** This option controls whether Mutt generates old-style inline
-+ ** (traditional) PGP encrypted or signed messages under certain
-+ ** circumstances. This can be overridden by use of the \fIpgp-menu\fP,
-+ ** when inline is not required.
-+ ** .pp
-+ ** Note that Mutt might automatically use PGP/MIME for messages
-+ ** which consist of more than a single MIME part. Mutt can be
-+ ** configured to ask before sending PGP/MIME messages when inline
-+ ** (traditional) would not work.
-+ ** See also: ``$$pgp_mime_ask''.
-+ ** .pp
-+ ** Also note that using the old-style PGP message format is \fBstrongly\fP
-+ ** \fBdeprecated\fP.
-+ ** (PGP only)
++ ** If set, then a list of keys is not presented for selection when only
++ ** one matching key is available. This may be useful in conjunction with
++ ** the \fIcrypt-hook\fP command.
++ */
+ { "pgp_autosign", DT_SYN, R_NONE, UL "crypt_autosign", 0 },
+ { "crypt_autosign", DT_BOOL, R_NONE, OPTCRYPTAUTOSIGN, 0 },
+ /*
+@@ -1233,6 +1243,15 @@
+ ** then OpenSSL is used instead to create S/MIME messages and
+ ** settings can be overridden by use of the \fIsmime-menu\fP.
+ ** (Crypto only)
+ */
-+ { "pgp_auto_traditional", DT_SYN, R_NONE, UL "pgp_replyinline", 0 },
-+ { "pgp_replyinline", DT_BOOL, R_NONE, OPTPGPREPLYINLINE, 0 },
++ { "pgp_confirmhook", DT_SYN, R_NONE, UL "crypt_confirmhook", 1 },
++ { "crypt_confirmhook", DT_BOOL, R_NONE, OPTCRYPTCONFIRMHOOK, 1 },
+ /*
+ ** .pp
-+ ** Setting this variable will cause Mutt to always attempt to
-+ ** create an inline (traditional) message when replying to a
-+ ** message which is PGP encrypted/signed inline. This can be
-+ ** overridden by use of the \fIpgp-menu\fP, when inline is not
-+ ** required. This option does not automatically detect if the
-+ ** (replied-to) message is inline; instead it relies on Mutt
-+ ** internals for previously checked/flagged messages.
-+ ** .pp
-+ ** Note that Mutt might automatically use PGP/MIME for messages
-+ ** which consist of more than a single MIME part. Mutt can be
-+ ** configured to ask before sending PGP/MIME messages when inline
-+ ** (traditional) would not work.
-+ ** See also: ``$$pgp_mime_ask''.
-+ ** .pp
-+ ** Also note that using the old-style PGP message format is \fBstrongly\fP
-+ ** \fBdeprecated\fP.
-+ ** (PGP only)
-+ **
-+ */
- { "pgp_show_unusable", DT_BOOL, R_NONE, OPTPGPSHOWUNUSABLE, 1 },
-@@ -1429,11 +1471,8 @@ struct option_t MuttVars[] = {
++ ** If set, then you will be prompted for confirmation of keys when using
++ ** the \fIcrypt-hook\fP command. If unset, no such confirmation prompt will
++ ** be presented. This is generally considered unsafe, especially where
++ ** typos are concerned.
*/
-- { "pgp_create_traditional", DT_QUAD, R_NONE, OPT_PGPTRADITIONAL, M_NO },
-+ { "pgp_mime_ask", DT_QUAD, R_NONE, OPT_PGPMIMEASK, M_NO },
+ { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPTPGPIGNORESUB, 1},
/*
- ** .pp
-- ** This option controls whether Mutt generates old-style inline PGP
-- ** encrypted or signed messages.
-- ** .pp
-- ** Note that PGP/MIME will be used automatically for messages which have
-- ** a character set different from us-ascii, or which consist of more than
-- ** a single MIME part.
-+ ** This option controls whether Mutt will prompt you for
-+ ** automatically sending a (signed/encrypted) message using
-+ ** PGP/MIME when inline (traditional) fails (for any reason).
- ** .pp
-@@ -1441,19 +1480,2 @@ struct option_t MuttVars[] = {
- ** \fBdeprecated\fP.
-- ** (PGP only)
-- */
-- { "pgp_auto_traditional", DT_BOOL, R_NONE, OPTPGPAUTOTRAD, 0 },
-- /*
-- ** .pp
-- ** This option causes Mutt to generate an old-style inline PGP
-- ** encrypted or signed message when replying to an old-style
-- ** message, and a PGP/MIME message when replying to a PGP/MIME
-- ** message. Note that this option is only meaningful when using
-- ** ``$$crypt_replyencrypt'', ``$$crypt_replysign'', or
-- ** ``$$crypt_replysignencrypted''.
-- ** .pp
-- ** Also note that PGP/MIME will be used automatically for messages
-- ** which have a character set different from us-ascii, or which
-- ** consist of more than a single MIME part.
-- ** .pp
-- ** This option overrides ``$$pgp_create_traditional''
- ** (PGP only)
---- mutt.h Oct 2003 20:34:59 -0000 3.21
-+++ mutt.h Oct 2003 15:05:25 -0000
-@@ -276,2 +276,3 @@ enum
- OPT_MOVE,
-+ OPT_PGPMIMEASK, /* ask to revert to PGP/MIME when inline fails */
- OPT_PGPTRADITIONAL, /* create old-style PGP messages */
-@@ -443,3 +444,2 @@ enum
+--- mutt.h Wed Nov 5 10:41:32 2003
++++ mutt.h Fri Dec 19 15:00:46 2003
+@@ -427,6 +427,7 @@
+
+ /* PGP options */
+
++ OPTCRYPTAUTOSELECT,
+ OPTCRYPTAUTOSIGN,
+ OPTCRYPTAUTOENCRYPT,
+ OPTCRYPTAUTOPGP,
+@@ -438,6 +439,7 @@
+ OPTSMIMEISDEFAULT,
+ OPTASKCERTLABEL,
+ OPTSDEFAULTDECRYPTKEY,
++ OPTCRYPTCONFIRMHOOK,
+ OPTPGPIGNORESUB,
+ OPTPGPCHECKEXIT,
OPTPGPLONGIDS,
-- OPTPGPAUTOTRAD,
- #if 0
-@@ -451,2 +451,4 @@ enum
- OPTPGPSHOWUNUSABLE,
-+ OPTPGPAUTOINLINE,
-+ OPTPGPREPLYINLINE,
+--- pgp.c Wed Nov 5 10:41:33 2003
++++ pgp.c Fri Dec 19 15:00:56 2003
+@@ -1016,6 +1016,8 @@
+ char *keyID, *keylist = NULL, *t;
+ size_t keylist_size = 0;
+ size_t keylist_used = 0;
++ LIST *hook_list = NULL;
++ LIST *hook = NULL;
+ ADDRESS *tmp = NULL, *addr = NULL;
+ ADDRESS **last = &tmp;
+ ADDRESS *p, *q;
+@@ -1055,7 +1057,7 @@
+ {
+ int r;
+ snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox);
+- if ((r = mutt_yesorno (buf, M_YES)) == M_YES)
++ if (!option(OPTCRYPTCONFIRMHOOK) || (r = mutt_yesorno (buf, M_YES)) == M_YES)
+ {
+ if (is_numerical_keyid (keyID))
+ {
+--- pgpkey.c Wed Nov 5 10:41:33 2003
++++ pgpkey.c Fri Dec 19 15:00:46 2003
+@@ -435,8 +435,13 @@
+ return rv;
+ }
-@@ -632,4 +634,4 @@ typedef struct header
++
++#define pgp_trusted_id(uid) (!option(OPTPGPCHECKTRUST) \
++ || (pgp_id_is_valid((uid)) \
++ && pgp_id_is_strong((uid))))
++
+ static pgp_key_t pgp_select_key (pgp_key_t keys,
+- ADDRESS * p, const char *s)
++ ADDRESS * p, const char *s)
{
-- unsigned int security : 7; /* bit 0-4: flags, bit 5,6: application.
-- see: crypt.h pgplib.h, smime.h */
-+ unsigned int security : 9; /* bit 0-6: flags, bit 7,8: application.
-+ see: mutt_crypt.h */
-
---- mutt_crypt.h Jan 2003 23:54:30 -0000 3.4
-+++ mutt_crypt.h Oct 2003 15:05:25 -0000
-@@ -35,7 +35,9 @@
- #define GOODSIGN (1 << 2)
--#define BADSIGN (1 << 3) /* FIXME: value also used below for PGPKEY */
-+#define BADSIGN (1 << 3)
- #define SIGNOPAQUE (1 << 4)
-+#define KEYBLOCK (1 << 5) /* KEY too generic? */
-+#define INLINE (1 << 6)
-
--#define APPLICATION_PGP (1 << 5)
--#define APPLICATION_SMIME (1 << 6)
-+#define APPLICATION_PGP (1 << 7)
-+#define APPLICATION_SMIME (1 << 8)
-
-@@ -44,3 +46,4 @@
- #define PGPGOODSIGN (APPLICATION_PGP | GOODSIGN)
--#define PGPKEY (APPLICATION_PGP | (1 << 3))
-+#define PGPKEY (APPLICATION_PGP | KEYBLOCK)
-+#define PGPINLINE (APPLICATION_PGP | INLINE)
-
-@@ -103,3 +106,3 @@ typedef struct pgp_keyinfo *pgp_key_t;
-
--int mutt_protect (HEADER *, HEADER *, char *);
-+int mutt_protect (HEADER *, char *);
-
---- postpone.c Sep 2003 17:22:09 -0000 3.9
-+++ postpone.c Oct 2003 15:05:25 -0000
-@@ -486,2 +486,7 @@ int mutt_parse_crypt_hdr (char *p, int s
+ int keymax;
+ pgp_uid_t **KeyTable;
+@@ -450,6 +455,7 @@
+ pgp_uid_t *a;
+ int (*f) (const void *, const void *);
+
++ int keymatch = 0; /* count matching keys */
+ int unusable = 0;
+
+ keymax = 0;
+@@ -479,6 +485,7 @@
+
+ KeyTable[i++] = a;
+ }
++ keymatch++;
+ }
-+ case 'i':
-+ case 'I':
-+ pgp |= INLINE;
-+ break;
-+
- default:
---- send.c Sep 2003 12:56:49 -0000 3.26
-+++ send.c Oct 2003 15:05:25 -0000
-@@ -1256,3 +1256,10 @@ ci_send_message (int flags, /* send mod
- msg->security |= SIGN;
-- }
-+ if (WithCrypto & APPLICATION_PGP && (msg->security & (ENCRYPT | SIGN)))
+ if (!i && unusable)
+@@ -487,6 +494,21 @@
+ mutt_sleep (1);
+ return NULL;
+ }
++ else if (keymatch == 1 && option(OPTCRYPTAUTOSELECT))
++ {
++ /*
++ * Only one matching key...see if there's an id with enough trust to auto-select
++ */
++ kp = KeyTable[0]->parent;
++ for (a = kp->address; a; a = a->next)
++ {
++ if (pgp_trusted_id(a))
+ {
-+ if (option (OPTPGPAUTOINLINE))
-+ msg->security |= INLINE;
-+ if (option (OPTPGPREPLYINLINE) && cur && (cur->security & INLINE))
-+ msg->security |= INLINE;
++ safe_free ((void **) &KeyTable);
++ return (kp);
+ }
+ }
++ }
-@@ -1494,3 +1501,3 @@ main_loop:
- if ((crypt_get_keys (msg, &pgpkeylist) == -1) ||
-- mutt_protect (msg, cur, pgpkeylist) == -1)
-+ mutt_protect (msg, pgpkeylist) == -1)
+ switch (PgpSortKeys & SORT_MASK)
+ {
+@@ -597,9 +619,7 @@
+ break;
+ }
+
+- if (option (OPTPGPCHECKTRUST) &&
+- (!pgp_id_is_valid (KeyTable[menu->current])
+- || !pgp_id_is_strong (KeyTable[menu->current])))
++ if (!pgp_trusted_id(KeyTable[menu->current]))
{
-@@ -1574,3 +1581,3 @@ main_loop:
-
-- if (mutt_protect (msg, cur, pgpkeylist) == -1)
-+ if (mutt_protect (msg, pgpkeylist) == -1)
- {
---- sendlib.c Sep 2003 13:03:26 -0000 3.24
-+++ sendlib.c Oct 2003 15:05:25 -0000
-@@ -2407,2 +2407,4 @@ int mutt_write_fcc (const char *path, HE
- }
-+ if (hdr->security & INLINE)
-+ fputc ('I', msg->fp);
- fputc ('\n', msg->fp);
---- po/ca.po Apr 2003 11:00:59 -0000 3.10
-+++ po/ca.po Oct 2003 15:05:26 -0000
-@@ -602,10 +602,10 @@ msgstr "Xifra amb: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP: (x)ifra, (s)igna, si(g)na com a, (a)mbds, o en (c)lar? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP: (x)ifra, (s)igna, si(g)na com a, (a)mbds, en (l)nia, o en (c)lar? "
-
- # ivb (2003/03/26)
--# ivb (x)ifra, (s)igna, si(g)na com a, (a)mbds, (c)lar
-+# ivb (x)ifra, (s)igna, si(g)na com a, (a)mbds, en (l)nia, o en (c)lar
- #: compose.c:166
--msgid "esabf"
--msgstr "xsgac"
-+msgid "esabif"
-+msgstr "xsgalc"
-
---- po/cs.po Mar 2003 22:43:06 -0000 3.8
-+++ po/cs.po Oct 2003 15:05:26 -0000
-@@ -687,4 +687,4 @@ msgstr "Zaifrovat"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "()ifrovat, (p)odepsat, podepsat (j)ako, (o)boj, i (n)ic?"
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "()ifrovat, (p)odepsat, podepsat (j)ako, (o)boj, p(m), i (n)ic?"
-
-@@ -692,4 +692,4 @@ msgstr "()ifrovat, (p)odepsat, podepsat
- #: compose.c:166
--msgid "esabf"
--msgstr "pjon"
-+msgid "esabif"
-+msgstr "pjomn"
-
---- po/da.po Mar 2003 22:43:06 -0000 3.8
-+++ po/da.po Oct 2003 15:05:26 -0000
-@@ -577,8 +577,8 @@ msgstr "Kryptr"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "(k)ryptr, (u)nderskriv, underskriv (s)om, (b)egge, (i)ngen PGP"
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "(k)ryptr, (u)nderskriv, underskriv (s)om, (b)egge, i(n)tegreret, (i)ngen PGP"
-
- #: compose.c:166
--msgid "esabf"
--msgstr "kusbi"
-+msgid "esabif"
-+msgstr "kusbni"
-
---- po/de.po Apr 2003 08:31:00 -0000 3.11
-+++ po/de.po Oct 2003 15:05:27 -0000
-@@ -568,8 +568,8 @@ msgstr "Verschlsseln mit: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP (v)erschl., (s)ign., sign. (a)ls, (b)eides, (k)ein PGP? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP (v)erschl., (s)ign., sign. (a)ls, (b)eides, (i)nline, (k)ein PGP? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "vsabk"
-+msgid "esabif"
-+msgstr "vsabik"
-
---- po/el.po Mar 2003 22:43:06 -0000 3.9
-+++ po/el.po Oct 2003 15:05:27 -0000
-@@ -700,4 +700,4 @@ msgstr " : "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (f)orget it? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i), (f)orget it? "
-
-@@ -706,4 +706,4 @@ msgstr "PGP (e)ncrypt, (s)ign, sign (a)s
- #: compose.c:166
--msgid "esabf"
--msgstr "esabf"
-+msgid "esabif"
-+msgstr "esabif"
-
---- po/eo.po May 2003 17:48:28 -0000 3.9
-+++ po/eo.po Oct 2003 15:05:27 -0000
-@@ -570,8 +570,8 @@ msgstr "ifri per: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP (i)fri, (s)ubskribi, subskribi (k)iel, (a)mba, a (f)orgesi? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP (i)fri, (s)ubskribi, subskribi (k)iel, (a)mba, \"i(n)line\", a (f)orgesi? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "iskaf"
-+msgid "esabif"
-+msgstr "iskanf"
-
---- po/es.po Apr 2003 10:18:15 -0000 3.11
-+++ po/es.po Oct 2003 15:05:27 -0000
-@@ -575,4 +575,5 @@ msgstr "Cifrar"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "co(d)ificar, f(i)rmar (c)omo, amb(o)s o ca(n)celar? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "co(d)ificar, f(i)rmar (c)omo, amb(o)s, inc(l)uido, o ca(n)celar? "
-+
-
-@@ -580,4 +581,4 @@ msgstr "co(d)ificar, f(i)rmar (c)omo, a
- #, fuzzy
--msgid "esabf"
--msgstr "dicon"
-+msgid "esabif"
-+msgstr "dicoln"
-
---- po/et.po Mar 2003 22:43:07 -0000 3.10
-+++ po/et.po Oct 2003 15:05:28 -0000
-@@ -570,8 +570,8 @@ msgstr "Krpti kasutades: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP (k)rpti, (a)llkiri, allk. ku(i), (m)lemad vi (u)nusta? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP (k)rpti, (a)llkiri, allk. ku(i), (m)lemad, k(e)hasse, vi (u)nusta? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "kaimu"
-+msgid "esabif"
-+msgstr "kaimeu"
-
---- po/fr.po Apr 2003 08:38:13 -0000 3.19
-+++ po/fr.po Oct 2003 15:05:28 -0000
-@@ -594,8 +594,8 @@ msgstr "Chiffrer avec : "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "(c)hiffrer PGP, (s)igner, (e)n tant que, les (d)eux, ou (o)ublier ? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "(c)hiffrer PGP, (s)igner, (e)n tant que, les (d)eux, en (l)igne, ou (o)ublier ? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "csedo"
-+msgid "esabif"
-+msgstr "csedlo"
-
---- po/gl.po Mar 2003 22:43:07 -0000 3.8
-+++ po/gl.po Oct 2003 15:05:28 -0000
-@@ -579,8 +579,8 @@ msgstr "Encriptar"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "(e)ncriptar, (f)irmar, firmar (c)omo, (a)mbas ou (o)lvidar? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "(e)ncriptar, (f)irmar, firmar (c)omo, (a)mbas, (i)nterior, ou (o)lvidar? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "efcao"
-+msgid "esabif"
-+msgstr "efcaio"
-
---- po/hu.po Aug 2003 11:01:09 -0000 3.9
-+++ po/hu.po Oct 2003 15:05:29 -0000
-@@ -563,8 +563,8 @@ msgstr "Titkosts: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP (t)itkost, (a)lr, alr (m)int, titkost (s) alr, m(g)se? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP (t)itkost, (a)lr, alr (m)int, titkost (s) alr, (b)egyazott, m(g)se? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "tamsg"
-+msgid "esabif"
-+msgstr "tamsbg"
-
---- po/id.po May 2003 17:48:28 -0000 3.10
-+++ po/id.po Oct 2003 15:05:29 -0000
-@@ -571,8 +571,8 @@ msgstr "Enkrip dengan: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP (e)nkrip, (t)andatangan, tandatangan (s)bg, ke(d)uanya, (b)atal? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP (e)nkrip, (t)andatangan, tandatangan (s)bg, ke(d)uanya, (i)nline, (b)atal? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "etsdb"
-+msgid "esabif"
-+msgstr "etsdib"
-
---- po/it.po Mar 2003 22:43:07 -0000 3.8
-+++ po/it.po Oct 2003 15:05:29 -0000
-@@ -581,8 +581,8 @@ msgstr "Crittografa"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "cifra(e), firma(s), firma come(a), entrambi(b), annulla(f) "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "cifra(e), firma(s), firma come(a), entrambi(b), in l(i)nea , annulla(f) "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "esabf"
-+msgid "esabif"
-+msgstr "esabif"
-
---- po/ja.po Sep 2003 17:15:20 -0000 3.17
-+++ po/ja.po Oct 2003 15:05:30 -0000
-@@ -568,8 +568,8 @@ msgstr " Ź沽: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP (e)Ź沽,(s)̾,(a)..Ȥƽ̾,(b)ξ,(f)?"
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP (e)Ź沽,(s)̾,(a)..Ȥƽ̾,(b)ξ,(i)nline,(f)?"
-
- #: compose.c:166
--msgid "esabf"
--msgstr "esabf"
-+msgid "esabif"
-+msgstr "esabif"
-
---- po/ko.po Sep 2003 10:11:49 -0000 3.12
-+++ po/ko.po Oct 2003 15:05:30 -0000
-@@ -569,8 +569,8 @@ msgstr "ȣȭ : "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP ȣȭ(e), (s), (a), (b), (f)? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP ȣȭ(e), (s), (a), (b), (i)nline, (f)? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "esabf"
-+msgid "esabif"
-+msgstr "esabif"
-
---- po/lt.po Mar 2003 22:43:07 -0000 3.8
-+++ po/lt.po Oct 2003 15:05:30 -0000
-@@ -577,5 +577,5 @@ msgstr "Uifruoti"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
- msgstr ""
--"(u)ifruot, pa(s)irayt, pasirayt k(a)ip, a(b)u, rinktis (m)ic algoritm, "
-+"(u)ifruot, pa(s)irayt, pasirayt k(a)ip, a(b)u, (l)aike, "
- "ar (p)amirti?"
-@@ -584,4 +584,4 @@ msgstr ""
- #, fuzzy
--msgid "esabf"
--msgstr "usabmp"
-+msgid "esabif"
-+msgstr "usablp"
-
-@@ -597,4 +597,3 @@ msgid ""
- msgstr ""
--"(u)ifruot, pa(s)irayt, pasirayt k(a)ip, a(b)u, rinktis (m)ic algoritm, "
--"ar (p)amirti?"
-+"(u)ifruot, pa(s)irayt, uifruo(t) su, pasirayt k(a)ip, a(b)u, ar (p)amirti?"
-
-@@ -603,3 +602,3 @@ msgstr ""
- msgid "eswabf"
--msgstr "usabmp"
-+msgstr "ustabp"
-
---- po/nl.po Sep 2003 13:09:59 -0000 3.12
-+++ po/nl.po Oct 2003 15:05:31 -0000
-@@ -565,8 +565,8 @@ msgstr "Versleutelen met: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP (v)ersleutel, (o)ndertekenen, ondert. (a)ls, (b)eide, (g)een? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP (v)ersleutel, (o)ndertekenen, ondert. (a)ls, (b)eide, ber(i)cht, (g)een? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "voabg"
-+msgid "esabif"
-+msgstr "voabig"
-
---- po/pl.po Sep 2003 17:20:56 -0000 3.13
-+++ po/pl.po Oct 2003 15:05:31 -0000
-@@ -566,8 +566,8 @@ msgstr "Zaszyfruj uywajc: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP: (z)aszyfruj, podpi(s)z, podpisz j(a)ko, o(b)a, b(e)z PGP? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP: (z)aszyfruj, podpi(s)z, podpisz j(a)ko, o(b)a, (i)nline, b(e)z PGP? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "zsabe"
-+msgid "esabif"
-+msgstr "zsabie"
-
---- po/pt_BR.po Mar 2003 22:43:08 -0000 3.9
-+++ po/pt_BR.po Oct 2003 15:05:31 -0000
-@@ -580,5 +580,5 @@ msgstr "Encriptar"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
- msgstr ""
--"(e)ncripa, a(s)sina, assina (c)omo, (a)mbos, escolhe (m)ic, ou es(q)uece? "
-+"(e)ncripa, a(s)sina, assina (c)omo, (a)mbos, em l(i)nha, ou es(q)uece? "
-
-@@ -586,4 +586,4 @@ msgstr ""
- #, fuzzy
--msgid "esabf"
--msgstr "escamq"
-+msgid "esabif"
-+msgstr "escaiq"
-
-@@ -599,3 +599,3 @@ msgid ""
- msgstr ""
--"(e)ncripa, a(s)sina, assina (c)omo, (a)mbos, escolhe (m)ic, ou es(q)uece? "
-+"(e)ncripa, a(s)sina, e(n)cripa com, assina (c)omo, (a)mbos, ou es(q)uece? "
-
-@@ -604,3 +604,3 @@ msgstr ""
- msgid "eswabf"
--msgstr "escamq"
-+msgstr "esncaq"
-
---- po/ru.po Apr 2003 08:21:09 -0000 3.14
-+++ po/ru.po Oct 2003 15:05:32 -0000
-@@ -576,8 +576,8 @@ msgstr ": "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP (e), (s), (a) , (b), (f)? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP (e), (s), (a) , (b), (i)nline, (f)? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr "esabf"
-+msgid "esabif"
-+msgstr "esabif"
-
---- po/sk.po Mar 2003 22:43:08 -0000 3.8
-+++ po/sk.po Oct 2003 15:05:32 -0000
-@@ -585,5 +585,5 @@ msgstr "Zaifruj"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
- msgstr ""
--"(e)-ifr, (s)-podp, podp (a)ko, o(b)e, ozna alg. mi(c), alebo (f)-zabudn "
-+"(e)-ifr, (s)-podp, podp (a)ko, o(b)e, (i)nline, alebo (f)-zabudn "
- "na to? "
-@@ -592,4 +592,4 @@ msgstr ""
- #, fuzzy
--msgid "esabf"
--msgstr "esabmf"
-+msgid "esabif"
-+msgstr "esabif"
-
-@@ -605,4 +605,3 @@ msgid ""
- msgstr ""
--"(e)-ifr, (s)-podp, podp (a)ko, o(b)e, ozna alg. mi(c), alebo (f)-zabudn "
--"na to? "
-+"(e)-ifr, (s)-podp, (w)-ifr s, podp (a)ko, o(b)e, alebo (f)-zabudn na to? "
-
-@@ -611,3 +610,3 @@ msgstr ""
- msgid "eswabf"
--msgstr "esabmf"
-+msgstr "eswabf"
-
---- po/sv.po Mar 2003 22:43:08 -0000 3.9
-+++ po/sv.po Oct 2003 15:05:32 -0000
-@@ -567,8 +567,8 @@ msgstr "Kryptera med: "
- #: compose.c:165
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr "PGP: (k)ryptera, (s)ignera, signera s(o)m, (b)da, eller sk(i)ppa det?"
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr "PGP: (k)ryptera, (s)ignera, signera s(o)m, (b)da, i(n)fogat, eller sk(i)ppa det?"
-
- #: compose.c:166
--msgid "esabf"
--msgstr "ksobi"
-+msgid "esabif"
-+msgstr "ksobni"
-
---- po/tr.po Mar 2003 22:43:08 -0000 3.8
-+++ po/tr.po Oct 2003 15:05:33 -0000
-@@ -576,5 +576,5 @@ msgstr "ifrele"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
- msgstr ""
--"(i)frele, i(m)zala, (f)arkl imzala, i(k)isi de, mi(c) algoritmini se "
-+"(i)frele, i(m)zala, (f)arkl imzala, i(k)isi de, (i)nline, "
- "yoksa i(p)talm? "
-@@ -582,4 +582,4 @@ msgstr ""
- #: compose.c:166
--msgid "esabf"
--msgstr "imfkcp"
-+msgid "esabif"
-+msgstr "imfkip"
-
---- po/uk.po Mar 2003 22:43:08 -0000 3.9
-+++ po/uk.po Oct 2003 15:05:33 -0000
-@@ -571,8 +571,8 @@ msgstr ""
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
--msgstr ".(e), Ц.(s), Ц. (a), (b) צͦ(f)? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
-+msgstr ".(e), Ц.(s), Ц. (a), (b), (i)nline צͦ(f)? "
-
- #: compose.c:166
--msgid "esabf"
--msgstr ""
-+msgid "esabif"
-+msgstr "esabif"
-
---- po/zh_CN.po Mar 2003 22:43:08 -0000 3.8
-+++ po/zh_CN.po Oct 2003 15:05:33 -0000
-@@ -584,5 +584,5 @@ msgstr ""
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
- msgstr ""
--"(e), (s)ǩ, (a)ñǩ, (b)߽Ҫ, ѡ (m)ic 㷨 (f)"
-+"(e), (s)ǩ, (a)ñǩ, (b)߽Ҫ, (i)nline, (f)"
- ""
-@@ -590,4 +590,4 @@ msgstr ""
- #: compose.c:166
--msgid "esabf"
--msgstr ""
-+msgid "esabif"
-+msgstr "esabif"
-
---- po/zh_TW.po Mar 2003 22:43:08 -0000 3.8
-+++ po/zh_TW.po Oct 2003 15:05:34 -0000
-@@ -576,3 +576,3 @@ msgstr "加密"
- #, fuzzy
--msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
-+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "
- msgstr "(1)加密, (2)簽名, (3)用別的身份簽, (4)兩者皆要, 或 (5)放棄?"
-@@ -580,4 +580,4 @@ msgstr "(1)加密, (2)簽名, (3)用別
- #: compose.c:166
--msgid "esabf"
--msgstr "12345"
-+msgid "esabif"
-+msgstr "1234i5"
-
+ char *s = "";
+ char buff[LONG_STRING];
+--- protos.h Wed Nov 5 10:41:33 2003
++++ protos.h Fri Dec 19 15:00:56 2003
+@@ -129,7 +129,7 @@
+ char *mutt_get_body_charset (char *, size_t, BODY *);
+ const char *mutt_get_name (ADDRESS *);
+ char *mutt_get_parameter (const char *, PARAMETER *);
+-char *mutt_crypt_hook (ADDRESS *);
++LIST *mutt_crypt_hook (ADDRESS *);
+ char *mutt_make_date (char *, size_t);
+
+ const char *mutt_make_version (void);
diff --git a/mail/mutt-devel/scripts/generate-plist b/mail/mutt-devel/scripts/generate-plist
index 9eb3552..951219d 100644
--- a/mail/mutt-devel/scripts/generate-plist
+++ b/mail/mutt-devel/scripts/generate-plist
@@ -138,6 +138,9 @@ EOF
if [ "$MUTT_EDIT_THREADS" = "yes" ]; then
html=$(($html + 3))
fi
+ if [ "$MUTT_IMAP_HEADER_CACHE" = "yes" ]; then
+ html=$(($html + 1))
+ fi
if [ "$MUTT_SIGNATURE_MENU" = "yes" ]; then
html=$(($html + 1))
fi
@@ -145,7 +148,7 @@ EOF
html=$(($html + 1))
fi
if [ "$MUTT_PGP_PATCH" = "yes" ]; then
- html=$(($html + 1))
+ html=$(($html + 2))
fi
echo "%%DOCSDIR%%/html/manual.html" >> $tmp_first
echo "%%DOCSDIR%%/html/manual_toc.html" >> $tmp_first
OpenPOWER on IntegriCloud