X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/fc15b3f63b8e802f8d6dbc36fd35c0e400313a91..683e0fb1a14da5b9ce7bc5db6e76951d14d79348:/uip/post.c diff --git a/uip/post.c b/uip/post.c index ff751976..c81f0fcc 100644 --- a/uip/post.c +++ b/uip/post.c @@ -558,7 +558,7 @@ main (int argc, char **argv) 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) @@ -579,14 +579,16 @@ main (int argc, char **argv) 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); @@ -603,7 +605,8 @@ main (int argc, char **argv) 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; @@ -854,8 +857,22 @@ putfmt (char *name, char *str, FILE *out) 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