SCCS-vsn: usr.sbin/sendmail/src/savemail.c 6.31
-static char sccsid[] = "@(#)savemail.c 6.30 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 6.31 (Berkeley) %G%";
#endif /* not lint */
# include <pwd.h>
#endif /* not lint */
# include <pwd.h>
register ENVELOPE *e;
{
register FILE *xfile;
register ENVELOPE *e;
{
register FILE *xfile;
+ register ADDRESS *q;
+ bool printheader;
+ char buf[MAXLINE];
if (e->e_parent == NULL)
{
if (e->e_parent == NULL)
{
putline(buf, fp, m);
}
(void) fclose(xfile);
putline(buf, fp, m);
}
(void) fclose(xfile);
}
}
else
{
expand(ErrMsgFile, buf, &buf[sizeof buf - 1], e);
putline(buf, fp, m);
}
}
else
{
expand(ErrMsgFile, buf, &buf[sizeof buf - 1], e);
putline(buf, fp, m);
+ putline("\n", fp, m);
+ }
+ }
+
+ /*
+ ** Output message introduction
+ */
+
+ printheader = TRUE;
+ for (q = e->e_parent->e_sendqueue; q != NULL; q = q->q_next)
+ {
+ if (bitset(QBADADDR, q->q_flags))
+ {
+ if (printheader)
+ {
+ putline("The following addresses failed:\n",
+ fp, m);
+ printheader = FALSE;
+ }
+ sprintf(buf, "\t%s\n", q->q_paddr);
+ putline(buf, fp, m);
+ if (!printheader)
+ putline("\n", fp, m);
/*
** Output transcript of errors
/*
** Output transcript of errors
if ((xfile = fopen(p, "r")) == NULL)
{
syserr("Cannot open %s", p);
if ((xfile = fopen(p, "r")) == NULL)
{
syserr("Cannot open %s", p);
- putline(" ----- Transcript of session is unavailable -----\n", fp, m);
+ putline(" ----- Transcript of session is unavailable -----\n", fp, m);