summaryrefslogtreecommitdiff
path: root/mail/sendmail812/files/patch-stable
blob: f077974ae0e44f2c77686e509fd91f259613c7d0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
--- cf/m4/proto.m4	2002/04/02 23:42:42	8.639
+++ cf/m4/proto.m4	2002/04/16 21:21:26	8.640
@@ -1204,6 +1204,7 @@
 R$+ $| $|		$: $(macro {Host} $@ $) $1	no h or {Host}
 R$+ $| $| $+		$: $1			h not set, {Host} set
 R$+ $| +$* $| $*	$: $1			h is +detail, {Host} set
+R$+ $| $* @ $+ $| $*	$: $(macro {Host} $@ @$3 $) $1	set {Host} to host in h
 R$+ $| $+ $| $*		$: $(macro {Host} $@ @$2 $) $1	set {Host} to h
 ')dnl
 
--- include/sm/os/sm_os_freebsd.h	2002/03/10 22:41:03	1.10
+++ include/sm/os/sm_os_freebsd.h	2002/04/15 17:17:05	1.11
@@ -31,11 +31,7 @@
 #endif
 
 #ifndef SM_CONF_SHM
-# ifdef __sparc64__
-#  define SM_CONF_SHM	0
-# else /* __sparc64__ */
-#  define SM_CONF_SHM	1
-# endif /* __sparc64__ */
+# define SM_CONF_SHM	1
 #endif /* SM_CONF_SHM */
 #ifndef SM_CONF_SEM
 # define SM_CONF_SEM	1
--- sendmail/mailq.1	2000/12/23 19:37:48	8.18
+++ sendmail/mailq.1	2002/04/12 05:07:58	8.19
@@ -18,5 +18,6 @@
 .SH SYNOPSIS
 .B mailq
+.RB [ \-Ac ]
 .RB [ \-v ]
 .SH DESCRIPTION
 .B Mailq
@@ -45,7 +46,13 @@
 .B Mailq
 is identical to ``sendmail -bp''.
 .PP
-The options are as follows:
+The relevant options are as follows:
+.TP
+.B \-Ac
+Show the mail submission queue specified in
+.I /etc/mail/submit.cf
+instead of the MTA queue specified in
+.IR /etc/mail/sendmail.cf .
 .TP
 .B \-v
 Print verbose information.  
--- sendmail/main.c	2002/02/27 23:49:52	8.876
+++ sendmail/main.c	2002/04/11 02:51:38	8.877
@@ -726,6 +726,8 @@
 	(void) sm_signal(SIGPIPE, SIG_IGN);
 	OldUmask = umask(022);
 	FullName = getextenv("NAME");
+	if (FullName != NULL)
+		FullName = newstr(FullName);
 
 	/*
 	**  Initialize name server if it is going to be used.
--- sendmail/milter.c	2002/03/05 00:23:47	8.194
+++ sendmail/milter.c	2002/04/14 03:55:07	8.196
@@ -1737,6 +1737,7 @@
 	int mid;
 	char *v;
 	char *buf, *bp;
+	char exp[MAXLINE];
 	ssize_t s;
 
 	/* sanity check */
@@ -1753,7 +1754,8 @@
 		v = macvalue(mid, e);
 		if (v == NULL)
 			continue;
-		s += strlen(macros[i]) + 1 + strlen(v) + 1;
+		expand(v, exp, sizeof(exp), e);
+		s += strlen(macros[i]) + 1 + strlen(exp) + 1;
 	}
 
 	if (s < 0)
@@ -1770,14 +1772,15 @@
 		v = macvalue(mid, e);
 		if (v == NULL)
 			continue;
+		expand(v, exp, sizeof(exp), e);
 
 		if (tTd(64, 10))
 			sm_dprintf("milter_send_macros(%s, %c): %s=%s\n",
-				m->mf_name, cmd, macros[i], v);
+				m->mf_name, cmd, macros[i], exp);
 
 		(void) sm_strlcpy(bp, macros[i], s - (bp - buf));
 		bp += strlen(bp) + 1;
-		(void) sm_strlcpy(bp, v, s - (bp - buf));
+		(void) sm_strlcpy(bp, exp, s - (bp - buf));
 		bp += strlen(bp) + 1;
 	}
 	(void) milter_write(m, SMFIC_MACRO, buf, s,
@@ -2900,8 +2903,6 @@
 		{
 			int err;
 
-# if NOFTRUNCATE
-			/* XXX: Not much we can do except rewind it */
 			err = sm_io_error(e->e_dfp);
 			(void) sm_io_flush(e->e_dfp, SM_TIME_DEFAULT);
 
@@ -2917,16 +2918,26 @@
 			/* errno is set implicitly by fseek() before return */
 			err = sm_io_seek(e->e_dfp, SM_TIME_DEFAULT,
 					 0, SEEK_SET);
+			if (err < 0)
+			{
+				MILTER_DF_ERROR("milter_replbody: sm_io_seek %s: %s");
+				return -1;
+			}
+# if NOFTRUNCATE
+			/* XXX: Not much we can do except rewind it */
+			errno = EINVAL;
+			MILTER_DF_ERROR("milter_replbody: ftruncate not available on this platform (%s:%s)");
+			return -1;
 # else /* NOFTRUNCATE */
 			err = ftruncate(sm_io_getinfo(e->e_dfp,
 						      SM_IO_WHAT_FD, NULL),
 					0);
-# endif /* NOFTRUNCATE */
 			if (err < 0)
 			{
 				MILTER_DF_ERROR("milter_replbody: sm_io ftruncate %s: %s");
 				return -1;
 			}
+# endif /* NOFTRUNCATE */
 		}
 
 		if (prevsize > e->e_msgsize)