xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 64832)
19147Seric /*
234920Sbostic  * Copyright (c) 1983 Eric P. Allman
362522Sbostic  * Copyright (c) 1988, 1993
462522Sbostic  *	The Regents of the University of California.  All rights reserved.
533728Sbostic  *
642825Sbostic  * %sccs.include.redist.c%
733728Sbostic  *
8*64832Seric  *	@(#)conf.h	8.47 (Berkeley) 11/11/93
933728Sbostic  */
109147Seric 
1122726Sdist /*
1222726Sdist **  CONF.H -- All user-configurable parameters for sendmail
1322726Sdist */
149147Seric 
1557232Seric # include <sys/param.h>
1664705Seric # include <sys/types.h>
1759389Seric # include <sys/stat.h>
1864380Seric # include <sys/file.h>
1964500Seric # include <sys/wait.h>
2058689Seric # include <fcntl.h>
2164035Seric # include <signal.h>
2257232Seric 
2363902Seric /**********************************************************************
249147Seric **  Table sizes, etc....
259147Seric **	There shouldn't be much need to change these....
2663902Seric **********************************************************************/
279147Seric 
2859303Seric # define MAXLINE	2048		/* max line length */
2924945Seric # define MAXNAME	256		/* max length of a name */
309147Seric # define MAXPV		40		/* max # of parms to mailers */
3159303Seric # define MAXATOM	200		/* max atoms per address */
329147Seric # define MAXMAILERS	25		/* maximum mailers known to system */
3357143Seric # define MAXRWSETS	100		/* max # of sets of rewriting rules */
349147Seric # define MAXPRIORITIES	25		/* max values for Precedence: field */
3557143Seric # define MAXMXHOSTS	20		/* max # of MX records */
3652106Seric # define SMTPLINELIM	990		/* maximum SMTP line length */
3757232Seric # define MAXKEY		128		/* maximum size of a database key */
3857232Seric # define MEMCHUNKSIZE	1024		/* chunk size for memory allocation */
3959056Seric # define MAXUSERENVIRON	100		/* max envars saved, must be >= 3 */
4059667Seric # define MAXALIASDB	12		/* max # of alias databases */
4159303Seric # define PSBUFSIZE	(MAXLINE + MAXATOM)	/* size of prescan buffer */
4257143Seric 
4357143Seric # ifndef QUEUESIZE
4457143Seric # define QUEUESIZE	1000		/* max # of jobs per queue run */
4557143Seric # endif
4657143Seric 
4763902Seric /**********************************************************************
489147Seric **  Compilation options.
4925673Seric **
5025673Seric **	#define these if they are available; comment them out otherwise.
5163902Seric **********************************************************************/
529147Seric 
5325673Seric # define LOG		1	/* enable logging */
5425673Seric # define UGLYUUCP	1	/* output ugly UUCP From lines */
5564813Seric # define NETUNIX	1	/* include unix domain support */
5658778Seric # define NETINET	1	/* include internet support */
5725673Seric # define SETPROCTITLE	1	/* munge argv to display current status */
5835651Seric # define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
5953735Seric # define MATCHGECOS	1	/* match user names from gecos field */
6063753Seric # define XDEBUG		1	/* enable extended debugging */
6136483Sbostic 
6256337Seric # ifdef NEWDB
6356337Seric # define USERDB		1	/* look in user database (requires NEWDB) */
6456337Seric # endif
6556337Seric 
6664032Seric /*
6764032Seric **  Due to a "feature" in some operating systems such as Ultrix 4.3 and
6864032Seric **  HPUX 8.0, if you receive a "No route to host" message (ICMP message
6964032Seric **  ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
7064032Seric **  are closed.  Some firewalls return this error if you try to connect
7164032Seric **  to the IDENT port (113), so you can't receive email from these hosts
7264032Seric **  on these systems.  The firewall really should use a more specific
7364032Seric **  message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.  This
7464032Seric **  will get #undefed below as needed.
7564032Seric */
7664032Seric 
7764032Seric # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
7864032Seric 
7963902Seric /**********************************************************************
8059023Seric **  Operating system configuration.
8159023Seric **
8259023Seric **	Unless you are porting to a new OS, you shouldn't have to
8359023Seric **	change these.
8463902Seric **********************************************************************/
8556823Seric 
8663787Seric /*
8763787Seric **  Per-Operating System defines
8863787Seric */
8963787Seric 
9064314Seric 
9163902Seric /*
9263902Seric **  HP-UX -- tested for 8.07
9363902Seric */
9463902Seric 
9559348Seric # ifdef __hpux
9664727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */
9764727Seric # undef m_flags
9863787Seric # define SYSTEM5	1	/* include all the System V defines */
9964035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
10064314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
10164035Seric # define HASSETREUID	1	/* has setreuid(2) call */
10263902Seric # define setreuid(r, e)		setresuid(r, e, -1)
10363962Seric # define LA_TYPE	LA_FLOAT
10463962Seric # define _PATH_UNIX	"/hp-ux"
10564358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
10656823Seric # endif
10756823Seric 
10864314Seric 
10963902Seric /*
11063902Seric **  IBM AIX 3.x -- actually tested for 3.2.3
11163902Seric */
11263902Seric 
11360224Seric # ifdef _AIX3
11464035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
11560219Seric # define FORK		fork	/* no vfork primitive available */
11664494Seric # undef  SETPROCTITLE		/* setproctitle confuses AIX */
11760219Seric # endif
11860219Seric 
11964314Seric 
12063902Seric /*
12163902Seric **  Silicon Graphics IRIX
12263902Seric **
12363965Seric **	Compiles on 4.0.1.
12463902Seric */
12563902Seric 
12663753Seric # ifdef IRIX
12764727Seric # include <sys/sysmacros.h>
12864035Seric # define HASSETREUID	1	/* has setreuid(2) call */
12964035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
13064314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
13163753Seric # define FORK		fork	/* no vfork primitive available */
13264562Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
13364155Seric # define setpgid	BSDsetpgrp
13463937Seric # define GIDSET_T	gid_t
13563753Seric # endif
13663753Seric 
13763902Seric 
13863902Seric /*
13964813Seric **  SunOS and Solaris
14064813Seric **
14164813Seric **	Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
14264813Seric **	Solaris 2.2 (a.k.a. SunOS 5.2).
14363902Seric */
14463902Seric 
14563787Seric #if defined(sun) && !defined(BSD)
14659074Seric 
14763962Seric # define LA_TYPE	LA_INT
14864035Seric # define HASSETREUID	1	/* has setreuid(2) call */
14964035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
15064813Seric # define HASUNAME	1	/* use System V uname(2) system call */
15160564Seric 
15260602Seric # ifdef SOLARIS
15363902Seric 			/* Solaris 2.x (a.k.a. SunOS 5.x) */
15463949Seric #  define SYSTEM5	1	/* use System V definitions */
15563977Seric #  define setreuid(r, e)	seteuid(e)
15663787Seric #  include <sys/time.h>
157*64832Seric #  define gethostbyname	solaris_gethostbyname	/* get working version */
158*64832Seric #  define gethostbyaddr	solaris_gethostbyaddr	/* get working version */
15963962Seric #  define _PATH_UNIX	"/kernel/unix"
16063962Seric #  ifndef _PATH_SENDMAILCF
16163962Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
16264072Seric #  endif
16364072Seric #  ifndef _PATH_SENDMAILPID
16463962Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
16563962Seric #  endif
16663787Seric 
16760602Seric # else
16863787Seric 			/* SunOS 4.1.x */
16960602Seric #  define HASSTATFS	1	/* has the statfs(2) syscall */
17064831Seric #  define HASFLOCK	1	/* has flock(2) call */
17160564Seric #  include <vfork.h>
17263787Seric 
17360564Seric # endif
17459023Seric #endif
17559023Seric 
17664718Seric /*
17764813Seric **  DG/UX
17864813Seric **
17964813Seric **	Tested on 5.4.2
18064718Seric */
18164314Seric 
18264718Seric #ifdef	DGUX
18364718Seric # define SYSTEM5	1
18464718Seric # define LA_TYPE	LA_SUBR
18564718Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
18664718Seric # define HASSETREUID	1	/* has setreuid(2) call */
18764718Seric # define HASUNAME	1	/* use System V uname(2) system call */
18864718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
18964718Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
19064718Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
19164718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
19264718Seric # undef SETPROCTITLE
19364813Seric 
19464813Seric /* these include files must be included early on DG/UX */
19564813Seric # include <netinet/in.h>
19664813Seric # include <arpa/inet.h>
19764813Seric 
19864718Seric # define inet_addr	dgux_inet_addr
19964718Seric extern long	dgux_inet_addr();
20064718Seric #endif
20164718Seric 
20264718Seric 
20363902Seric /*
20463902Seric **  Digital Ultrix 4.2A or 4.3
20564264Seric **
20664264Seric **	Apparently, fcntl locking is broken on 4.2A, in that locks are
20764264Seric **	not dropped when the process exits.  This causes major problems,
20864264Seric **	so flock is the only alternative.
20963902Seric */
21063902Seric 
21160564Seric #ifdef ultrix
21260564Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
21364035Seric # define HASSETREUID	1	/* has setreuid(2) call */
21463962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
21564035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
21664264Seric # define HASFLOCK	1	/* has flock(2) call */
21763962Seric # define LA_TYPE	LA_INT
21863962Seric # define LA_AVENRUN	"avenrun"
21964358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
22060564Seric #endif
22160564Seric 
22264314Seric 
22363902Seric /*
22463902Seric **  OSF/1 (tested on Alpha)
22563902Seric */
22663902Seric 
22763787Seric #ifdef __osf__
22864314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
22963962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
23064035Seric # define HASSETREUID	1	/* has setreuid(2) call */
23164035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
23264831Seric # define HASFLOCK	1	/* has flock(2) call */
23363962Seric # define LA_TYPE	LA_INT
23464813Seric # ifndef _PATH_SENDMAILPID
23564813Seric #  define _PATH_SENDMAILPID	"/var/run/sendmial.pid"
23664813Seric # endif
23759287Seric #endif
23859287Seric 
23964314Seric 
24063902Seric /*
24163902Seric **  NeXTstep
24263902Seric */
24363902Seric 
24464076Seric #ifdef NeXT
24564035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
24664035Seric # define HASFLOCK	1	/* has flock(2) call */
24764125Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
24864314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
24964563Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
25063753Seric # define sleep		sleepX
25164155Seric # define setpgid	setpgrp
25264295Seric # ifndef LA_TYPE
25364295Seric #  define LA_TYPE	LA_MACH
25464295Seric # endif
25564500Seric # ifndef _POSIX_SOURCE
25664035Seric typedef int		pid_t;
25764500Seric #  undef WEXITSTATUS
25864500Seric #  undef WIFEXITED
25964500Seric # endif
26064072Seric # ifndef _PATH_SENDMAILCF
26164072Seric #  define _PATH_SENDMAILCF	"/etc/sendmail/sendmail.cf"
26264072Seric # endif
26364072Seric # ifndef _PATH_SENDMAILPID
26464072Seric #  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
26564072Seric # endif
26659288Seric #endif
26759288Seric 
26864314Seric 
26963902Seric /*
27063962Seric **  4.4 BSD
27164831Seric **
27264831Seric **	See also BSD defines.
27363902Seric */
27463902Seric 
27560568Seric #ifdef BSD4_4
27664072Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
27764314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
27860568Seric # include <sys/cdefs.h>
27963838Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
28064072Seric # ifndef LA_TYPE
28164072Seric #  define LA_TYPE	LA_SUBR
28264072Seric # endif
28360568Seric #endif
28460568Seric 
28564314Seric 
28663902Seric /*
28764733Seric **  386BSD / FreeBSD 1.0E (works) / NetBSD (not tested)
28864733Seric **
28964733Seric **  4.3BSD clone, closer to 4.4BSD
29064831Seric **
29164831Seric **	See also BSD defines.
29264733Seric */
29364733Seric 
29464733Seric #ifdef __386BSD__
29564733Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
29664733Seric # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
29764733Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
29864733Seric # include <sys/cdefs.h>
29964733Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
30064733Seric # ifndef LA_TYPE
30164733Seric #  define LA_TYPE	LA_SUBR
30264733Seric # endif
30364733Seric #endif
30464733Seric 
30564733Seric 
30664733Seric /*
30764813Seric **  Mach386
30864813Seric **
30964813Seric **	For mt Xinu's Mach386 system.
31064813Seric */
31164813Seric 
31264813Seric #if defined(MACH) && defined(i386)
31364813Seric # define MACH386	1
31464813Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
31564813Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
31664813Seric # define HASFLOCK	1	/* has flock(2) call */
31764813Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
31864813Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
31964813Seric # define NEEDSTRTOL	1	/* need the strtol() function */
32064813Seric # define setpgid	setpgrp
32164813Seric # ifndef LA_TYPE
32264813Seric #  define LA_TYPE	LA_FLOAT
32364813Seric # endif
32464813Seric # undef WEXITSTATUS
32564813Seric # undef WIFEXITED
32664813Seric # ifndef _PATH_SENDMAILCF
32764813Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
32864813Seric # endif
32964813Seric # ifndef _PATH_SENDMAILPID
33064813Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
33164813Seric # endif
33264813Seric #endif
33364813Seric 
33464813Seric 
33564813Seric /*
33663969Seric **  4.3 BSD -- this is for very old systems
33763969Seric **
33863969Seric **	You'll also have to install a new resolver library.
33963969Seric **	I don't guarantee that support for this environment is complete.
34063969Seric */
34163969Seric 
34263969Seric #ifdef oldBSD43
34363969Seric # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
34463969Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
34563970Seric # define ARBPTR_T	char *
34664155Seric # define setpgid	setpgrp
34763969Seric # ifndef LA_TYPE
34863969Seric #  define LA_TYPE	LA_FLOAT
34963969Seric # endif
35063969Seric # ifndef _PATH_SENDMAILCF
35163969Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
35263969Seric # endif
35364358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
35463969Seric #endif
35563969Seric 
35664314Seric 
35763969Seric /*
35863902Seric **  SCO Unix
35963902Seric */
36063902Seric 
36163838Seric #ifdef _SCO_unix_
36263838Seric # define SYSTEM5	1	/* include all the System V defines */
36364035Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
36463987Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
36563838Seric # define FORK		fork
36663838Seric # define MAXPATHLEN	PATHSIZE
36764718Seric # define LA_TYPE	LA_SHORT
36864813Seric # undef NETUNIX			/* no unix domain socket support */
36963838Seric #endif
37063838Seric 
37164314Seric 
37263962Seric /*
37363962Seric **  ConvexOS 11.0 and later
37463962Seric */
37563962Seric 
37663962Seric #ifdef _CONVEX_SOURCE
37763977Seric # define BSD		1	/* include all the BSD defines */
37863977Seric # define HASUNAME	1	/* use System V uname(2) system call */
37963962Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
38063962Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
38163977Seric # define NEEDGETOPT	1	/* need replacement for getopt(3) */
38263962Seric # define LA_TYPE	LA_FLOAT
38364032Seric # undef IDENTPROTO
38463962Seric #endif
38563962Seric 
38664314Seric 
38763962Seric /*
38863962Seric **  RISC/os 4.51
38963962Seric **
39063962Seric **	Untested...
39163962Seric */
39263962Seric 
39363965Seric #ifdef RISCOS
39463962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
39564831Seric # define HASFLOCK	1	/* has flock(2) call */
39663962Seric # define LA_TYPE	LA_INT
39763962Seric # define LA_AVENRUN	"avenrun"
39863962Seric # define _PATH_UNIX	"/unix"
39963962Seric #endif
40063962Seric 
40164314Seric 
40264155Seric /*
40364155Seric **  Linux 0.99pl10 and above...
40464155Seric **	From Karl London <karl@borg.demon.co.uk>.
40564155Seric */
40664155Seric 
40764770Seric #ifdef __linux__
40864155Seric # define BSD		1	/* pretend to be BSD based today */
40964155Seric # undef  NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
41064155Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
41164380Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
41264155Seric # ifndef LA_TYPE
41364155Seric #  define LA_TYPE	LA_FLOAT
41464155Seric # endif
41564763Seric # include <sys/sysmacros.h>
41664155Seric #endif
41764155Seric 
41864155Seric 
41964345Seric /*
42064345Seric **  DELL SVR4 Issue 2.2, and others
42164345Seric **	From Kimmo Suominen <kim@grendel.lut.fi>
42264345Seric **
42364345Seric **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
42464345Seric **	defined, and the definitions conflict.
42564345Seric */
42664345Seric 
42764345Seric #ifdef DELL_SVR4
42864345Seric # define SYSTEM5	1
42964345Seric /* # define setreuid(r, e)	seteuid(e) */
43064345Seric /* # include <sys/time.h> */
43164345Seric # define _PATH_UNIX	"/unix"
43264345Seric # ifndef _PATH_SENDMAILCF
43364345Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
43464345Seric # endif
43564345Seric # ifndef _PATH_SENDMAILPID
43664345Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
43764345Seric # endif
43864345Seric #endif
43964345Seric 
44064345Seric 
44164380Seric /*
44264380Seric **  Apple A/UX 3.0
44364380Seric */
44464345Seric 
44564380Seric #ifdef _AUX_SOURCE
44664729Seric # include <sys/sysmacros.h>
44764380Seric # define BSD			/* has BSD routines */
44864380Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
44964380Seric # define HASUNAME	1	/* use System V uname(2) system call */
45064380Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
45164380Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
45264561Seric # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
45364718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
45464380Seric # define FORK		fork
45564380Seric # ifndef _PATH_SENDMAILCF
45664380Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
45764380Seric # endif
45864380Seric # ifndef LA_TYPE
45964380Seric #  define LA_TYPE	LA_ZERO
46064380Seric # endif
46164560Seric # undef WIFEXITED
46264560Seric # undef WEXITSTATUS
46364380Seric #endif
46464380Seric 
46564380Seric 
46664705Seric /*
46764705Seric **  Encore UMAX V
46864705Seric **
46964705Seric **	Not extensively tested.
47064705Seric */
47164380Seric 
47264705Seric #ifdef UMAXV
47364705Seric # include <limits.h>
47464705Seric # define HASUNAME	1	/* use System V uname(2) system call */
47564705Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
47664705Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
47764705Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
47864705Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
47964705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
48064705Seric # define FORK		fork	/* no vfork(2) primitive available */
48164705Seric # define MAXPATHLEN	PATH_MAX
48264705Seric extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
48364705Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
48464705Seric # undef WIFEXITED
48564705Seric # undef WEXITSTATUS
48664705Seric #endif
48764705Seric 
48864705Seric 
48964705Seric 
49063902Seric /**********************************************************************
49163787Seric **  End of Per-Operating System defines
49263902Seric **********************************************************************/
49363787Seric 
49463949Seric /**********************************************************************
49563949Seric **  More general defines
49663949Seric **********************************************************************/
49763949Seric 
49863962Seric /* general BSD defines */
49963962Seric #ifdef BSD
50064035Seric # define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
50164035Seric # define HASSETREUID	1	/* has setreuid(2) call */
50264035Seric # define HASINITGROUPS	1	/* has initgroups(2) call */
50364035Seric # define HASFLOCK	1	/* has flock(2) call */
50463962Seric #endif
50563962Seric 
50663787Seric /* general System V defines */
50763787Seric # ifdef SYSTEM5
50864813Seric # include <sys/sysmacros.h>
50963949Seric # define HASUNAME	1	/* use System V uname(2) system call */
51063949Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
51164705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
51263962Seric # ifndef LA_TYPE
51363962Seric #  define LA_TYPE	LA_INT
51463962Seric # endif
51563949Seric # define bcopy(s, d, l)		(memmove((d), (s), (l)))
51663949Seric # define bzero(d, l)		(memset((d), '\0', (l)))
51763949Seric # define bcmp(s, d, l)		(memcmp((s), (d), (l)))
51863787Seric # endif
51963787Seric 
52063949Seric /* general "standard C" defines */
52164813Seric #if (defined(__STDC__) && !defined(MACH386)) || defined(SYSTEM5)
52263949Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
52363949Seric #endif
52463949Seric 
52563949Seric /* general POSIX defines */
52663949Seric #ifdef _POSIX_VERSION
52764718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
52864718Seric # define HASWAITPID	1	/* has Posix waitpid(2) call */
52963949Seric #endif
53063949Seric 
53163787Seric /*
53263937Seric **  If no type for argument two of getgroups call is defined, assume
53363937Seric **  it's an integer -- unfortunately, there seem to be several choices
53463937Seric **  here.
53563937Seric */
53663937Seric 
53763937Seric #ifndef GIDSET_T
53863937Seric # define GIDSET_T	int
53963937Seric #endif
54063937Seric 
54164439Seric 
54264439Seric /**********************************************************************
54359023Seric **  Remaining definitions should never have to be changed.  They are
54459023Seric **  primarily to provide back compatibility for older systems -- for
54559287Seric **  example, it includes some POSIX compatibility definitions
54664439Seric **********************************************************************/
54759023Seric 
54859388Seric /* System 5 compatibility */
54959388Seric #ifndef S_ISREG
55059388Seric #define S_ISREG(foo)	((foo & S_IFREG) == S_IFREG)
55159388Seric #endif
55259388Seric #ifndef S_IWGRP
55359388Seric #define S_IWGRP		020
55459388Seric #endif
55559388Seric #ifndef S_IWOTH
55659388Seric #define S_IWOTH		002
55759388Seric #endif
55859388Seric 
55959023Seric /*
56050537Seric **  Older systems don't have this error code -- it should be in
56150537Seric **  /usr/include/sysexits.h.
56250537Seric */
56350537Seric 
56450537Seric # ifndef EX_CONFIG
56550537Seric # define EX_CONFIG	78	/* configuration error */
56650537Seric # endif
56756852Seric 
56864718Seric /* pseudo-code used in server SMTP */
56964718Seric # define EX_QUIT	22	/* drop out of server immediately */
57064718Seric 
57164718Seric 
57263993Seric /*
57363993Seric **  These are used in a few cases where we need some special
57463993Seric **  error codes, but where the system doesn't provide something
57563993Seric **  reasonable.  They are printed in errstring.
57663993Seric */
57763993Seric 
57863993Seric #ifndef E_PSEUDOBASE
57963993Seric # define E_PSEUDOBASE	256
58063993Seric #endif
58163993Seric 
58263993Seric #define EOPENTIMEOUT	(E_PSEUDOBASE + 0)	/* timeout on open */
58363993Seric #define E_DNSBASE	(E_PSEUDOBASE + 20)	/* base for DNS h_errno */
58463993Seric 
58563970Seric /* type of arbitrary pointer */
58663970Seric #ifndef ARBPTR_T
58763970Seric # define ARBPTR_T	void *
58863970Seric #endif
58963970Seric 
59060568Seric #ifndef __P
59160568Seric # include "cdefs.h"
59260568Seric #endif
59360568Seric 
59456852Seric /*
59558778Seric **  Do some required dependencies
59658778Seric */
59758778Seric 
59858778Seric #if defined(NETINET) || defined(NETISO)
59959107Seric # define SMTP		1	/* enable user and server SMTP */
60059107Seric # define QUEUE		1	/* enable queueing */
60159107Seric # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
60258778Seric #endif
60358778Seric 
60458778Seric 
60558778Seric /*
60656852Seric **  Arrange to use either varargs or stdargs
60756852Seric */
60856852Seric 
60956852Seric # ifdef __STDC__
61056852Seric 
61156852Seric # include <stdarg.h>
61256852Seric 
61356852Seric # define VA_LOCAL_DECL	va_list ap;
61456852Seric # define VA_START(f)	va_start(ap, f)
61556852Seric # define VA_END		va_end(ap)
61656852Seric 
61756852Seric # else
61856852Seric 
61956852Seric # include <varargs.h>
62056852Seric 
62156852Seric # define VA_LOCAL_DECL	va_list ap;
62256852Seric # define VA_START(f)	va_start(ap)
62356852Seric # define VA_END		va_end(ap)
62456852Seric 
62556852Seric # endif
62657631Seric 
62757943Seric #ifdef HASUNAME
62857631Seric # include <sys/utsname.h>
62957631Seric # ifdef newstr
63057631Seric #  undef newstr
63157631Seric # endif
63257943Seric #else /* ! HASUNAME */
63357631Seric # define NODE_LENGTH 32
63457631Seric struct utsname
63557631Seric {
63657631Seric 	char nodename[NODE_LENGTH+1];
63757631Seric };
63857943Seric #endif /* HASUNAME */
63957642Seric 
64063838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_)
64163838Seric # define MAXHOSTNAMELEN	256
64257735Seric #endif
64358153Seric 
64458153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
64558153Seric # define SIGCHLD	SIGCLD
64658153Seric #endif
64758153Seric 
64858153Seric #ifndef STDIN_FILENO
64958153Seric #define STDIN_FILENO	0
65058153Seric #endif
65158153Seric 
65258153Seric #ifndef STDOUT_FILENO
65358153Seric #define STDOUT_FILENO	1
65458153Seric #endif
65558153Seric 
65658153Seric #ifndef STDERR_FILENO
65758153Seric #define STDERR_FILENO	2
65858153Seric #endif
65958689Seric 
66064072Seric #ifndef LOCK_SH
66164035Seric # define LOCK_SH	0x01	/* shared lock */
66264035Seric # define LOCK_EX	0x02	/* exclusive lock */
66364035Seric # define LOCK_NB	0x04	/* non-blocking lock */
66464035Seric # define LOCK_UN	0x08	/* unlock */
66564035Seric #endif
66658692Seric 
66764035Seric #ifndef SIG_ERR
66864035Seric # define SIG_ERR	((void (*)()) -1)
66958689Seric #endif
67058702Seric 
67164500Seric #ifndef WEXITSTATUS
67264500Seric # define WEXITSTATUS(st)	(((st) >> 8) & 0377)
67364500Seric #endif
67464500Seric #ifndef WIFEXITED
67564500Seric # define WIFEXITED(st)		(((st) & 0377) == 0)
67664500Seric #endif
67764500Seric 
67864561Seric #ifndef SIGFUNC_DEFINED
67964561Seric typedef void		(*sigfunc_t) __P((int));
68064561Seric #endif
68164561Seric 
68258702Seric /*
68358702Seric **  Size of tobuf (deliver.c)
68458702Seric **	Tweak this to match your syslog implementation.  It will have to
68558702Seric **	allow for the extra information printed.
68658702Seric */
68758702Seric 
68858702Seric #ifndef TOBUFSIZE
68958702Seric # define TOBUFSIZE (1024 - 256)
69058702Seric #endif
69160219Seric 
69260219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */
69360219Seric # ifndef FORK
69460219Seric # define FORK		vfork		/* function to call to fork mailer */
69560219Seric # endif
696