summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pith/pine.hlp6
-rw-r--r--pith/send.c17
2 files changed, 16 insertions, 7 deletions
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 6d8b40b4..138b1058 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -262,6 +262,12 @@ Bugs that have been addressed include:
alpine/mailpart.c:format_msg_att()") with no example, and reported
now by Holger Trapp, with an example.
+ <LI> In addition to the previous report, Alpine encodes message/rfc822
+ messages as QUOTED-PRINTABLE, in contradiction with RFC 2045,
+ when it receives a report that its encoding is 8bit. We preserve
+ the encoding reported by the IMAP server, and do not encode in
+ QUOTED-PRINTABLE.
+
<LI> Update build.bat file to add /DWINVER=0x0501 so that Alpine can
build when using Visual Studio 2017. Fix contributed by
Ulf-Dietrich Braunmann.
diff --git a/pith/send.c b/pith/send.c
index e72b6d98..b7243859 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -4520,21 +4520,24 @@ pine_write_body_header(struct mail_bodystruct *body, soutr_t f, void *s)
if(!pine_write_params(body->parameter, so))
return(pwbh_finish(0, so));
}
- else if(!so_puts(so, "; CHARSET=US-ASCII"))
+ else if ((body->type != TYPEMESSAGE
+ || (body->subtype && strucmp(body->subtype, "RFC822")))
+ && (!so_puts(so, "; CHARSET=US-ASCII")))
return(pwbh_finish(0, so));
if(!so_puts(so, "\015\012"))
return(pwbh_finish(0, so));
+ /* do not change the encoding of a TYPEMESSAGE part */
if ((body->encoding /* note: encoding 7BIT never output! */
&& !(so_puts(so, "Content-Transfer-Encoding: ")
&& so_puts(so, body_encodings[(body->encoding==ENCBINARY)
- ? ENCBASE64
- : (body->encoding == ENC8BIT)
- ? ENCQUOTEDPRINTABLE
- : (body->encoding <= ENCMAX)
- ? body->encoding
- : ENCOTHER])
+ ? (body->type == TYPEMESSAGE ? ENCBINARY : ENCBASE64)
+ : (body->encoding == ENC8BIT)
+ ?(body->type == TYPEMESSAGE ? ENC8BIT : ENCQUOTEDPRINTABLE)
+ : (body->encoding <= ENCMAX)
+ ? body->encoding
+ : ENCOTHER])
&& so_puts(so, "\015\012")))
/*
* If requested, strip Content-ID headers that don't look like they