Update alpine to 2.20.

Additions include:

  - Upgrade UW-IMAP to Panda IMAP from https://github.com/jonabbey/panda-imap.
  - S/MIME: Add screen to manage certificates.
  - S/MIME: Signatures are validated using the user's certificates instead of the ones included in the message. Behavior can be disabled by disabling the option "Validate Using Certificate Store Only" which is enabled by default.
  - S/MIME: sign messages using intermediate certificates when needed and possible.
  - S/MIME: validation of certificates for servers that modify signed content.
  - S/MIME: signed and encrypted messages will be signed first and encrypted second, so that they can be decoded by other clients.
  - S/MIME: add the sender certificate to the list of certificates in encrypted messages to make it possible for the sender to decrypt the message they sent.
  - S/MIME: When transferring certificates to a local container, create container with default names PublicContainer, PrivateContainer and CAContainer, as appropriate for these files, unless the user has provided some other names.
  - HTML: Style tag in body of html message causes Alpine to not write its content until a new </style>
  - HTML: <BR>, <BR />, and <BR/> are considered the same inline tag, the same is valid for the <HR> tag.
  - S/MIME: Forwarding a message will include the signed part as part of the text and not as a multipart message, just as the reply command does.
  - Unix Alpine: If a password file is defined, and S/MIME is enabled, the key and certificate used to encrypt the password file are saved in the ~/.alpine-smime/.pwd directory, or in the directory specified by the -pwdcertdir command line option.
  - Add support to selective expunge through a subcommand of the select-apply commands.
  - Pico: New subcommand of the search command, allows to reverse the direction of search.
  - Add /tls1, /tls1_1, /tls1_2 and /dtls1 to the definition of a server to use different ways to connect using ssl, for example {server.com/tls1} will attempt to connect to server.com at the ssl imap port (port 993) and establish a connection using TLSv1. These flags can be used in conjunction with the /ssl flag, the ssl flag is redundant. Conversely, however, the /ssl flag does not imply any of these flags; the /ssl flag means SSLv3 or, if not available, SSLv2 in the SSL port.
  - Alpine does not attempt to automatically reopen a collection that was not opened due to cancellation by the user. Instead, the user must try to open it explicitly.
  - Alpine searches for a certificate that matches an email address in all addresses in a certificate (instead of just the first one) but when it tries to unlock the certificate, it asks for the password for the first email address in that certificate.
  - Experimental: Write the content-type of a message in lowercase, as some non-compliant servers do not understand uppercase content-type, such as those of GMX.de.
  - Experimental: Do not send the RSET command before attempting to send a message, as this causes a delay in some evily managed servers.
  - Opening a folder updates recent count in maildrops (this already works for other types of folders)
  - Automatically redraw screen after opening an attachment instead of simply clearing it.
  - Pico: Justification works without need of a predefined quote string. This allows justification of blocks of text that are indented with spaces.
  - Decode the name of attachment names, so they can be written as part of the description of the part.
  - Check bounds and tie strings off to improve security. Contributed by James Jerkins.
  - Replace tabs by spaces in From and Subject fields to control for size in screen of these fields. Change only in index screen display.
  - Aggregate operations allows bouncing a list of messages using a role. Suggested by Ulf-Dietrich Braumann.
  - Disable saving new passwords to the password file. Implemented by Louis Raphael from dpslabs.com.
  - Makefile: Add $(LIBINTL) to the flags to link rpdump, rpload, alpined and alpineldap because MAC OSX 10.8 x86_64 needs it. Reported by Charles M. Register.

Bugs that have been addressed include:

  - S/MIME: signed messages that contained an attachment would not validate.
  - S/MIME: signed and encrypted messages from Thunderbird would not validate.
    Thanks to Andreas Schamanek for testing, debugging and advising during the
    process of fixing this problem.
  - S/MIME: Forwarding messages with multipart content-type failed to be signed
    with "Error writing pipe" message. Reported by Andreas Schamanek and Stefan
    Mueller.
  - S/MIME: Certificates are lost when using a pinerc file outside of the home
    directory.
  - S/MIME: accessing the S/MIME configuration screen would deinitialize SMIME
    making it not possible to sign or encrypt messages.
  - S/MIME: Forwarding a signed message might make the body contain mime
    information that is not part of the body, and hence making the body of the
message seem wrong.
  - S/MIME Alpine would compute incorrectly the signature of a message that
    contains 8bit if the option "Enable 8bit ESMTP Negotiation" is enabled, the
message contains 8bit characters and the smtp server supports 8bit sending.
  - When replying to several messages, subject will be decoded first, and then
    stripped from re/fwd before they are compared to determine the subject of
the replied message.
  - Fix in WebAlpine: do not use deprecated dereference in pointer, needs to
    use tcl_getstringresult() instead. Reported by Ulf-Dietrich Braumann.
  - WebAlpine: fail to build with debug disabled. Fix from Sam Hathaway.
  - WebAlpine: add _GNU_SOURCE to make pubcookie build.
  - Transformation of UTF-8 to MUTF7 was not being done when creating a folder
    in an IMAP server.
  - Fix _INIT_ token for reply quote string to include support for 8-bit in
    personal names. Reported by Lev Gorenstein.
  - When writing the .pinerc file, lines were truncated if they were longer
    than 10,000 characters. This could cause data corruption, so now lines are
allowed to be of any length.
  - In Unix Alpine (but not in MAC OSX) fix a problem that made Alpine remove
    attachments before they were open by a mailcap viewer. It requires that the
user has an equivalent to a command such as "ps auxww" to list the list of
processes, and check if there is any program using the attachment. The default
is "/bin/ps auxww", but it can be changed at compile time with the option
--with-ps-cmd. See the help of the variable mailcap-check-interval for more
information.
  - Crash when tcp connection to NNTP server was lost after connection had been
    established, but lost immediately afterwards.
  - Crash with message "lock when already locked", when painting an index was
    based on scores that needed information from a remote addressbook in the
same server as the folder opened. Reported by Peter Koellner.
  - Crash in message/rfc822 attachments encoded in base64.
  - Postponed messages whose content-type is text/html, text/enriched and
    text/richtext are sent with that content-type, even though, after resuming
composition, Alpine had changed its type to text/plain.
  - Alpine cannot handle correctly some characters in the Windows-1256
    character set, which might lead to a crash or a corruption in the screen.
Work was done to contain the bug. A more complete fix will be done in a future
release. Reported by Professor Robert Funnell.
  - WebAlpine: add _GNU_SOURCE to make pubcookie build.
  - Save command did not warn of existence of a message with a deleted
    attachment in an aggregate save, unless cursor was positioned on a message
with a deleted attachment. Reported by Florian Herzig.
  - DATE tokens were not internally transformed to UTF-8, which made their
    values not appear complete in the screen. Reported by Werner Scheinast.
  - Fixes to configure script so that it will not require PAM for every system.
  - Fix to configure script so that it will use CPPFLAGS instead of CPPCFLAGS,
    and so the --with-ssl-include-dir option take effect during the build. Fix
by Ulf-Dietrich Braumann.
  - Quoted string in URL Viewers configuration variable were not unquoted
    before passing to viewer.
  - Fix in configure script to detect location of tcl library; add /usr/local
    in FreeBSD and fix a bug in configure script that used $alpine_TCLINC
instead of $alpine_TCLINC/tcl.h. Reported and fixed by Werner Scheinast.
  - Move SSL configurations from UW-IMAP to configure script, and update
    OpenSSL configuration for Mac OSX.
  - Remove -lregex from linker flags when building --with-supplied-regex.
  - When the download of an attachment is interrumpted, Alpine stills caches
    what was downloaded, making the download incomplete for subsequent calls of
Alpine attempting to open the attachment. In the future, Alpine will not cache
any downloaded part of the attachment when it is interrupted.  CVS:
----------------------------------------------------------------------
This commit is contained in:
bsiegert 2016-05-14 16:13:10 +00:00
parent 99bae37409
commit a01bad656b
5 changed files with 33 additions and 171 deletions

View file

@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.39 2016/03/05 11:28:45 jperkin Exp $
# $NetBSD: Makefile,v 1.40 2016/05/14 16:13:10 bsiegert Exp $
#
DISTNAME= alpine-2.11
PKGREVISION= 5
DISTNAME= alpine-2.20
CATEGORIES= mail
MASTER_SITES= http://patches.freeiz.com/alpine/release/src/
EXTRACT_SUFX= .tar.xz

View file

@ -1,12 +1,10 @@
$NetBSD: distinfo,v 1.21 2015/11/08 20:13:24 dholland Exp $
$NetBSD: distinfo,v 1.22 2016/05/14 16:13:10 bsiegert Exp $
SHA1 (alpine-2.11.tar.xz) = 656556f5d2e5ec7e3680d1760cd02aa3a0072c46
RMD160 (alpine-2.11.tar.xz) = ea4b2d87500d1aa1b424033ec3263e3cf3c53814
SHA512 (alpine-2.11.tar.xz) = 0bc0c163d57a92619315e386ff5b77bfa3c69d6721bcd33572fecf837f6c186fb8ea7a7e396036c853e41e8b7a2c7ec763bce3bd666a4c69868491c5bfd5776f
Size (alpine-2.11.tar.xz) = 4403188 bytes
SHA1 (patch-aa) = c306613a297d61591d577b6968a31fc85b03f852
SHA1 (patch-ab) = f0983d8c0123b06a2970eb2736b04afad1502450
SHA1 (alpine-2.20.tar.xz) = 05f4908a347969b77b684cc8b995d4aaa1506155
RMD160 (alpine-2.20.tar.xz) = c6aed347725cc62f32e23017cf192335513dbd55
SHA512 (alpine-2.20.tar.xz) = 1c3947669f5d17428e404e1106188bc2efb541cb78eb1f87092c0388bf360ca03073530e7b5fde86085c99b198c817756cc7e007a9db6a5de60f883275a7e72c
Size (alpine-2.20.tar.xz) = 4841816 bytes
SHA1 (patch-imap_src_c-client_auth_gss.c) = 622b18f03074f87036f5469323125b4c855d9ce5
SHA1 (patch-imap_src_mtest_mtest.c) = a08084e1ea656385b267049bb2465b1af6c2949b
SHA1 (patch-imap_src_mtest_mtest.c) = 089837ea9482e6cdcbde4c774cc71f96071171c9
SHA1 (patch-imap_src_osdep_unix_Makefile.gss) = ca09bc26a139c68afe8ac1f99be54bd1fc0e77f0
SHA1 (patch-imap_src_osdep_unix_kerb_mit.c) = c77d5ee1e8aee30811c2df0562caa375ed270c0e

View file

@ -1,25 +0,0 @@
$NetBSD: patch-aa,v 1.4 2009/05/17 17:34:01 plunky Exp $
include <time.h> and <utime.h> so that where time_t has been changed to 64-bit
values on NetBSD, we we get correctly referred to __utime50() which can handle
64-bit values. This fixes a problem where mailbox mtimes were being reset to 0
Note that this actually causes some build warnings as the code uses
"time_t tp[2]" instead of "struct utimbuf tp" (contains two time_t values)
Although the <os_bsi.h> file says it is used for BSDI, it seems to be used by
NetBSD and OpenBSD, both of which have the <utime.h> and <time.h>
- plunky
--- imap/src/osdep/unix/os_bsi.h.orig 2008-06-04 19:18:34.000000000 +0100
+++ imap/src/osdep/unix/os_bsi.h 2009-05-17 18:00:44.000000000 +0100
@@ -34,6 +34,8 @@
#include <fcntl.h>
#include <syslog.h>
#include <sys/file.h>
+#include <time.h>
+#include <utime.h>
#include "env_unix.h"

View file

@ -1,23 +0,0 @@
$NetBSD: patch-ab,v 1.4 2009/08/06 20:01:50 plunky Exp $
OpenSSL provides a version of STRING that conflicts with the Alpine
internal version. Since we don't use it, just define it away for now..
--- imap/src/osdep/unix/ssl_unix.c.orig 2009-08-06 20:45:06.000000000 +0100
+++ imap/src/osdep/unix/ssl_unix.c
@@ -27,6 +27,7 @@
*/
#define crypt ssl_private_crypt
+#define STRING ssl_private_STRING
#include <x509v3.h>
#include <ssl.h>
#include <err.h>
@@ -36,6 +37,7 @@
#include <crypto.h>
#include <rand.h>
#undef crypt
+#undef STRING
#define SSLBUFLEN 8192
#define SSLCIPHERLIST "ALL:!LOW"

View file

@ -1,70 +1,29 @@
$NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
$NetBSD: patch-imap_src_mtest_mtest.c,v 1.2 2016/05/14 16:13:10 bsiegert Exp $
- patch up buffer handling (required to build on openbsd)
--- imap/src/mtest/mtest.c.orig 2013-08-15 04:36:01.000000000 +0000
--- imap/src/mtest/mtest.c.orig 2015-01-12 05:12:25.000000000 +0000
+++ imap/src/mtest/mtest.c
@@ -81,9 +81,23 @@ void overview_header (MAILSTREAM *stream
void header (MAILSTREAM *stream,long msgno);
void display_body (BODY *body,char *pfx,long i);
void status (MAILSTREAM *stream);
-void prompt (char *msg,char *txt);
+void prompt (char *msg,char *txt,size_t len);
void smtptest (long debug);
+static char *dogets(char *buf, size_t max) {
+ char *ret;
+ size_t len;
+
+ ret = fgets(buf, max, stdin);
+ if (ret != NULL) {
+ len = strlen(buf);
+ if (len > 0 && buf[len-1] == '\n') {
+ buf[len-1] = '\0';
+ }
+ }
+ return ret;
+}
+
/* Main program - initialization */
int main ()
@@ -118,13 +132,13 @@ int main ()
#endif
curhst = cpystr (mylocalhost ());
puts ("MTest -- C client test program");
- if (!*personalname) prompt ("Personal name: ",personalname);
+ if (!*personalname) prompt ("Personal name: ",personalname, sizeof(personalname));
/* user wants protocol telemetry? */
- prompt ("Debug protocol (y/n)?",tmp);
+ prompt ("Debug protocol (y/n)?",tmp, sizeof(tmp));
ucase (tmp);
debug = (tmp[0] == 'Y') ? T : NIL;
do {
- prompt ("Mailbox ('?' for help): ",tmp);
+ prompt ("Mailbox ('?' for help): ",tmp, sizeof(tmp));
if (!strcmp (tmp,"?")) {
puts ("Enter INBOX, mailbox name, or IMAP mailbox as {host}mailbox");
puts ("Known local mailboxes:");
@@ -155,14 +169,16 @@ void mm (MAILSTREAM *stream,long debug)
@@ -151,6 +151,7 @@ void mm (MAILSTREAM *stream,long debug)
void *sdb = NIL;
char cmd[MAILTMPLEN];
char *s,*arg;
char cmd[MAILTMPLEN],tmp[MAILTMPLEN];
char *s, *arg;
+ size_t argmax;
unsigned long i;
unsigned long last = 0;
BODY *body;
status (stream); /* first report message status */
@@ -158,7 +159,9 @@ void mm (MAILSTREAM *stream,long debug)
while (stream) {
- prompt ("MTest>",cmd); /* prompt user, get command */
+ prompt ("MTest>",cmd, sizeof(cmd)); /* prompt user, get command */
prompt ("MTest> ",cmd, sizeof(cmd)); /* prompt user, get command */
/* get argument */
if (arg = strchr (cmd,' ')) *arg++ = '\0';
+ if (arg) argmax = sizeof(cmd) - (arg - cmd);
- if (arg = strchr (cmd,' ')) *arg++ = '\0';
+ if (arg)
+ argmax = sizeof(cmd) - (arg - cmd);
+
switch (*ucase (cmd)) { /* dispatch based on command */
case 'B': /* Body command */
if (arg) last = atoi (arg);
@@ -189,7 +205,8 @@ void mm (MAILSTREAM *stream,long debug)
@@ -185,7 +188,8 @@ void mm (MAILSTREAM *stream,long debug)
break;
}
arg = cmd;
@ -74,24 +33,24 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
}
if (last && (last <= stream->nmsgs))
mail_setflag (stream,arg,"\\DELETED");
@@ -202,6 +219,7 @@ void mm (MAILSTREAM *stream,long debug)
@@ -198,6 +202,7 @@ void mm (MAILSTREAM *stream,long debug)
case 'F': /* Find command */
if (!arg) {
arg = "%";
+ argmax = 0;
if (s = sm_read (&sdb)) {
if (s = sm_read (tmp,&sdb)) {
puts ("Local network subscribed mailboxes:");
do if (*s == '{') (mm_lsub (NIL,NIL,s,NIL));
@@ -255,7 +273,7 @@ void mm (MAILSTREAM *stream,long debug)
@@ -251,7 +256,7 @@ void mm (MAILSTREAM *stream,long debug)
}
/* get the new mailbox */
while (!(stream = mail_open (stream,arg,debug))) {
- prompt ("Mailbox: ",arg);
- prompt ("Mailbox: ",arg, sizeof(arg));
+ prompt ("Mailbox: ",arg, argmax);
if (!arg[0]) break;
}
last = 0;
@@ -327,7 +345,8 @@ void mm (MAILSTREAM *stream,long debug)
@@ -323,7 +328,8 @@ void mm (MAILSTREAM *stream,long debug)
break;
}
arg = cmd;
@ -101,7 +60,7 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
}
if (last > 0 && last <= stream->nmsgs)
mail_clearflag (stream,arg,"\\DELETED");
@@ -376,7 +395,7 @@ void overview_header (MAILSTREAM *stream
@@ -384,7 +390,7 @@ void overview_header (MAILSTREAM *stream
tmp[3] = elt->answered ? 'A' : ' ';
tmp[4] = elt->deleted ? 'D' : ' ';
mail_parse_date (&selt,ov->date);
@ -110,7 +69,7 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
mail_date (tmp+11,&selt);
tmp[17] = ' ';
tmp[18] = '\0';
@@ -386,19 +405,20 @@ void overview_header (MAILSTREAM *stream
@@ -394,19 +400,20 @@ void overview_header (MAILSTREAM *stream
for (adr = ov->from; adr && !adr->host; adr = adr->next);
if (adr) { /* if a personal name exists use it */
if (!(t = adr->personal))
@ -133,7 +92,7 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
ov->subject ? ov->subject : " ",ov->optional.octets);
puts (tmp);
}
@@ -415,6 +435,7 @@ void header (MAILSTREAM *stream,long msg
@@ -423,6 +430,7 @@ void header (MAILSTREAM *stream,long msg
unsigned long i;
char tmp[MAILTMPLEN];
char *t;
@ -141,7 +100,7 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
MESSAGECACHE *cache = mail_elt (stream,msgno);
mail_fetchstructure (stream,msgno,NIL);
tmp[0] = cache->recent ? (cache->seen ? 'R': 'N') : ' ';
@@ -422,7 +443,7 @@ void header (MAILSTREAM *stream,long msg
@@ -430,7 +438,7 @@ void header (MAILSTREAM *stream,long msg
tmp[2] = cache->flagged ? 'F' : ' ';
tmp[3] = cache->answered ? 'A' : ' ';
tmp[4] = cache->deleted ? 'D' : ' ';
@ -150,7 +109,7 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
mail_date (tmp+11,cache);
tmp[17] = ' ';
tmp[18] = '\0';
@@ -437,7 +458,9 @@ void header (MAILSTREAM *stream,long msg
@@ -445,7 +453,9 @@ void header (MAILSTREAM *stream,long msg
strcat (tmp,"} ");
}
mail_fetchsubject (t = tmp + strlen (tmp),stream,msgno,(long) 25);
@ -161,7 +120,7 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
puts (tmp);
}
@@ -451,31 +474,57 @@ void display_body (BODY *body,char *pfx,
@@ -459,31 +469,57 @@ void display_body (BODY *body,char *pfx,
{
char tmp[MAILTMPLEN];
char *s = tmp;
@ -228,7 +187,7 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
break;
}
puts (tmp); /* output this line */
@@ -484,7 +533,7 @@ void display_body (BODY *body,char *pfx,
@@ -492,7 +528,7 @@ void display_body (BODY *body,char *pfx,
(body = body->nested.msg->body)) {
if (body->type == TYPEMULTIPART) display_body (body,pfx,i-1);
else { /* build encapsulation prefix */
@ -237,20 +196,7 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
display_body (body,tmp,(long) 0);
}
}
@@ -592,10 +641,10 @@ void status (MAILSTREAM *stream)
* pointer to input buffer
*/
-void prompt (char *msg,char *txt)
+void prompt (char *msg,char *txt, size_t max)
{
printf ("%s",msg);
- gets (txt);
+ dogets (txt, max);
}
/* Interfaces to C-client */
@@ -699,10 +748,13 @@ void mm_login (NETMBX *mb,char *user,cha
@@ -711,10 +747,13 @@ void mm_login (NETMBX *mb,char *user,cha
if (curhst) fs_give ((void **) &curhst);
curhst = (char *) fs_get (1+strlen (mb->host));
strcpy (curhst,mb->host);
@ -268,36 +214,3 @@ $NetBSD: patch-imap_src_mtest_mtest.c,v 1.1 2015/11/08 20:13:24 dholland Exp $
else {
printf ("%s} username: ",tmp);
fgets (user,NETMAXUSER-1,stdin);
@@ -758,14 +810,14 @@ void smtptest (long debug)
msg->return_path = mail_newaddr ();
msg->return_path->mailbox = cpystr (curusr);
msg->return_path->host = cpystr (curhst);
- prompt ("To: ",line);
+ prompt ("To: ",line, sizeof(line));
rfc822_parse_adrlist (&msg->to,line,curhst);
if (msg->to) {
- prompt ("cc: ",line);
+ prompt ("cc: ",line, sizeof(line));
rfc822_parse_adrlist (&msg->cc,line,curhst);
}
else {
- prompt ("Newsgroups: ",line);
+ prompt ("Newsgroups: ",line, sizeof(line));
if (*line) msg->newsgroups = cpystr (line);
else {
mail_free_body (&body);
@@ -774,12 +826,12 @@ void smtptest (long debug)
return;
}
}
- prompt ("Subject: ",line);
+ prompt ("Subject: ",line, sizeof(line));
msg->subject = cpystr (line);
puts (" Msg (end with a line with only a '.'):");
body->type = TYPETEXT;
*text = '\0';
- while (gets (line)) {
+ while (dogets (line, sizeof(line))) {
if (line[0] == '.') {
if (line[1] == '\0') break;
else strcat (text,".");