start_headers ();
if (debug) {
verbose++;
- discard (out = stdout); /* XXX: reference discard() to help loader */
+ out = stdout;
} else {
if (whomsw) {
if ((out = fopen ("/dev/null", "w")) == NULL)
hdrtab = msgstate == NORMAL ? NHeaders : RHeaders;
for (compnum = 1, state = FLD;;) {
- switch (state = m_getfld (state, name, buf, sizeof(buf), in)) {
+ int bufsz = sizeof buf;
+ switch (state = m_getfld (state, name, buf, &bufsz, in)) {
case FLD:
case FLDEOF:
case FLDPLUS:
compnum++;
cp = add (buf, NULL);
while (state == FLDPLUS) {
- state = m_getfld (state, name, buf, sizeof(buf), in);
+ bufsz = sizeof buf;
+ state = m_getfld (state, name, buf, &bufsz, in);
cp = add (buf, cp);
}
putfmt (name, cp, out);
break;
fprintf (out, "\n%s", buf);
while (state == BODY) {
- state = m_getfld (state, name, buf, sizeof(buf), in);
+ bufsz = sizeof buf;
+ state = m_getfld (state, name, buf, &bufsz, in);
fputs (buf, out);
}
break;
else
if (mp->m_gname)
putgrp (namep, mp->m_gname, out, hdr->flags);
- if (mp->m_ingrp)
+ if (mp->m_ingrp) {
+ if (sm_mts == MTS_SENDMAIL_PIPE) {
+ /* Catch this before sendmail chokes with:
+ "553 List:; syntax illegal for recipient
+ addresses".
+ If we wanted to, we could expand out blind
+ aliases and put them in Bcc:, but then
+ they'd have the Blind-Carbon-Copy
+ indication. */
+ adios (NULL,
+ "blind lists not compatible with"
+ " sendmail/pipe");
+ }
+
grp++;
+ }
if (putadr (namep, qp, mp, out, hdr->flags))
msgflags |= (hdr->set & (MVIS | MINV));
else