X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fpost.c;h=6b0786192c4be04df52d3dcc1346b03a4097d3af;hb=0f0af4e32a4d734209c16282b63f7cb1094e2699;hp=526b5e4ecb857348f95d71602c33efb8b12cba17;hpb=783f7afc3d5817828604b7f441d9de45b80f9aa6;p=mmh diff --git a/uip/post.c b/uip/post.c index 526b5e4..6b07861 100644 --- a/uip/post.c +++ b/uip/post.c @@ -709,7 +709,21 @@ putfmt (char *name, char *str, FILE *out) } if ((i = get_header (name, hdrtab)) == NOTOK) { - fprintf (out, "%s: %s", name, str); + if (strncasecmp (name, "nmh-", 4)) { + fprintf (out, "%s: %s", name, str); + } else { + /* Filter out all Nmh-* headers, because Norm asked. They + should never have reached this point. Warn about any + that are non-empty. */ + if (strcmp (str, "\n")) { + char *newline = strchr (str, '\n'); + if (newline) *newline = '\0'; + if (! whomsw) { + advise (NULL, "ignoring header line -- %s: %s", name, str); + } + } + } + return; } @@ -840,8 +854,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