From: Eric Allman Date: Fri, 26 May 1995 02:37:23 +0000 (-0800) Subject: fix problem that caused Message-Id:s to sometimes not be logged X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/5a6f454c498f38f063f90a940bd393de8f544d8a fix problem that caused Message-Id:s to sometimes not be logged SCCS-vsn: usr.sbin/sendmail/src/headers.c 8.64 --- diff --git a/usr/src/usr.sbin/sendmail/src/headers.c b/usr/src/usr.sbin/sendmail/src/headers.c index 79f9b8e59f..3e9c81e45d 100644 --- a/usr/src/usr.sbin/sendmail/src/headers.c +++ b/usr/src/usr.sbin/sendmail/src/headers.c @@ -7,7 +7,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)headers.c 8.63 (Berkeley) %G%"; +static char sccsid[] = "@(#)headers.c 8.64 (Berkeley) %G%"; #endif /* not lint */ # include @@ -366,7 +366,9 @@ isheader(h) ** Parameters: ** e -- the envelope to process. ** full -- if set, do full processing (e.g., compute -** message priority). +** message priority). This should not be set +** when reading a queue file because some info +** needed to compute the priority is wrong. ** ** Returns: ** none. @@ -405,7 +407,7 @@ eatheader(e, full) if (tTd(32, 1)) printf("----- collected header -----\n"); - msgid = ""; + msgid = NULL; for (h = e->e_header; h != NULL; h = h->h_link) { if (h->h_value == NULL) @@ -453,7 +455,7 @@ eatheader(e, full) } /* save the message-id for logging */ - if (full && strcasecmp(h->h_field, "message-id") == 0) + if (strcasecmp(h->h_field, "message-id") == 0) { msgid = h->h_value; while (isascii(*msgid) && isspace(*msgid)) @@ -479,20 +481,20 @@ eatheader(e, full) p = hvalue("precedence", e->e_header); if (p != NULL) e->e_class = priencode(p); + if (e->e_class < 0) + e->e_timeoutclass = TOC_NONURGENT; + else if (e->e_class > 0) + e->e_timeoutclass = TOC_URGENT; if (full) { e->e_msgpriority = e->e_msgsize - e->e_class * WkClassFact + e->e_nrcpts * WkRecipFact; - if (e->e_class < 0) - e->e_timeoutclass = TOC_NONURGENT; - else if (e->e_class > 0) - e->e_timeoutclass = TOC_URGENT; } /* message timeout priority */ p = hvalue("priority", e->e_header); - if (full && p != NULL) + if (p != NULL) { /* (this should be in the configuration file) */ if (strcasecmp(p, "urgent"))