From bb2afea8b682e26440eb56de14675a033a2439cd Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Sun, 27 Nov 1994 19:22:20 -0800 Subject: [PATCH] fix a problem that was causing inappropriate MIME-encoding SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 8.31 --- usr/src/usr.sbin/sendmail/src/usersmtp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/usersmtp.c b/usr/src/usr.sbin/sendmail/src/usersmtp.c index 5b3af15157..189476a2ea 100644 --- a/usr/src/usr.sbin/sendmail/src/usersmtp.c +++ b/usr/src/usr.sbin/sendmail/src/usersmtp.c @@ -10,9 +10,9 @@ #ifndef lint #ifdef SMTP -static char sccsid[] = "@(#)usersmtp.c 8.30 (Berkeley) %G% (with SMTP)"; +static char sccsid[] = "@(#)usersmtp.c 8.31 (Berkeley) %G% (with SMTP)"; #else -static char sccsid[] = "@(#)usersmtp.c 8.30 (Berkeley) %G% (without SMTP)"; +static char sccsid[] = "@(#)usersmtp.c 8.31 (Berkeley) %G% (without SMTP)"; #endif #endif /* not lint */ @@ -337,13 +337,15 @@ smtpmailfrom(m, mci, e) strcat(optbuf, bodytype); } } - else if (bitnset(M_8BITS, m->m_flags)) + else if (bitnset(M_8BITS, m->m_flags) || + !bitset(EF_HAS8BIT, e->e_flags) || + (e->e_bodytype != NULL && + strcasecmp(e->e_bodytype, "7bit") == 0)) { /* just pass it through */ } else if (bitset(MM_CVTMIME, MimeMode) && - (e->e_bodytype == NULL ? !bitset(MM_PASS8BIT, MimeMode) - : strcasecmp(e->e_bodytype, "7bit") != 0)) + (e->e_bodytype != NULL || !bitset(MM_PASS8BIT, MimeMode))) { /* must convert from 8bit MIME format to 7bit encoded */ mci->mci_flags |= MCIF_CVT8TO7; -- 2.20.1