diff options
| -rw-r--r-- | imap/ChangeLog | 8 | ||||
| -rw-r--r-- | imap/configure.ac | 4 | ||||
| -rw-r--r-- | imap/fetch.c | 37 | 
3 files changed, 13 insertions, 36 deletions
| diff --git a/imap/ChangeLog b/imap/ChangeLog index 6dd1663..3ae1012 100644 --- a/imap/ChangeLog +++ b/imap/ChangeLog @@ -1,3 +1,11 @@ +5.0.2 + +2018-10-27  Sam Varshavchik  <mrsam@courier-mta.com> + +	* configure.ac: Additional changes to how Unicode messages are +	handled with non-Unicode clients: disclaim all warranties, still +	report an error, but provide the raw message content, as is. +  5.0.1  2018-09-26  Sam Varshavchik  <mrsam@courier-mta.com> diff --git a/imap/configure.ac b/imap/configure.ac index fbf9cee..162a814 100644 --- a/imap/configure.ac +++ b/imap/configure.ac @@ -4,7 +4,7 @@ dnl  dnl Copyright 1998 - 2018 Double Precision, Inc.  See COPYING for  dnl distribution information. -AC_INIT(courier-imap, 5.0.1, [courier-users@lists.sourceforge.net]) +AC_INIT(courier-imap, 5.0.2, [courier-users@lists.sourceforge.net])  >confdefs.h  # Kill PACKAGE_ macros @@ -151,7 +151,7 @@ fi  dnl Checks for library functions. -AC_CHECK_FUNCS(strerror utime utimes strcasecmp strncasecmp setlocale poll getaddrinfo open_memstream) +AC_CHECK_FUNCS(strerror utime utimes strcasecmp strncasecmp setlocale poll getaddrinfo)  AC_DEFINE_UNQUOTED(SOCKET_TIMEOUT,60,  	[ Read/write timeout ]) diff --git a/imap/fetch.c b/imap/fetch.c index 94685c1..d38ca85 100644 --- a/imap/fetch.c +++ b/imap/fetch.c @@ -301,9 +301,9 @@ int do_fetch(unsigned long n, int byuid, void *p)  	if (unicode_err)  	{ -		writes("* OK [ALERT] Cannot open message "); +		writes("* OK [ALERT] Message ");  		writen(n); -		writes(" because it is a Unicode message and your" +		writes(" appears to be a Unicode message and your"  		       " E-mail reader did not enable Unicode support."  		       " Please use an E-mail reader that supports"  		       " IMAP with UTF-8 (see" @@ -455,39 +455,8 @@ static int fetchitem(FILE **fp, int *open_err, struct fetchinfo *fi,  	if (mimecorrectness && !enabled_utf8 &&  	    ((*mimep)->rfcviolation & RFC2045_ERR8BITHEADER))  	{ -#if HAVE_OPEN_MEMSTREAM -		char *ptr; -		size_t sizeloc; -		FILE *memfp; - -		static const char canned_msg[]= -			"From: Mail Delivery Subsystem <postmaster@localhost>\n" -			"Subject: Message unavailable\n" -			"\n" -			"This is a Unicode message that cannot be correctly\n" -			"opened by your E-mail program. Please upgrade to\n" -			"an E-mail program that supports IMAP with UTF-8.\n"; - -		if ((memfp=open_memstream(&ptr, &sizeloc)) != 0) -		{ -			struct rfc2045 *rfcp; - -			fprintf(memfp, canned_msg); - -			if ((rfcp=rfc2045_alloc()) != NULL) -			{ -				rfc2045_parse(rfcp, canned_msg, -					      sizeof(canned_msg)-1); -				(*fetchfunc)(memfp, fi, i, msgnum, rfcp); -				rfc2045_free(rfcp); -			} -			fclose(memfp); -			free(ptr); -		} -  		/* Still return -1, in order to [ALERT] the client */ -#endif -		return -1; +		rc= -1;  	}  	(*fetchfunc)(*fp, fi, i, msgnum, *mimep); | 
