SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 8.19
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.40
-static char sccsid[] = "@(#)srvrsmtp.c 8.39 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.40 (Berkeley) %G% (with SMTP)";
-static char sccsid[] = "@(#)srvrsmtp.c 8.39 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.40 (Berkeley) %G% (without SMTP)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
usrerr("501 BODY requires a value");
/* NOTREACHED */
}
usrerr("501 BODY requires a value");
/* NOTREACHED */
}
+ e->e_bodytype = newstr(vp);
if (strcasecmp(vp, "8bitmime") == 0)
{
if (strcasecmp(vp, "8bitmime") == 0)
{
- e->e_bodytype = "8BITMIME";
SevenBit = FALSE;
}
else if (strcasecmp(vp, "7bit") == 0)
{
SevenBit = FALSE;
}
else if (strcasecmp(vp, "7bit") == 0)
{
- e->e_bodytype = "7BIT";
SevenBit = TRUE;
}
else
{
usrerr("501 Unknown BODY type %s",
vp);
SevenBit = TRUE;
}
else
{
usrerr("501 Unknown BODY type %s",
vp);
-static char sccsid[] = "@(#)usersmtp.c 8.18 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.19 (Berkeley) %G% (with SMTP)";
-static char sccsid[] = "@(#)usersmtp.c 8.18 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.19 (Berkeley) %G% (without SMTP)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
+ if (e->e_bodytype != NULL)
+ {
+ if (bitset(MCIF_8BITMIME, mci->mci_flags))
+ {
+ strcat(optbuf, " BODY=");
+ strcat(optbuf, e->e_bodytype);
+ }
+ else if (strcasecmp(e->e_bodytype, "7bit") != 0)
+ {
+ /* cannot just send a 7-bit version */
+ usrerr("%s does not support 8BITMIME", mci->mci_host);
+ return EX_DATAERR;
+ }
+ }
+
/*
** Send the HOPS command.
** This is non-standard and may give an "unknown command".
/*
** Send the HOPS command.
** This is non-standard and may give an "unknown command".