From 59ae7b80f479fd5d406cd549f7740849bdc76dc0 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 13 Oct 2012 18:00:39 -0500 Subject: [PATCH] Don't allow blind aliases with sendmail/pipe mts. Before this change, they would be fed to sendmail, which would reject them anyway. This change catches that in post and presents a more helpful error message to the user (at the "What now?" prompt, if used). A possible future enhancement might be, with sendmail/pipe, to expand out blind aliases and put the addresses in Bcc: header fields, but then the recipients would get messages with the Blind-Carbon-Copy indication. (Note that Dcc isn't supported with sendmail/pipe, either.) Just for information: old spost fed the addresses of blind aliases to sendmail, making them visible to all recipients. Oops. --- docs/pending-release-notes | 8 +++++--- uip/post.c | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/pending-release-notes b/docs/pending-release-notes index fcc99a7..7038d93 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -55,9 +55,11 @@ OBSOLETE/DEPRECATED FEATURES the mh-tailor(5) man page. The spost -noalias, -backup/-nobackup, -push/-nopush, and -remove/-noremove switches are not supported by post. Note that spost did not support -whom or Dcc, and neither - does post when using sendmail/pipe. For backward compatibility, - spost has been replaced by a simple shell script that exec's - post -mts sendmail/pipe. + does post when using sendmail/pipe. And spost would expand blind + aliases and send them in the message; post with sendmail/pipe + refuses to do that. For backward compatibility, spost has been + replaced by a simple shell script that exec's post -mts + sendmail/pipe. --------- BUG FIXES diff --git a/uip/post.c b/uip/post.c index ff75197..09ca15e 100644 --- a/uip/post.c +++ b/uip/post.c @@ -854,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 aliases not compatible with" + " sendmail/pipe"); + } + grp++; + } if (putadr (namep, qp, mp, out, hdr->flags)) msgflags |= (hdr->set & (MVIS | MINV)); else -- 1.7.10.4