diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2001-01-21 22:17:06 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2001-01-21 22:17:06 +0000 |
commit | 167a83e7b8733416154f871e39e86ba77eb1554d (patch) | |
tree | 4f725bdbff499cf7343d2eaeec15f8a0f0926140 /contrib/sendmail/src/savemail.c | |
parent | f84ac9120cb7d9f087e5dcb863c4bf25ba2985e6 (diff) | |
download | FreeBSD-src-167a83e7b8733416154f871e39e86ba77eb1554d.zip FreeBSD-src-167a83e7b8733416154f871e39e86ba77eb1554d.tar.gz |
Import sendmail 8.11.2
Diffstat (limited to 'contrib/sendmail/src/savemail.c')
-rw-r--r-- | contrib/sendmail/src/savemail.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/contrib/sendmail/src/savemail.c b/contrib/sendmail/src/savemail.c index f297ef9..8e5c9d5 100644 --- a/contrib/sendmail/src/savemail.c +++ b/contrib/sendmail/src/savemail.c @@ -12,7 +12,7 @@ */ #ifndef lint -static char id[] = "@(#)$Id: savemail.c,v 8.212.4.5 2000/08/22 22:46:00 gshapiro Exp $"; +static char id[] = "@(#)$Id: savemail.c,v 8.212.4.11 2000/12/18 18:00:44 ca Exp $"; #endif /* ! lint */ #include <sendmail.h> @@ -614,7 +614,7 @@ returntosender(msg, returnq, flags, e) addheader("MIME-Version", "1.0", 0, &ee->e_header); (void) snprintf(buf, sizeof buf, "%s.%ld/%.100s", - ee->e_id, curtime(), MyHostName); + ee->e_id, (long) curtime(), MyHostName); ee->e_msgboundary = newstr(buf); (void) snprintf(buf, sizeof buf, #if DSN @@ -993,6 +993,8 @@ errbody(mci, e, separator) if (e->e_msgboundary != NULL) { + time_t now = curtime(); + putline("", mci); (void) snprintf(buf, sizeof buf, "--%s", e->e_msgboundary); putline(buf, mci); @@ -1046,7 +1048,13 @@ errbody(mci, e, separator) char *action; if (QS_IS_BADADDR(q->q_state)) + { + /* RFC 1891, 6.2.6 (b) */ + if (bitset(QHASNOTIFY, q->q_flags) && + !bitset(QPINGONFAILURE, q->q_flags)) + continue; action = "failed"; + } else if (!bitset(QPRIMARY, q->q_flags)) continue; else if (bitset(QDELIVERED, q->q_flags)) @@ -1196,7 +1204,7 @@ errbody(mci, e, separator) /* Last-Attempt-Date: -- fine granularity */ if (q->q_statdate == (time_t) 0L) - q->q_statdate = curtime(); + q->q_statdate = now; (void) snprintf(buf, sizeof buf, "Last-Attempt-Date: %s", arpadate(ctime(&q->q_statdate))); |