xref: /original-bsd/usr.sbin/sendmail/src/conf.h (revision fac0c393)
1 /*
2  * Copyright (c) 1983 Eric P. Allman
3  * Copyright (c) 1988, 1993
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * %sccs.include.redist.c%
7  *
8  *	@(#)conf.h	8.141 (Berkeley) 03/12/95
9  */
10 
11 /*
12 **  CONF.H -- All user-configurable parameters for sendmail
13 */
14 
15 # include <sys/param.h>
16 # include <sys/types.h>
17 # include <sys/stat.h>
18 # include <sys/file.h>
19 # include <sys/wait.h>
20 # include <fcntl.h>
21 # include <signal.h>
22 
23 /**********************************************************************
24 **  Table sizes, etc....
25 **	There shouldn't be much need to change these....
26 **********************************************************************/
27 
28 # define MAXLINE	2048		/* max line length */
29 # define MAXNAME	256		/* max length of a name */
30 # define MAXPV		40		/* max # of parms to mailers */
31 # define MAXATOM	200		/* max atoms per address */
32 # define MAXMAILERS	25		/* maximum mailers known to system */
33 # define MAXRWSETS	200		/* max # of sets of rewriting rules */
34 # define MAXPRIORITIES	25		/* max values for Precedence: field */
35 # define MAXMXHOSTS	20		/* max # of MX records */
36 # define SMTPLINELIM	990		/* maximum SMTP line length */
37 # define MAXKEY		128		/* maximum size of a database key */
38 # define MEMCHUNKSIZE	1024		/* chunk size for memory allocation */
39 # define MAXUSERENVIRON	100		/* max envars saved, must be >= 3 */
40 # define MAXALIASDB	12		/* max # of alias databases */
41 # define MAXMAPSTACK	12		/* max # of stacked or sequenced maps */
42 # define MAXTOCLASS	8		/* max # of message timeout classes */
43 # define MAXMIMEARGS	20		/* max args in Content-Type: */
44 # define MAXMIMENESTING	20		/* max MIME multipart nesting */
45 
46 # ifndef QUEUESIZE
47 # define QUEUESIZE	1000		/* max # of jobs per queue run */
48 # endif
49 
50 /**********************************************************************
51 **  Compilation options.
52 **
53 **	#define these if they are available; comment them out otherwise.
54 **********************************************************************/
55 
56 # define LOG		1	/* enable logging */
57 # define UGLYUUCP	1	/* output ugly UUCP From lines */
58 # define NETUNIX	1	/* include unix domain support */
59 # define NETINET	1	/* include internet support */
60 # define MATCHGECOS	1	/* match user names from gecos field */
61 # define XDEBUG		1	/* enable extended debugging */
62 # ifdef NEWDB
63 # define USERDB		1	/* look in user database (requires NEWDB) */
64 # endif
65 
66 /**********************************************************************
67 **  0/1 Compilation options.
68 **	#define these to 1 if they are available;
69 **	#define them to 0 otherwise.
70 **********************************************************************/
71 
72 # ifndef NAMED_BIND
73 #  define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
74 # endif
75 
76 /*
77 **  Most systems have symbolic links today, so default them on.  You
78 **  can turn them off by #undef'ing this below.
79 */
80 
81 # define HASLSTAT	1	/* has lstat(2) call */
82 
83 /*
84 **  General "standard C" defines.
85 **
86 **	These may be undone later, to cope with systems that claim to
87 **	be Standard C but aren't.  Gcc is the biggest offender -- it
88 **	doesn't realize that the library is part of the language.
89 **
90 **	Life would be much easier if we could get rid of this sort
91 **	of bozo problems.
92 */
93 
94 #ifdef __STDC__
95 # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
96 #endif
97 
98 /**********************************************************************
99 **  Operating system configuration.
100 **
101 **	Unless you are porting to a new OS, you shouldn't have to
102 **	change these.
103 **********************************************************************/
104 
105 /*
106 **  Per-Operating System defines
107 */
108 
109 
110 /*
111 **  HP-UX -- tested for 8.07, 9.00, and 9.01.
112 */
113 
114 #ifdef __hpux
115 /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */
116 # undef m_flags
117 # define SYSTEM5	1	/* include all the System V defines */
118 # define HASINITGROUPS	1	/* has initgroups(3) call */
119 # define HASSETREUID	1	/* has setreuid(2) call */
120 # define setreuid(r, e)		setresuid(r, e, -1)
121 # define LA_TYPE	LA_SUBR
122 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
123 # define GIDSET_T	gid_t
124 # define _PATH_UNIX	"/hp-ux"
125 # ifndef _PATH_SENDMAILCF
126 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
127 # endif
128 # ifndef IDENTPROTO
129 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
130 # endif
131 # ifndef HASGETUSERSHELL
132 #  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
133 # endif
134 # define syslog		hard_syslog
135 # ifdef __STDC__
136 extern int	syslog(int, char *, ...);
137 # endif
138 #endif
139 
140 
141 /*
142 **  IBM AIX 3.x -- actually tested for 3.2.3
143 */
144 
145 #ifdef _AIX3
146 # define HASINITGROUPS	1	/* has initgroups(3) call */
147 # define HASUNAME	1	/* use System V uname(2) system call */
148 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
149 # define FORK		fork	/* no vfork primitive available */
150 # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
151 # define SPT_PADCHAR	'\0'	/* pad process title with nulls */
152 # define LA_TYPE	LA_INT
153 #endif
154 
155 
156 /*
157 **  Silicon Graphics IRIX
158 **
159 **	Compiles on 4.0.1.
160 **
161 **	Use IRIX64 instead of IRIX for 64-bit IRIX.
162 **
163 **	IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>.
164 */
165 
166 #ifdef IRIX64
167 # define IRIX
168 #endif
169 
170 #ifdef IRIX
171 # define SYSTEM5	1	/* this is a System-V derived system */
172 # define HASSETREUID	1	/* has setreuid(2) call */
173 # define HASINITGROUPS	1	/* has initgroups(3) call */
174 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
175 # define FORK		fork	/* no vfork primitive available */
176 # ifndef IRIX64			/* IRIX 6.0 */
177 #  define WAITUNION	1	/* use "union wait" as wait argument type */
178 # endif
179 # define setpgid	BSDsetpgrp
180 # define GIDSET_T	gid_t
181 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
182 # define SFS_BAVAIL	f_bfree		/* alternate field name */
183 # define LA_TYPE	LA_INT
184 # ifdef IRIX64
185 #  define NAMELISTMASK	0x7fffffffffffffff	/* mask for nlist() values */
186 # else
187 #  define NAMELISTMASK	0x7fffffff		/* mask for nlist() values */
188 # endif
189 #endif
190 
191 
192 /*
193 **  SunOS and Solaris
194 **
195 **	Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
196 **	Solaris 2.2 (a.k.a. SunOS 5.2).
197 */
198 
199 #if defined(sun) && !defined(BSD)
200 
201 # define HASINITGROUPS	1	/* has initgroups(3) call */
202 # define HASUNAME	1	/* use System V uname(2) system call */
203 # define HASGETUSERSHELL 1	/* DOES have getusershell(3) call in libc */
204 # define LA_TYPE	LA_INT
205 
206 # ifdef SOLARIS_2_3
207 #  define SOLARIS		/* for back compat only -- use -DSOLARIS=203 */
208 # endif
209 
210 # ifdef SOLARIS
211 			/* Solaris 2.x (a.k.a. SunOS 5.x) */
212 #  ifndef __svr4__
213 #   define __svr4__		/* use all System V Releae 4 defines below */
214 #  endif
215 #  include <sys/time.h>
216 #  define GIDSET_T	gid_t
217 #  ifndef _PATH_UNIX
218 #   define _PATH_UNIX	"/dev/ksyms"
219 #  endif
220 #  ifndef _PATH_SENDMAILCF
221 #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
222 #  endif
223 #  ifndef _PATH_SENDMAILPID
224 #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
225 #  endif
226 #  ifndef SYSLOG_BUFSIZE
227 #   define SYSLOG_BUFSIZE	1024	/* allow full size syslog buffer */
228 #  endif
229 #  if SOLARIS < 204
230 #   define gethostbyname	solaris_gethostbyname	/* get good version */
231 #   define gethostbyaddr	solaris_gethostbyaddr	/* get good version */
232 #  endif
233 
234 # else
235 			/* SunOS 4.0.3 or 4.1.x */
236 #  define HASSETREUID	1	/* has setreuid(2) call */
237 #  ifndef HASFLOCK
238 #   define HASFLOCK	1	/* has flock(2) call */
239 #  endif
240 #  define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
241 #  include <vfork.h>
242 
243 #  ifdef SUNOS403
244 			/* special tweaking for SunOS 4.0.3 */
245 #   include <malloc.h>
246 #   define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
247 #   define WAITUNION	1	/* use "union wait" as wait argument type */
248 #   undef WIFEXITED
249 #   undef WEXITSTATUS
250 #   undef HASUNAME
251 #   define setpgid	setpgrp
252 typedef int		pid_t;
253 extern char		*getenv();
254 
255 #  else
256 			/* 4.1.x specifics */
257 #   define HASSETSID	1	/* has Posix setsid(2) call */
258 #   define HASSETVBUF	1	/* we have setvbuf(3) in libc */
259 
260 #  endif
261 # endif
262 #endif
263 
264 /*
265 **  DG/UX
266 **
267 **	Tested on 5.4.2 and 5.4.3.  Use DGUX_5_4_2 to get the
268 **	older support.
269 **	5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>.
270 */
271 
272 #ifdef DGUX_5_4_2
273 # define DGUX		1
274 #endif
275 
276 #ifdef	DGUX
277 # define SYSTEM5	1
278 # define LA_TYPE	LA_SUBR
279 # define HASSETREUID	1	/* has setreuid(2) call */
280 # define HASUNAME	1	/* use System V uname(2) system call */
281 # define HASSETSID	1	/* has Posix setsid(2) call */
282 # define HASINITGROUPS	1	/* has initgroups(3) call */
283 # define HASGETUSERSHELL 0	/* does not have getusershell(3) */
284 # ifndef IDENTPROTO
285 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
286 # endif
287 # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
288 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
289 
290 /* these include files must be included early on DG/UX */
291 # include <netinet/in.h>
292 # include <arpa/inet.h>
293 
294 # ifdef DGUX_5_4_2
295 #  define inet_addr	dgux_inet_addr
296 extern long	dgux_inet_addr();
297 # endif
298 #endif
299 
300 
301 /*
302 **  Digital Ultrix 4.2A or 4.3
303 **
304 **	Apparently, fcntl locking is broken on 4.2A, in that locks are
305 **	not dropped when the process exits.  This causes major problems,
306 **	so flock is the only alternative.
307 */
308 
309 #ifdef ultrix
310 # define HASSETREUID	1	/* has setreuid(2) call */
311 # define HASUNSETENV	1	/* has unsetenv(3) call */
312 # define HASINITGROUPS	1	/* has initgroups(3) call */
313 # define HASUNAME	1	/* use System V uname(2) system call */
314 # ifndef HASFLOCK
315 #  define HASFLOCK	1	/* has flock(2) call */
316 # endif
317 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
318 # define BROKEN_RES_SEARCH 1	/* res_search(unknown) returns h_errno=0 */
319 # ifdef vax
320 #  define LA_TYPE	LA_FLOAT
321 # else
322 #  define LA_TYPE	LA_INT
323 #  define LA_AVENRUN	"avenrun"
324 # endif
325 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
326 # ifndef IDENTPROTO
327 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
328 # endif
329 #endif
330 
331 
332 /*
333 **  OSF/1 for Intel Paragon.
334 **
335 **	Contributed by Jeff A. Earickson <jeff@ssd.intel.com>
336 **	of Intel Scalable Systems Divison.
337 */
338 
339 #ifdef __PARAGON__
340 # define __osf__	1	/* get OSF/1 defines below */
341 # ifndef _PATH_SENDMAILCF
342 #  define _PATH_SENDMAILCF	"/var/adm/sendmail/sendmail.cf"
343 # endif
344 #endif
345 
346 
347 /*
348 **  OSF/1 (tested on Alpha)
349 */
350 
351 #ifdef __osf__
352 # define HASUNSETENV	1	/* has unsetenv(3) call */
353 # define HASSETREUID	1	/* has setreuid(2) call */
354 # define HASINITGROUPS	1	/* has initgroups(3) call */
355 # ifndef HASFLOCK
356 #  define HASFLOCK	1	/* has flock(2) call */
357 # endif
358 # define LA_TYPE	LA_INT
359 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
360 # ifndef _PATH_SENDMAILPID
361 #  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
362 # endif
363 #endif
364 
365 
366 /*
367 **  NeXTstep
368 */
369 
370 #ifdef NeXT
371 # define HASINITGROUPS	1	/* has initgroups(3) call */
372 # ifndef HASFLOCK
373 #  define HASFLOCK	1	/* has flock(2) call */
374 # endif
375 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
376 # define WAITUNION	1	/* use "union wait" as wait argument type */
377 # define sleep		sleepX
378 # define setpgid	setpgrp
379 # ifndef LA_TYPE
380 #  define LA_TYPE	LA_MACH
381 # endif
382 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
383 # ifndef _POSIX_SOURCE
384 typedef int		pid_t;
385 #  undef WEXITSTATUS
386 #  undef WIFEXITED
387 # endif
388 # ifndef _PATH_SENDMAILCF
389 #  define _PATH_SENDMAILCF	"/etc/sendmail/sendmail.cf"
390 # endif
391 # ifndef _PATH_SENDMAILPID
392 #  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
393 # endif
394 #endif
395 
396 
397 /*
398 **  4.4 BSD
399 **
400 **	See also BSD defines.
401 */
402 
403 #ifdef BSD4_4
404 # define HASUNSETENV	1	/* has unsetenv(3) call */
405 # include <sys/cdefs.h>
406 # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
407 # ifndef LA_TYPE
408 #  define LA_TYPE	LA_SUBR
409 # endif
410 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
411 # define SPT_TYPE	SPT_PSSTRINGS	/* use PS_STRINGS pointer */
412 #endif
413 
414 
415 /*
416 **  BSD/386 (all versions)
417 **	From Tony Sanders, BSDI
418 */
419 
420 #ifdef __bsdi__
421 # define HASUNSETENV	1	/* has the unsetenv(3) call */
422 # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
423 # include <sys/cdefs.h>
424 # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
425 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
426 # ifndef LA_TYPE
427 #  define LA_TYPE	LA_SUBR
428 # endif
429 # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
430 			/* version 1.1 or later */
431 #  undef SPT_TYPE
432 #  define SPT_TYPE	SPT_BUILTIN	/* setproctitle is in libc */
433 # else
434 			/* version 1.0 or earlier */
435 #  ifndef OLD_NEWDB
436 #   define OLD_NEWDB	1	/* old version of newdb library */
437 #  endif
438 #  define SPT_PADCHAR	'\0'	/* pad process title with nulls */
439 # endif
440 #endif
441 
442 
443 
444 /*
445 **  386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions)
446 **
447 **  4.3BSD clone, closer to 4.4BSD
448 **
449 **	See also BSD defines.
450 */
451 
452 #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
453 # define HASUNSETENV	1	/* has unsetenv(3) call */
454 # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
455 # ifdef __NetBSD__
456 #  define HASUNAME	1	/* has uname(2) syscall */
457 # endif
458 # include <sys/cdefs.h>
459 # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
460 # ifndef LA_TYPE
461 #  define LA_TYPE	LA_SUBR
462 # endif
463 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
464 #endif
465 
466 
467 /*
468 **  Mach386
469 **
470 **	For mt Xinu's Mach386 system.
471 */
472 
473 #if defined(MACH) && defined(i386)
474 # define MACH386	1
475 # define HASUNSETENV	1	/* has unsetenv(3) call */
476 # define HASINITGROUPS	1	/* has initgroups(3) call */
477 # ifndef HASFLOCK
478 #  define HASFLOCK	1	/* has flock(2) call */
479 # endif
480 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
481 # define NEEDSTRTOL	1	/* need the strtol() function */
482 # define setpgid	setpgrp
483 # ifndef LA_TYPE
484 #  define LA_TYPE	LA_FLOAT
485 # endif
486 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
487 # undef HASSETVBUF		/* don't actually have setvbuf(3) */
488 # undef WEXITSTATUS
489 # undef WIFEXITED
490 # ifndef _PATH_SENDMAILCF
491 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
492 # endif
493 # ifndef _PATH_SENDMAILPID
494 #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
495 # endif
496 #endif
497 
498 
499 /*
500 **  4.3 BSD -- this is for very old systems
501 **
502 **	Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1.
503 **
504 **	You'll also have to install a new resolver library.
505 **	I don't guarantee that support for this environment is complete.
506 */
507 
508 #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd)
509 # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
510 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
511 # define ARBPTR_T	char *
512 # define setpgid	setpgrp
513 # ifndef LA_TYPE
514 #  define LA_TYPE	LA_FLOAT
515 # endif
516 # ifndef _PATH_SENDMAILCF
517 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
518 # endif
519 # ifndef IDENTPROTO
520 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
521 # endif
522 # undef WEXITSTATUS
523 # undef WIFEXITED
524 typedef short		pid_t;
525 extern int		errno;
526 #endif
527 
528 
529 /*
530 **  SCO Unix
531 **
532 **	This includes two parts -- the first is for SCO Open Server 3.2v4
533 **	(contributed by Philippe Brand <phb@colombo.telesys-innov.fr>).
534 **	The second is, I believe, for an older version.
535 */
536 
537 #ifdef _SCO_unix_4_2
538 # define _SCO_unix_
539 # define HASSETREUID	1	/* has setreuid(2) call */
540 # define NEEDFSYNC	1	/* needs the fsync(2) call stub */
541 # define _PATH_UNIX	"/unix"
542 # ifndef _PATH_SENDMAILCF
543 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
544 # endif
545 # ifndef _PATH_SENDMAILPID
546 #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
547 # endif
548 #endif
549 
550 #ifdef _SCO_unix_
551 # define SYSTEM5	1	/* include all the System V defines */
552 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
553 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
554 # define FORK		fork
555 # define MAXPATHLEN	PATHSIZE
556 # define LA_TYPE	LA_SHORT
557 # define SFS_TYPE	SFS_4ARGS	/* use <sys/statfs.h> 4-arg impl */
558 # define SFS_BAVAIL	f_bfree		/* alternate field name */
559 # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
560 # undef NETUNIX			/* no unix domain socket support */
561 #endif
562 
563 
564 /*
565 **  ISC (SunSoft) Unix.
566 **
567 **	Contributed by J.J. Bailey <jjb@jagware.bcc.com>
568 */
569 
570 #ifdef ISC_UNIX
571 # include <net/errno.h>
572 # define SYSTEM5	1	/* include all the System V defines */
573 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
574 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
575 # define HASSETREUID	1	/* has setreuid(2) call */
576 # define NEEDFSYNC	1	/* needs the fsync(2) call stub */
577 # undef NETUNIX			/* no unix domain socket support */
578 # define FORK		fork
579 # define MAXPATHLEN	1024
580 # define LA_TYPE	LA_SHORT
581 # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
582 # define SFS_BAVAIL	f_bfree		/* alternate field name */
583 # define _PATH_UNIX	"/unix"
584 # ifndef _PATH_SENDMAILCF
585 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
586 # endif
587 # ifndef _PATH_SENDMAILPID
588 #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
589 # endif
590 
591 typedef short		pid_t;
592 
593 #endif
594 
595 
596 /*
597 **  Altos System V.
598 **	Contributed by Tim Rice <timr@crl.com>.
599 */
600 
601 #ifdef ALTOS_SYS_V
602 # include <limits.h>
603 # define SYSTEM5	1	/* include all the System V defines */
604 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
605 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
606 # define WAITUNION	1	/* use "union wait" as wait argument type */
607 # define NEEDFSYNC	1	/* no fsync(2) in system library */
608 # define FORK		fork
609 # define MAXPATHLEN	PATHSIZE
610 # define LA_TYPE	LA_SHORT
611 # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
612 # define SFS_BAVAIL	f_bfree		/* alternate field name */
613 # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
614 # undef NETUNIX			/* no unix domain socket support */
615 # undef WIFEXITED
616 # undef WEXITSTATUS
617 # define strtoul	strtol	/* gcc library bogosity */
618 
619 typedef unsigned short	uid_t;
620 typedef unsigned short	gid_t;
621 typedef short		pid_t;
622 #endif
623 
624 
625 /*
626 **  ConvexOS 11.0 and later
627 **
628 **	"Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this
629 **	works on 9.1 as well.
630 */
631 
632 #ifdef _CONVEX_SOURCE
633 # define BSD		1	/* include all the BSD defines */
634 # define HASUNAME	1	/* use System V uname(2) system call */
635 # define HASSETSID	1	/* has POSIX setsid(2) call */
636 # define NEEDGETOPT	1	/* need replacement for getopt(3) */
637 # define LA_TYPE	LA_FLOAT
638 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
639 # ifndef _PATH_SENDMAILCF
640 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
641 # endif
642 # ifndef S_IREAD
643 #  define S_IREAD	_S_IREAD
644 #  define S_IWRITE	_S_IWRITE
645 #  define S_IEXEC	_S_IEXEC
646 #  define S_IFMT	_S_IFMT
647 #  define S_IFCHR	_S_IFCHR
648 #  define S_IFBLK	_S_IFBLK
649 # endif
650 # ifndef IDENTPROTO
651 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
652 # endif
653 #endif
654 
655 
656 /*
657 **  RISC/os 4.52
658 **
659 **	Gives a ton of warning messages, but otherwise compiles.
660 */
661 
662 #ifdef RISCOS
663 
664 # define HASUNSETENV	1	/* has unsetenv(3) call */
665 # ifndef HASFLOCK
666 #  define HASFLOCK	1	/* has flock(2) call */
667 # endif
668 # define WAITUNION	1	/* use "union wait" as wait argument type */
669 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
670 # define LA_TYPE	LA_INT
671 # define LA_AVENRUN	"avenrun"
672 # define _PATH_UNIX	"/unix"
673 # undef WIFEXITED
674 
675 # define setpgid	setpgrp
676 
677 extern int		errno;
678 typedef int		pid_t;
679 #define			SIGFUNC_DEFINED
680 typedef int		(*sigfunc_t)();
681 extern char		*getenv();
682 extern void		*malloc();
683 
684 #endif
685 
686 
687 /*
688 **  Linux 0.99pl10 and above...
689 **
690 **  Thanks to, in reverse order of contact:
691 **
692 **	John Kennedy <warlock@csuchico.edu>
693 **	Andrew Pam <avatar@aus.xanadu.com>
694 **	Florian La Roche <rzsfl@rz.uni-sb.de>
695 **	Karl London <karl@borg.demon.co.uk>
696 **
697 **  Last compiled against:	[12/14/94 @ 11:38:41 PM (Wednesday)]
698 **	sendmail 8.7.a.5	named 4.9.3-beta12-p1	db-1.85
699 **	gcc 2.6.2		libc.so.4.6.20
700 **	slackware 2.1.0		linux 1.1.70
701 */
702 
703 #ifdef __linux__
704 # define BSD		1	/* include BSD defines */
705 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
706 # define HASUNAME	1	/* use System V uname(2) system call */
707 # define HASUNSETENV	1	/* has unsetenv(3) call */
708 # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
709 # define GIDSET_T	gid_t	/* from <linux/types.h> */
710 # define HASGETUSERSHELL 0	/* getusershell(3) broken in Slackware 2.0 */
711 # ifndef HASFLOCK
712 #  define HASFLOCK	0	/* flock(2) is broken after 0.99.13 */
713 # endif
714 # ifndef LA_TYPE
715 #  define LA_TYPE	LA_PROCSTR
716 # endif
717 # define SFS_TYPE	SFS_VFS		/* use <sys/vfs.h> statfs() impl */
718 # ifndef _PATH_SENDMAILPID
719 #  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
720 # endif
721 # define TZ_TYPE	TZ_TNAME
722 # include <sys/sysmacros.h>
723 # undef atol			/* wounded in <stdlib.h> */
724 #endif
725 
726 
727 /*
728 **  DELL SVR4 Issue 2.2, and others
729 **	From Kimmo Suominen <kim@grendel.lut.fi>
730 **
731 **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
732 **	defined, and the definitions conflict.
733 **
734 **	Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid
735 **	trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A
736 **	(SVR4.0/386 version 3.0).
737 */
738 
739 #ifdef DELL_SVR4
740 				/* no changes necessary */
741 				/* see general __svr4__ defines below */
742 #endif
743 
744 
745 /*
746 **  Apple A/UX 3.0
747 */
748 
749 #ifdef _AUX_SOURCE
750 # include <sys/sysmacros.h>
751 # define BSD			/* has BSD routines */
752 # define HASUNAME	1	/* use System V uname(2) system call */
753 # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
754 # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
755 # ifndef IDENTPROTO
756 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
757 # endif
758 # define FORK		fork
759 # ifndef _PATH_SENDMAILCF
760 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
761 # endif
762 # ifndef LA_TYPE
763 #  define LA_TYPE	LA_ZERO
764 # endif
765 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
766 # undef WIFEXITED
767 # undef WEXITSTATUS
768 #endif
769 
770 
771 /*
772 **  Encore UMAX V
773 **
774 **	Not extensively tested.
775 */
776 
777 #ifdef UMAXV
778 # include <limits.h>
779 # define HASUNAME	1	/* use System V uname(2) system call */
780 # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
781 # define HASINITGROUPS	1	/* has initgroups(3) call */
782 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
783 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
784 # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
785 # define FORK		fork	/* no vfork(2) primitive available */
786 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
787 # define MAXPATHLEN	PATH_MAX
788 extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
789 extern struct group	*getgrent(), *getgrnam(), *getgrgid();
790 # undef WIFEXITED
791 # undef WEXITSTATUS
792 #endif
793 
794 
795 /*
796 **  Stardent Titan 3000 running TitanOS 4.2.
797 **
798 **	Must be compiled in "cc -43" mode.
799 **
800 **	From Kate Hedstrom <kate@ahab.rutgers.edu>.
801 **
802 **	Note the tweaking below after the BSD defines are set.
803 */
804 
805 #ifdef titan
806 # define setpgid	setpgrp
807 typedef int		pid_t;
808 # undef WIFEXITED
809 # undef WEXITSTATUS
810 #endif
811 
812 
813 /*
814 **  Sequent DYNIX 3.2.0
815 **
816 **	From Jim Davis <jdavis@cs.arizona.edu>.
817 */
818 
819 #ifdef sequent
820 
821 # define BSD		1
822 # define HASUNSETENV	1
823 # define BSD4_3		1	/* to get signal() in conf.c */
824 # define WAITUNION	1
825 # define LA_TYPE	LA_FLOAT
826 # ifdef	_POSIX_VERSION
827 #  undef _POSIX_VERSION		/* set in <unistd.h> */
828 # endif
829 # undef HASSETVBUF		/* don't actually have setvbuf(3) */
830 # define setpgid	setpgrp
831 
832 /* Have to redefine WIFEXITED to take an int, to work with waitfor() */
833 # undef	WIFEXITED
834 # define WIFEXITED(s)	(((union wait*)&(s))->w_stopval != WSTOPPED && \
835 			 ((union wait*)&(s))->w_termsig == 0)
836 # define WEXITSTATUS(s)	(((union wait*)&(s))->w_retcode)
837 typedef int		pid_t;
838 # define isgraph(c)	(isprint(c) && (c != ' '))
839 
840 # ifndef IDENTPROTO
841 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
842 # endif
843 
844 # ifndef _PATH_UNIX
845 #  define _PATH_UNIX	"/dynix"
846 # endif
847 # ifndef _PATH_SENDMAILCF
848 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
849 # endif
850 
851 #endif
852 
853 
854 /*
855 **  Sequent DYNIX/ptx v2.0 (and higher)
856 **
857 **	For DYNIX/ptx v1.x, undefine HASSETREUID.
858 **
859 **	From Tim Wright <timw@sequent.com>.
860 */
861 
862 #ifdef _SEQUENT_
863 # define SYSTEM5	1	/* include all the System V defines */
864 # define HASSETSID	1	/* has POSIX setsid(2) call */
865 # define HASINITGROUPS	1	/* has initgroups(3) call */
866 # define HASSETREUID	1	/* has setreuid(2) call */
867 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
868 # define GIDSET_T	gid_t
869 # define LA_TYPE	LA_INT
870 # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
871 # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
872 # ifndef IDENTPROTO
873 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
874 # endif
875 # ifndef _PATH_SENDMAILCF
876 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
877 # endif
878 # ifndef _PATH_SENDMAILPID
879 #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
880 # endif
881 #endif
882 
883 
884 /*
885 **  Cray Unicos
886 **
887 **	Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
888 */
889 
890 #ifdef UNICOS
891 # define SYSTEM5	1	/* include all the System V defines */
892 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
893 # define MAXPATHLEN	PATHSIZE
894 # define LA_TYPE	LA_ZERO
895 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
896 # define SFS_BAVAIL	f_bfree		/* alternate field name */
897 #endif
898 
899 
900 /*
901 **  Apollo DomainOS
902 **
903 **  From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com>
904 **
905 **  15 Jan 1994
906 **
907 */
908 
909 #ifdef apollo
910 # define HASSETREUID	1	/* has setreuid(2) call */
911 # define HASINITGROUPS	1	/* has initgroups(2) call */
912 # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
913 # define LA_TYPE	LA_SUBR		/* use getloadavg.c */
914 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
915 # define SFS_BAVAIL	f_bfree		/* alternate field name */
916 # ifndef _PATH_SENDMAILCF
917 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
918 # endif
919 # ifndef _PATH_SENDMAILPID
920 #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
921 # endif
922 # undef  S_IFSOCK		/* S_IFSOCK and S_IFIFO are the same */
923 # undef  S_IFIFO
924 # define S_IFIFO	0010000
925 # ifndef IDENTPROTO
926 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
927 # endif
928 #endif
929 
930 
931 /*
932 **  UnixWare 1.1.2.
933 **
934 **	From Evan Champion <evanc@spatial.synapse.org>.
935 */
936 
937 #ifdef UNIXWARE
938 # define SYSTEM5		1
939 # define HASGETUSERSHELL	0	/* does not have getusershell(3) call */
940 # define HASGETDTABLESIZE	1
941 # define HASSETREUID		1
942 # define HASSETSID		1
943 # define HASINITGROUPS		1
944 # define GIDSET_T		gid_t
945 # define SLEEP_T		unsigned
946 # define SFS_TYPE		SFS_STATVFS
947 # define LA_TYPE		LA_ZERO
948 # undef WIFEXITED
949 # undef WEXITSTATUS
950 # define _PATH_UNIX		"/unix"
951 # ifndef _PATH_SENDMAILCF
952 #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
953 # endif
954 # ifndef _PATH_SENDMAILPID
955 #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
956 # endif
957 # define SYSLOG_BUFSIZE	128
958 #endif
959 
960 
961 /*
962 **  Intergraph CLIX 3.1
963 **
964 **	From Paul Southworth <pauls@locust.cic.net>
965 */
966 
967 #ifdef CLIX
968 # define SYSTEM5	1	/* looks like System V */
969 # ifndef HASGETUSERSHELL
970 #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
971 # endif
972 # define DEV_BSIZE	512	/* device block size not defined */
973 # define GIDSET_T	gid_t
974 # undef LOG			/* syslog not available */
975 # define NEEDFSYNC	1	/* no fsync in system library */
976 # define GETSHORT	_getshort
977 #endif
978 
979 
980 /*
981 **  NCR 3000 Series (SysVr4)
982 **
983 **	From Kevin Darcy <kevin@tech.mis.cfc.com>.
984 */
985 
986 #ifdef NCR3000
987 # define __svr4__
988 # undef BSD
989 # define LA_AVENRUN	"avenrun"
990 #endif
991 
992 
993 /*
994 **  Tandem NonStop-UX SVR4
995 **
996 **	From Rick McCarty <mccarty@mpd.tandem.com>.
997 */
998 
999 #ifdef NonStop_UX_BXX
1000 # define __svr4__
1001 #endif
1002 
1003 
1004 /*
1005 **  Hitachi 3050R & 3050RX Workstations running HI-UX/WE2.
1006 **
1007 **	Tested for 1.04 and 1.03
1008 **	From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>.
1009 */
1010 
1011 #ifdef __H3050R
1012 # define SYSTEM5	1	/* include all the System V defines */
1013 # define HASINITGROUPS	1	/* has initgroups(3) call */
1014 # define setreuid(r, e)	setresuid(r, e, -1)
1015 # define LA_TYPE	LA_FLOAT
1016 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
1017 # define HASSETVBUF	/* HI-UX has no setlinebuf */
1018 # ifndef GIDSET_T
1019 #  define GIDSET_T	gid_t
1020 # endif
1021 # ifndef _PATH_UNIX
1022 #  define _PATH_UNIX	"/HI-UX"
1023 # endif
1024 # ifndef _PATH_SENDMAILCF
1025 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
1026 # endif
1027 # ifndef IDENTPROTO
1028 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
1029 # endif
1030 # ifndef HASGETUSERSHELL
1031 #  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
1032 # endif
1033 
1034 /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */
1035 # undef m_flags
1036 
1037 # ifdef __STDC__
1038 extern int	syslog(int, char *, ...);
1039 # endif
1040 
1041 #endif
1042 
1043 
1044 /*
1045 **  Amdahl UTS System V 2.1.5 (SVr3-based)
1046 **
1047 **    From: Janet Jackson <janet@dialix.oz.au>.
1048 */
1049 
1050 #ifdef _UTS
1051 # include <sys/sysmacros.h>
1052 # undef HASLSTAT	/* has symlinks, but they cause problems */
1053 # define NEEDFSYNC	1	/* system fsync(2) fails on non-EFS filesys */
1054 # define SYS5SIGNALS	1	/* System V signal semantics */
1055 # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
1056 # define HASUNAME	1	/* use System V uname(2) system call */
1057 # define HASINITGROUPS	1	/* has initgroups(3) function */
1058 # define HASSETVBUF	1	/* has setvbuf(3) function */
1059 # define HASSIGSETMASK	0	/* does not have sigsetmask(2) function */
1060 # ifndef HASGETUSERSHELL
1061 #  define HASGETUSERSHELL 0	/* does not have getusershell(3) function */
1062 # endif
1063 # define GIDSET_T	gid_t	/* type of 2nd arg to getgroups(2) isn't int */
1064 # define LA_TYPE	LA_ZERO		/* doesn't have load average */
1065 # define SFS_TYPE	SFS_4ARGS	/* use 4-arg statfs() */
1066 # define SFS_BAVAIL	f_bfree		/* alternate field name */
1067 # define _PATH_UNIX	"/unix"
1068 # ifndef _PATH_SENDMAILCF
1069 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
1070 # endif
1071 #endif
1072 
1073 /*
1074 **  Cray Computer Corporation's CSOS
1075 **
1076 **	Contributed by Scott Bolte <scott@craycos.com>.
1077 */
1078 
1079 #ifdef _CRAYCOM
1080 # define SYSTEM5	1	/* include all the System V defines */
1081 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
1082 # define NEEDFSYNC	1	/* no fsync in system library */
1083 # define MAXPATHLEN	PATHSIZE
1084 # define LA_TYPE	LA_ZERO
1085 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
1086 # define SFS_BAVAIL	f_bfree		/* alternate field name */
1087 # define _POSIX_CHOWN_RESTRICTED	-1
1088 extern struct group	*getgrent(), *getgrnam(), *getgrgid();
1089 #endif
1090 
1091 
1092 /**********************************************************************
1093 **  End of Per-Operating System defines
1094 **********************************************************************/
1095 
1096 /**********************************************************************
1097 **  More general defines
1098 **********************************************************************/
1099 
1100 /* general BSD defines */
1101 #ifdef BSD
1102 # define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
1103 # define HASSETREUID	1	/* has setreuid(2) call */
1104 # define HASINITGROUPS	1	/* has initgroups(3) call */
1105 # ifndef HASSETRLIMIT
1106 #  define HASSETRLIMIT	1	/* has setrlimit(2) call */
1107 # endif
1108 # ifndef HASFLOCK
1109 #  define HASFLOCK	1	/* has flock(2) call */
1110 # endif
1111 # ifndef TZ_TYPE
1112 #  define TZ_TYPE	TZ_TM_ZONE	/* use tm->tm_zone variable */
1113 # endif
1114 #endif
1115 
1116 /* general System V Release 4 defines */
1117 #ifdef __svr4__
1118 # define SYSTEM5	1
1119 # define HASSETREUID	1	/* has seteuid(2) call & working saved uids */
1120 # define HASINITGROUPS	1	/* has initgroups(3) call */
1121 # ifndef HASSETRLIMIT
1122 #  define HASSETRLIMIT	1	/* has setrlimit(2) call */
1123 # endif
1124 # ifndef HASGETUSERSHELL
1125 #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
1126 # endif
1127 # define setreuid(r, e)	seteuid(e)
1128 
1129 # ifndef _PATH_UNIX
1130 #  define _PATH_UNIX		"/unix"
1131 # endif
1132 # ifndef _PATH_SENDMAILCF
1133 #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
1134 # endif
1135 # ifndef _PATH_SENDMAILPID
1136 #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
1137 # endif
1138 # ifndef SYSLOG_BUFSIZE
1139 #  define SYSLOG_BUFSIZE	128
1140 # endif
1141 # ifndef SFS_TYPE
1142 #  define SFS_TYPE		SFS_STATVFS
1143 # endif
1144 #endif
1145 
1146 /* general System V defines */
1147 #ifdef SYSTEM5
1148 # include <sys/sysmacros.h>
1149 # define HASUNAME	1	/* use System V uname(2) system call */
1150 # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
1151 # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
1152 # ifndef HASULIMIT
1153 #  define HASULIMIT	1	/* has the ulimit(2) syscall */
1154 # endif
1155 # ifndef LA_TYPE
1156 #  define LA_TYPE	LA_INT		/* assume integer load average */
1157 # endif
1158 # ifndef SFS_TYPE
1159 #  define SFS_TYPE	SFS_USTAT	/* use System V ustat(2) syscall */
1160 # endif
1161 # ifndef TZ_TYPE
1162 #  define TZ_TYPE	TZ_TZNAME	/* use tzname[] vector */
1163 # endif
1164 # define bcopy(s, d, l)		(memmove((d), (s), (l)))
1165 # define bzero(d, l)		(memset((d), '\0', (l)))
1166 # define bcmp(s, d, l)		(memcmp((s), (d), (l)))
1167 #endif
1168 
1169 /* general POSIX defines */
1170 #ifdef _POSIX_VERSION
1171 # define HASSETSID	1	/* has Posix setsid(2) call */
1172 # define HASWAITPID	1	/* has Posix waitpid(2) call */
1173 #endif
1174 
1175 /*
1176 **  If no type for argument two of getgroups call is defined, assume
1177 **  it's an integer -- unfortunately, there seem to be several choices
1178 **  here.
1179 */
1180 
1181 #ifndef GIDSET_T
1182 # define GIDSET_T	int
1183 #endif
1184 
1185 /*
1186 **  Tweaking for systems that (for example) claim to be BSD or POSIX
1187 **  but don't have all the standard BSD or POSIX routines (boo hiss).
1188 */
1189 
1190 #ifdef titan
1191 # undef HASINITGROUPS		/* doesn't have initgroups(3) call */
1192 #endif
1193 
1194 #ifdef _CRAYCOM
1195 # undef HASSETSID		/* despite POSIX claim, doesn't have setsid */
1196 #endif
1197 
1198 #ifdef ISC_UNIX
1199 # undef bcopy			/* despite SystemV claim, uses BSD bcopy */
1200 #endif
1201 
1202 #ifdef ALTOS_SYS_V
1203 # undef bcopy			/* despite SystemV claim, uses BSD bcopy */
1204 # undef bzero			/* despite SystemV claim, uses BSD bzero */
1205 # undef bcmp			/* despite SystemV claim, uses BSD bcmp */
1206 #endif
1207 
1208 
1209 /*
1210 **  Due to a "feature" in some operating systems such as Ultrix 4.3 and
1211 **  HPUX 8.0, if you receive a "No route to host" message (ICMP message
1212 **  ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
1213 **  are closed.  Some firewalls return this error if you try to connect
1214 **  to the IDENT port (113), so you can't receive email from these hosts
1215 **  on these systems.  The firewall really should use a more specific
1216 **  message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.  If
1217 **  not explicitly set to zero above, default it on.
1218 */
1219 
1220 #ifndef IDENTPROTO
1221 # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
1222 #endif
1223 
1224 #ifndef HASGETUSERSHELL
1225 # define HASGETUSERSHELL 1	/* libc has getusershell(3) call */
1226 #endif
1227 
1228 #ifndef HASFLOCK
1229 # define HASFLOCK	0	/* assume no flock(2) support */
1230 #endif
1231 
1232 #ifndef HASSETRLIMIT
1233 # define HASSETRLIMIT	0	/* assume no setrlimit(2) support */
1234 #endif
1235 
1236 #ifndef HASULIMIT
1237 # define HASULIMIT	0	/* assume no ulimit(2) support */
1238 #endif
1239 
1240 #ifndef OLD_NEWDB
1241 # define OLD_NEWDB	0	/* assume newer version of newdb */
1242 #endif
1243 
1244 /* heuristic setting of HASSETSIGMASK; can override above */
1245 #ifndef HASSIGSETMASK
1246 # ifdef SIGVTALRM
1247 #  define HASSETSIGMASK	1
1248 # else
1249 #  define HASSETSIGMASK	0
1250 # endif
1251 #endif
1252 
1253 
1254 /**********************************************************************
1255 **  Remaining definitions should never have to be changed.  They are
1256 **  primarily to provide back compatibility for older systems -- for
1257 **  example, it includes some POSIX compatibility definitions
1258 **********************************************************************/
1259 
1260 /* System 5 compatibility */
1261 #ifndef S_ISREG
1262 # define S_ISREG(foo)	((foo & S_IFMT) == S_IFREG)
1263 #endif
1264 #if !defined(S_ISLNK) && defined(S_IFLNK)
1265 # define S_ISLNK(foo)	((foo & S_IFMT) == S_IFLNK)
1266 #endif
1267 #ifndef S_IWUSR
1268 # define S_IWUSR		0200
1269 #endif
1270 #ifndef S_IWGRP
1271 # define S_IWGRP		0020
1272 #endif
1273 #ifndef S_IWOTH
1274 # define S_IWOTH		0002
1275 #endif
1276 
1277 /*
1278 **  Older systems don't have this error code -- it should be in
1279 **  /usr/include/sysexits.h.
1280 */
1281 
1282 # ifndef EX_CONFIG
1283 # define EX_CONFIG	78	/* configuration error */
1284 # endif
1285 
1286 /* pseudo-code used in server SMTP */
1287 # define EX_QUIT	22	/* drop out of server immediately */
1288 
1289 
1290 /*
1291 **  These are used in a few cases where we need some special
1292 **  error codes, but where the system doesn't provide something
1293 **  reasonable.  They are printed in errstring.
1294 */
1295 
1296 #ifndef E_PSEUDOBASE
1297 # define E_PSEUDOBASE	256
1298 #endif
1299 
1300 #define EOPENTIMEOUT	(E_PSEUDOBASE + 0)	/* timeout on open */
1301 #define E_DNSBASE	(E_PSEUDOBASE + 20)	/* base for DNS h_errno */
1302 
1303 /* type of arbitrary pointer */
1304 #ifndef ARBPTR_T
1305 # define ARBPTR_T	void *
1306 #endif
1307 
1308 #ifndef __P
1309 # include "cdefs.h"
1310 #endif
1311 
1312 #if NAMED_BIND
1313 # include <arpa/nameser.h>
1314 # ifdef __svr4__
1315 #  ifdef NOERROR
1316 #   undef NOERROR		/* avoid compiler conflict with stream.h */
1317 #  endif
1318 # endif
1319 #endif
1320 
1321 /*
1322 **  The size of an IP address -- can't use sizeof because of problems
1323 **  on Crays, where everything is 64 bits.  This will break if/when
1324 **  IP addresses are expanded to eight bytes.
1325 */
1326 
1327 #ifndef INADDRSZ
1328 # define INADDRSZ	4
1329 #endif
1330 
1331 /*
1332 **  The size of various known types -- for reading network protocols.
1333 **  Again, we can't use sizeof because of compiler randomness.
1334 */
1335 
1336 #ifndef INT16SZ
1337 # define INT16SZ	2
1338 #endif
1339 #ifndef INT32SZ
1340 # define INT32SZ	4
1341 #endif
1342 
1343 /*
1344 **  Do some required dependencies
1345 */
1346 
1347 #if defined(NETINET) || defined(NETISO)
1348 # define SMTP		1	/* enable user and server SMTP */
1349 # define QUEUE		1	/* enable queueing */
1350 # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
1351 #endif
1352 
1353 
1354 /*
1355 **  Arrange to use either varargs or stdargs
1356 */
1357 
1358 # ifdef __STDC__
1359 
1360 # include <stdarg.h>
1361 
1362 # define VA_LOCAL_DECL	va_list ap;
1363 # define VA_START(f)	va_start(ap, f)
1364 # define VA_END		va_end(ap)
1365 
1366 # else
1367 
1368 # include <varargs.h>
1369 
1370 # define VA_LOCAL_DECL	va_list ap;
1371 # define VA_START(f)	va_start(ap)
1372 # define VA_END		va_end(ap)
1373 
1374 # endif
1375 
1376 #ifdef HASUNAME
1377 # include <sys/utsname.h>
1378 # ifdef newstr
1379 #  undef newstr
1380 # endif
1381 #else /* ! HASUNAME */
1382 # define NODE_LENGTH 32
1383 struct utsname
1384 {
1385 	char nodename[NODE_LENGTH+1];
1386 };
1387 #endif /* HASUNAME */
1388 
1389 #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V)
1390 # define MAXHOSTNAMELEN	256
1391 #endif
1392 
1393 #if !defined(SIGCHLD) && defined(SIGCLD)
1394 # define SIGCHLD	SIGCLD
1395 #endif
1396 
1397 #ifndef STDIN_FILENO
1398 #define STDIN_FILENO	0
1399 #endif
1400 
1401 #ifndef STDOUT_FILENO
1402 #define STDOUT_FILENO	1
1403 #endif
1404 
1405 #ifndef STDERR_FILENO
1406 #define STDERR_FILENO	2
1407 #endif
1408 
1409 #ifndef LOCK_SH
1410 # define LOCK_SH	0x01	/* shared lock */
1411 # define LOCK_EX	0x02	/* exclusive lock */
1412 # define LOCK_NB	0x04	/* non-blocking lock */
1413 # define LOCK_UN	0x08	/* unlock */
1414 #endif
1415 
1416 #ifndef SIG_ERR
1417 # define SIG_ERR	((void (*)()) -1)
1418 #endif
1419 
1420 #ifndef WEXITSTATUS
1421 # define WEXITSTATUS(st)	(((st) >> 8) & 0377)
1422 #endif
1423 #ifndef WIFEXITED
1424 # define WIFEXITED(st)		(((st) & 0377) == 0)
1425 #endif
1426 
1427 #ifndef SIGFUNC_DEFINED
1428 typedef void		(*sigfunc_t) __P((int));
1429 #endif
1430 
1431 /* size of syslog buffer */
1432 #ifndef SYSLOG_BUFSIZE
1433 # define SYSLOG_BUFSIZE	1024
1434 #endif
1435 
1436 /*
1437 **  Size of tobuf (deliver.c)
1438 **	Tweak this to match your syslog implementation.  It will have to
1439 **	allow for the extra information printed.
1440 */
1441 
1442 #ifndef TOBUFSIZE
1443 # if (SYSLOG_BUFSIZE) > 512
1444 #  define TOBUFSIZE	(SYSLOG_BUFSIZE - 256)
1445 # else
1446 #  define TOBUFSIZE	256
1447 # endif
1448 #endif
1449 
1450 /*
1451 **  Size of prescan buffer.
1452 **	Despite comments in the _sendmail_ book, this probably should
1453 **	not be changed; there are some hard-to-define dependencies.
1454 */
1455 
1456 # define PSBUFSIZE	(MAXNAME + MAXATOM)	/* size of prescan buffer */
1457 /* fork routine -- set above using #ifdef _osname_ or in Makefile */
1458 # ifndef FORK
1459 # define FORK		vfork		/* function to call to fork mailer */
1460 # endif
1461 
1462 /*
1463 **  If we are going to link scanf anyway, use it in readcf
1464 */
1465 
1466 #if !defined(HASUNAME) && !defined(SCANF)
1467 # define SCANF		1
1468 #endif
1469