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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
diff -ur cf/m4/cfhead.m4 src/contrib/sendmail/cf/m4/cfhead.m4
--- cf/m4/cfhead.m4 Thu Aug 24 19:09:50 2000
+++ src/contrib/sendmail/cf/m4/cfhead.m4 Mon Nov 6 11:23:40 2000
@@ -9,6 +9,7 @@
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
+# $FreeBSD: /tmp/pcvs/ports/mail/sendmail811/files/Attic/patch-aa,v 1.3 2001-03-10 20:49:42 dinoex Exp $
#
######################################################################
@@ -214,7 +215,8 @@
define(`_REC_FULL_AUTH_', `$.$?{auth_type}(authenticated as ${auth_authen} $?{auth_author}for ${auth_author} $.with ${auth_type}')
define(`_REC_HDR_', `$?sfrom $s $.$?_($?s$|from $.$_)')
define(`_REC_END_', `for $u; $|;
- $.$b')
+ $.$b$?g
+ (envelope-from $g)$.')
define(`_REC_TLS_', `(using ${tls_version} with cipher ${cipher} (${cipher_bits} bits) verified ${verify})$.$?u')
define(`_REC_BY_', `$.by $j ($v/$Z)$?r with $r$. id $i$?{tls_version}')
define(`confRECEIVED_HEADER', `_REC_HDR_
diff -ur cf/ostype/bsd4.4.m4 src/contrib/sendmail/cf/ostype/bsd4.4.m4
--- cf/ostype/bsd4.4.m4 Sun Apr 25 22:00:56 1999
+++ src/contrib/sendmail/cf/ostype/bsd4.4.m4 Wed Oct 4 23:19:29 2000
@@ -10,11 +10,12 @@
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
-#
+# $FreeBSD: /tmp/pcvs/ports/mail/sendmail811/files/Attic/patch-aa,v 1.3 2001-03-10 20:49:42 dinoex Exp $
#
divert(0)
VERSIONID(`$Id: bsd4.4.m4,v 8.14 1999/04/24 05:37:40 gshapiro Exp $')
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl
+ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail $u')')dnl
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl
diff -ur cf/sh/makeinfo.sh src/contrib/sendmail/cf/sh/makeinfo.sh
--- cf/sh/makeinfo.sh Sun Feb 7 08:26:25 1999
+++ src/contrib/sendmail/cf/sh/makeinfo.sh Wed Oct 4 23:19:29 2000
@@ -13,6 +13,8 @@
#
# $Id: makeinfo.sh,v 8.14 1999/02/07 07:26:25 gshapiro Exp $
#
+# $FreeBSD: /tmp/pcvs/ports/mail/sendmail811/files/Attic/patch-aa,v 1.3 2001-03-10 20:49:42 dinoex Exp $
+#
usewhoami=0
usehostname=0
@@ -52,7 +54,7 @@
else
host=`uname -n`
fi
-echo '#####' built by $user@$host on `date`
+echo '#####' built by $user@$host on `LC_TIME=C date`
echo '#####' in `pwd` | sed 's/\/tmp_mnt//'
echo '#####' using $1 as configuration include directory | sed 's/\/tmp_mnt//'
echo "define(\`__HOST__', $host)dnl"
diff -ur mail.local/mail.local.8 src/contrib/sendmail/mail.local/mail.local.8
--- mail.local/mail.local.8.orig Fri Dec 29 19:12:16 2000
+++ mail.local/mail.local.8 Sun Dec 31 10:27:40 2000
@@ -10,13 +10,15 @@
.\"
.\" $Id: mail.local.8,v 8.14.14.5 2000/12/29 18:12:16 gshapiro Exp $
.\"
+.\" $FreeBSD: /tmp/pcvs/ports/mail/sendmail811/files/Attic/patch-aa,v 1.3 2001-03-10 20:49:42 dinoex Exp $
+.\"
.TH MAIL.LOCAL 8 "$Date: 2000/12/29 18:12:16 $"
.SH NAME
mail.local
\- store mail in a mailbox
.SH SYNOPSIS
.B mail.local
-.RB [ \-7 "] [" \-b "] [" \-d "] [" \-l "] [" \-f
+.RB [ \-7 "] [" \-B "] [" \-b "] [" \-d "] [" \-l "] [" \-s "] [" \-f
.IR from "] "
.RB [ \-r
.IR from "] " "user ..."
@@ -34,6 +36,11 @@
.B \-7
Do not advertise 8BITMIME support in LMTP mode.
.TP
+.B \-B
+Turn off the attempts to notify the
+.Dq biff
+service.
+.TP
.B \-b
Return a permanent error instead of a temporary error
if a mailbox exceeds quota.
@@ -46,6 +53,13 @@
.TP
.B \-l
Turn on LMTP mode.
+.TP
+.B \-s
+Turn off the
+.Xr fsync 2
+call that forces the mailbox to be committed to disk before returning a
+.Dq success
+status.
.TP
.BI \-r " from"
Specify the sender's name (for backward compatibility).
@@ -93,7 +107,6 @@
.PD
.SH SEE ALSO
mail(1),
-xsend(1),
flock(2),
getservbyname(3),
comsat(8),
diff -ur mail.local/mail.local.c src/contrib/sendmail/mail.local/mail.local.c
--- mail.local/mail.local.c Sun Feb 11 21:08:20 2001
+++ src/contrib/sendmail/mail.local/mail.local.c Mon Mar 5 21:48:22 2001
@@ -22,6 +22,8 @@
static char id[] = "@(#)$Id: mail.local.c,v 8.143.4.57 2001/02/11 20:08:20 gshapiro Exp $";
#endif /* ! lint */
+/* $FreeBSD: /tmp/pcvs/ports/mail/sendmail811/files/Attic/patch-aa,v 1.3 2001-03-10 20:49:42 dinoex Exp $ */
+
/*
** This is not intended to work on System V derived systems
** such as Solaris or HP-UX, since they use a totally different
@@ -154,7 +156,7 @@
# if defined(BSD4_4) || defined(__GLIBC__)
# include <paths.h>
-# define _PATH_LOCTMP "/tmp/local.XXXXXX"
+# define _PATH_LOCTMP "/var/tmp/local.XXXXXX"
# endif /* defined(BSD4_4) || defined(__GLIBC__) */
# ifdef BSD4_4
@@ -215,7 +217,7 @@
# endif /* USE_SETRESUID */
# ifndef _PATH_LOCTMP
-# define _PATH_LOCTMP "/tmp/local.XXXXXX"
+# define _PATH_LOCTMP "/var/tmp/local.XXXXXX"
# endif /* ! _PATH_LOCTMP */
# ifndef _PATH_MAILDIR
# define _PATH_MAILDIR "/var/spool/mail"
@@ -252,6 +254,8 @@
bool HoldErrs = FALSE; /* Hold errors in ErrBuf */
bool LMTPMode = FALSE;
bool BounceQuota = FALSE; /* permanent error when over quota */
+bool nobiff = FALSE;
+bool nofsync = FALSE;
void deliver __P((int, char *));
int e_to_sys __P((int));
@@ -291,7 +295,7 @@
# endif /* LOG_MAIL */
from = NULL;
- while ((ch = getopt(argc, argv, "7bdf:r:l")) != -1)
+ while ((ch = getopt(argc, argv, "7Bbdf:r:ls")) != -1)
{
switch(ch)
{
@@ -299,6 +303,10 @@
EightBitMime = FALSE;
break;
+ case 'B':
+ nobiff = TRUE;
+ break;
+
case 'b': /* bounce mail when over quota. */
BounceQuota = TRUE;
break;
@@ -320,6 +328,10 @@
LMTPMode = TRUE;
break;
+ case 's':
+ nofsync++;
+ break;
+
case '?':
default:
usage();
@@ -329,7 +341,8 @@
argv += optind;
/* initialize biff structures */
- notifybiff(NULL);
+ if (!nobiff)
+ notifybiff(NULL);
if (LMTPMode)
{
@@ -1135,14 +1148,17 @@
goto err1;
}
- /* Get the starting offset of the new message for biff. */
- curoff = lseek(mbfd, (off_t) 0, SEEK_END);
- if (sizeof curoff > sizeof(long))
- (void) snprintf(biffmsg, sizeof(biffmsg), "%s@%s\n",
- name, quad_to_string(curoff));
- else
- (void) snprintf(biffmsg, sizeof(biffmsg), "%s@%ld\n",
- name, (long) curoff);
+ if (!nobiff)
+ {
+ /* Get the starting offset of the new message for biff. */
+ curoff = lseek(mbfd, (off_t) 0, SEEK_END);
+ if (sizeof curoff > sizeof(long))
+ (void) snprintf(biffmsg, sizeof(biffmsg), "%s@%s\n",
+ name, quad_to_string(curoff));
+ else
+ (void) snprintf(biffmsg, sizeof(biffmsg), "%s@%ld\n",
+ name, (long) curoff);
+ }
/* Copy the message into the file. */
if (lseek(fd, (off_t) 0, SEEK_SET) == (off_t) -1)
@@ -1203,7 +1219,7 @@
}
/* Flush to disk, don't wait for update. */
- if (fsync(mbfd) < 0)
+ if (!nofsync && fsync(mbfd) < 0)
{
mailerr("450 4.2.0", "%s: %s", path, errstring(errno));
err3:
@@ -1229,7 +1245,7 @@
mailerr(errcode, "%s: %s", path, errstring(errno));
(void) truncate(path, curoff);
}
- else
+ else if (!nobiff)
notifybiff(biffmsg);
if (setreuid(0, 0) < 0)
@@ -1408,7 +1424,7 @@
usage()
{
ExitVal = EX_USAGE;
- mailerr(NULL, "usage: mail.local [-7] [-b] [-l] [-f from] user ...");
+ mailerr(NULL, "usage: mail.local [-7] [-B] [-b] [-l] [-f from] [-s] user ...");
exit(ExitVal);
}
diff -ur rmail/rmail.c src/contrib/sendmail/rmail/rmail.c
--- rmail/rmail.c Sun Sep 17 00:20:25 2000
+++ src/contrib/sendmail/rmail/rmail.c Mon Nov 6 11:23:42 2000
@@ -22,6 +22,8 @@
static char id[] = "@(#)$Id: rmail.c,v 8.39.4.8 2000/09/16 22:20:25 gshapiro Exp $";
#endif /* ! lint */
+/* $FreeBSD: /tmp/pcvs/ports/mail/sendmail811/files/Attic/patch-aa,v 1.3 2001-03-10 20:49:42 dinoex Exp $ */
+
/*
* RMAIL -- UUCP mail server.
*
@@ -318,7 +320,11 @@
args[i++] = _PATH_SENDMAIL; /* Build sendmail's argument list. */
args[i++] = "-G"; /* relay submission */
args[i++] = "-oee"; /* No errors, just status. */
+#ifdef QUEUE_ONLY
args[i++] = "-odq"; /* Queue it, don't try to deliver. */
+#else
+ args[i++] = "-odi"; /* Deliver in foreground. */
+#endif
args[i++] = "-oi"; /* Ignore '.' on a line by itself. */
/* set from system and protocol used */
diff -ur smrsh/smrsh.8 src/contrib/sendmail/smrsh/smrsh.8
--- smrsh/smrsh.8.orig Sat Dec 16 00:18:40 2000
+++ smrsh/smrsh.8 Sun Dec 31 10:37:02 2000
@@ -11,6 +11,8 @@
.\"
.\" $Id: smrsh.8,v 8.11.16.2 2000/12/15 19:50:46 gshapiro Exp $
.\"
+.\" $FreeBSD: /tmp/pcvs/ports/mail/sendmail811/files/Attic/patch-aa,v 1.3 2001-03-10 20:49:42 dinoex Exp $
+.\"
.TH SMRSH 8 "$Date: 2000/12/15 19:50:46 $"
.SH NAME
smrsh \- restricted shell for sendmail
@@ -39,7 +41,7 @@
.I smrsh
limits programs to be in a single directory,
by default
-/usr/adm/sm.bin,
+/usr/libexec/sm.bin,
allowing the system administrator to choose the set of acceptable commands,
and to the shell builtin commands ``exec'', ``exit'', and ``echo''.
It also rejects any commands with the characters
@@ -50,13 +52,12 @@
``"|exec /usr/local/bin/procmail -f- /etc/procmailrcs/user || exit 75"''
.PP
Initial pathnames on programs are stripped,
-so forwarding to ``/usr/ucb/vacation'',
-``/usr/bin/vacation'',
+so forwarding to ``/usr/bin/vacation'',
``/home/server/mydir/bin/vacation'',
and
``vacation''
all actually forward to
-``/usr/adm/sm.bin/vacation''.
+``/usr/libexec/sm.bin/vacation''.
.PP
System administrators should be conservative about populating
the sm.bin directory.
@@ -78,11 +79,11 @@
Compilation should be trivial on most systems.
You may need to use \-DPATH=\e"\fIpath\fP\e"
to adjust the default search path
-(defaults to ``/bin:/usr/bin:/usr/ucb'')
+(defaults to ``/bin:/usr/bin'')
and/or \-DCMDBIN=\e"\fIdir\fP\e"
to change the default program directory
-(defaults to ``/usr/adm/sm.bin'').
+(defaults to ``/usr/libexec/sm.bin'').
.SH FILES
-/usr/adm/sm.bin \- directory for restricted programs
+/usr/libexec/sm.bin \- directory for restricted programs
.SH SEE ALSO
sendmail(8)
|