summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-11-26 01:15:31 -0700
committerEduardo Chappa <chappa@washington.edu>2021-11-26 01:15:31 -0700
commitc60f9d3bc9b6217f6b4de7cf516af45c972b6827 (patch)
tree467a470318ea8b6507fc06404757fba1e9a28749
parentfb5d091667dd5db488d0bba2c4fa2e2e0f264572 (diff)
downloadalpine-c60f9d3bc9b6217f6b4de7cf516af45c972b6827.tar.xz
* When saving to a folder in the unix format, Alpine parses the destination
folder to assign uids to all messages in the folder. When the destination folder is large this could significantly slow down alpine. The purpose of parsing the folder is to make sure that when saving the messages to it, the uids assigned to the messages upon saving are available so that the COPYUID and APPENDUID calls in the imap server return the uids of the saved messages. This data is returned through a callback function which Alpine does not define (but the imap server does), so we will force the parsing of the destination folder when the callback is needed, since the assignment of uids does not need to be done until opening the folder, and that can be delayed. Fix based on a patch submitted to the alpine-info list by Chris Caputo.
-rw-r--r--imap/src/osdep/unix/unix.c6
-rw-r--r--pith/pine.hlp8
2 files changed, 10 insertions, 4 deletions
diff --git a/imap/src/osdep/unix/unix.c b/imap/src/osdep/unix/unix.c
index 8fec0ee6..955090d9 100644
--- a/imap/src/osdep/unix/unix.c
+++ b/imap/src/osdep/unix/unix.c
@@ -917,8 +917,8 @@ long unix_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
return NIL;
}
- /* try to open rewrite for UIDPLUS */
- if ((tstream = mail_open_work (&unixdriver,NIL,mailbox,
+ /* try to open readwrite for UIDPLUS */
+ if (cu && (tstream = mail_open_work (&unixdriver,NIL,mailbox,
OP_SILENT|OP_NOKOD)) && tstream->rdonly)
tstream = mail_close (tstream);
if (cu && !tstream) { /* wanted a COPYUID? */
@@ -1113,7 +1113,7 @@ long unix_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
MM_CRITICAL (stream); /* go critical */
/* try to open readwrite for UIDPLUS */
- if ((tstream = mail_open_work (&unixdriver,NIL,mailbox,
+ if (au && (tstream = mail_open_work (&unixdriver,NIL,mailbox,
OP_SILENT|OP_NOKOD)) && tstream->rdonly)
tstream = mail_close (tstream);
if (au && !tstream) { /* wanted an APPENDUID? */
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 8b5297d8..8b44c07c 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 624 2021-11-24 22:33:48
+Alpine Commit 625 2021-11-26 01:15:28
============= h_news =================
<HTML>
<HEAD>
@@ -220,6 +220,12 @@ new additions to Alpine, please check it periodically.
<LI> To protect the privacy of a user, the message-id of a message will be
generated using the domain in the From field of the message.
+
+<LI> When saving to a folder in the unix format, Alpine parses the
+ destination folder to assign uids to all messages in the folder. When
+ the destination folder is large this could significantly slow down
+ alpine. Fix based on a patch submitted to the alpine-info list by
+ Chris Caputo.
</UL>
<P>