4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
25 #pragma ident "%Z%%M% %I% %E% SMI"
29 * Save info on each header line for possible generation
30 * of MTA positive or negative delivery notification
41 static int last_hdrtype
= -1;
43 if (hdrtype
> H_CONT
) {
46 if (hdrtype
== H_CONT
) {
48 pushlist(last_hdrtype
, TAIL
, s
, TRUE
);
52 last_hdrtype
= hdrtype
;
54 if ((hdrtype
== H_FROM
) || (hdrtype
== H_FROM1
)) {
57 if (fnuhdrtype
== 0) {
58 /* Save type of first non-UNIX header line */
64 /* If first ">From " line, check for '...remote from...' */
65 if (hdrlines
[H_FROM1
].head
== (struct hdrs
*)NULL
) {
66 if ((rf
= substr(s
, " remote from ")) >= 0) {
68 (void) snprintf(tbuf
, sizeof (tbuf
),
69 "from %s by %s%s; %s",
70 s
+rf
+13, thissys
, maildomain(),
72 pushlist(H_RECEIVED
, HEAD
, tbuf
, FALSE
);
77 /* Remember that these header line type were in orig. msg. */
88 q
= strchr(s
, delim
) + 1;
91 if ((hdrtype
== H_UAID
) || (hdrtype
== H_MTSID
)) {
92 /* Check for enclosing '<' & '>', and remove if found */
93 /* gendeliv() will replace them if necessary */
94 if ((*q
== '<') && (*(q
+strlen(q
)-1) == '>')) {
96 *(q
+strlen(q
)-1) = '\0';
100 pushlist(hdrtype
, TAIL
, q
, FALSE
);