xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 64944)
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*64944Seric  *	@(#)conf.h	8.54 (Berkeley) 11/25/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 
7764929Seric #ifndef IDENTPROTO
7864032Seric # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
7964929Seric #endif
8064032Seric 
81*64944Seric /*
82*64944Seric **  Most systems have symbolic links today, so default them on.  You
83*64944Seric **  can turn them off by #undef'ing this below.
84*64944Seric */
85*64944Seric 
86*64944Seric # define HASLSTAT	1	/* has lstat(2) call */
87*64944Seric 
8863902Seric /**********************************************************************
8959023Seric **  Operating system configuration.
9059023Seric **
9159023Seric **	Unless you are porting to a new OS, you shouldn't have to
9259023Seric **	change these.
9363902Seric **********************************************************************/
9456823Seric 
9563787Seric /*
9663787Seric **  Per-Operating System defines
9763787Seric */
9863787Seric 
9964314Seric 
10063902Seric /*
10163902Seric **  HP-UX -- tested for 8.07
10263902Seric */
10363902Seric 
10459348Seric # ifdef __hpux
10564727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */
10664727Seric # undef m_flags
10763787Seric # define SYSTEM5	1	/* include all the System V defines */
10864035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
10964314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
11064035Seric # define HASSETREUID	1	/* has setreuid(2) call */
11163902Seric # define setreuid(r, e)		setresuid(r, e, -1)
11263962Seric # define LA_TYPE	LA_FLOAT
11363962Seric # define _PATH_UNIX	"/hp-ux"
11464358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
11556823Seric # endif
11656823Seric 
11764314Seric 
11863902Seric /*
11963902Seric **  IBM AIX 3.x -- actually tested for 3.2.3
12063902Seric */
12163902Seric 
12260224Seric # ifdef _AIX3
12364035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
12464840Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
12564840Seric # define HASUNAME	1	/* use System V uname(2) system call */
12660219Seric # define FORK		fork	/* no vfork primitive available */
12764494Seric # undef  SETPROCTITLE		/* setproctitle confuses AIX */
12860219Seric # endif
12960219Seric 
13064314Seric 
13163902Seric /*
13263902Seric **  Silicon Graphics IRIX
13363902Seric **
13463965Seric **	Compiles on 4.0.1.
13563902Seric */
13663902Seric 
13763753Seric # ifdef IRIX
13864727Seric # include <sys/sysmacros.h>
13964035Seric # define HASSETREUID	1	/* has setreuid(2) call */
14064035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
14164314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
14263753Seric # define FORK		fork	/* no vfork primitive available */
14364562Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
14464155Seric # define setpgid	BSDsetpgrp
14563937Seric # define GIDSET_T	gid_t
14663753Seric # endif
14763753Seric 
14863902Seric 
14963902Seric /*
15064813Seric **  SunOS and Solaris
15164813Seric **
15264813Seric **	Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
15364813Seric **	Solaris 2.2 (a.k.a. SunOS 5.2).
15463902Seric */
15563902Seric 
15663787Seric #if defined(sun) && !defined(BSD)
15759074Seric 
15863962Seric # define LA_TYPE	LA_INT
15964035Seric # define HASSETREUID	1	/* has setreuid(2) call */
16064035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
16164813Seric # define HASUNAME	1	/* use System V uname(2) system call */
16260564Seric 
16364842Seric # ifdef SOLARIS_2_3
16464842Seric #  define SOLARIS
16564842Seric # endif
16664842Seric 
16760602Seric # ifdef SOLARIS
16863902Seric 			/* Solaris 2.x (a.k.a. SunOS 5.x) */
16963949Seric #  define SYSTEM5	1	/* use System V definitions */
17063977Seric #  define setreuid(r, e)	seteuid(e)
17163787Seric #  include <sys/time.h>
17264832Seric #  define gethostbyname	solaris_gethostbyname	/* get working version */
17364832Seric #  define gethostbyaddr	solaris_gethostbyaddr	/* get working version */
17463962Seric #  define _PATH_UNIX	"/kernel/unix"
17563962Seric #  ifndef _PATH_SENDMAILCF
17663962Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
17764072Seric #  endif
17864072Seric #  ifndef _PATH_SENDMAILPID
17963962Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
18063962Seric #  endif
18163787Seric 
18260602Seric # else
18363787Seric 			/* SunOS 4.1.x */
18460602Seric #  define HASSTATFS	1	/* has the statfs(2) syscall */
18564831Seric #  define HASFLOCK	1	/* has flock(2) call */
18660564Seric #  include <vfork.h>
18763787Seric 
18860564Seric # endif
18959023Seric #endif
19059023Seric 
19164718Seric /*
19264813Seric **  DG/UX
19364813Seric **
19464813Seric **	Tested on 5.4.2
19564718Seric */
19664314Seric 
19764718Seric #ifdef	DGUX
19864718Seric # define SYSTEM5	1
19964718Seric # define LA_TYPE	LA_SUBR
20064718Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
20164718Seric # define HASSETREUID	1	/* has setreuid(2) call */
20264718Seric # define HASUNAME	1	/* use System V uname(2) system call */
20364718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
20464718Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
20564718Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
20664718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
20764718Seric # undef SETPROCTITLE
20864813Seric 
20964813Seric /* these include files must be included early on DG/UX */
21064813Seric # include <netinet/in.h>
21164813Seric # include <arpa/inet.h>
21264813Seric 
21364718Seric # define inet_addr	dgux_inet_addr
21464718Seric extern long	dgux_inet_addr();
21564718Seric #endif
21664718Seric 
21764718Seric 
21863902Seric /*
21963902Seric **  Digital Ultrix 4.2A or 4.3
22064264Seric **
22164264Seric **	Apparently, fcntl locking is broken on 4.2A, in that locks are
22264264Seric **	not dropped when the process exits.  This causes major problems,
22364264Seric **	so flock is the only alternative.
22463902Seric */
22563902Seric 
22660564Seric #ifdef ultrix
22760564Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
22864035Seric # define HASSETREUID	1	/* has setreuid(2) call */
22963962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
23064035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
23164264Seric # define HASFLOCK	1	/* has flock(2) call */
23263962Seric # define LA_TYPE	LA_INT
23363962Seric # define LA_AVENRUN	"avenrun"
23464358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
23560564Seric #endif
23660564Seric 
23764314Seric 
23863902Seric /*
23963902Seric **  OSF/1 (tested on Alpha)
24063902Seric */
24163902Seric 
24263787Seric #ifdef __osf__
24364314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
24463962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
24564035Seric # define HASSETREUID	1	/* has setreuid(2) call */
24664035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
24764831Seric # define HASFLOCK	1	/* has flock(2) call */
24863962Seric # define LA_TYPE	LA_INT
24964813Seric # ifndef _PATH_SENDMAILPID
25064813Seric #  define _PATH_SENDMAILPID	"/var/run/sendmial.pid"
25164813Seric # endif
25259287Seric #endif
25359287Seric 
25464314Seric 
25563902Seric /*
25663902Seric **  NeXTstep
25763902Seric */
25863902Seric 
25964076Seric #ifdef NeXT
26064035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
26164035Seric # define HASFLOCK	1	/* has flock(2) call */
26264125Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
26364314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
26464563Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
26563753Seric # define sleep		sleepX
26664155Seric # define setpgid	setpgrp
26764295Seric # ifndef LA_TYPE
26864295Seric #  define LA_TYPE	LA_MACH
26964295Seric # endif
27064500Seric # ifndef _POSIX_SOURCE
27164035Seric typedef int		pid_t;
27264500Seric #  undef WEXITSTATUS
27364500Seric #  undef WIFEXITED
27464500Seric # endif
27564072Seric # ifndef _PATH_SENDMAILCF
27664072Seric #  define _PATH_SENDMAILCF	"/etc/sendmail/sendmail.cf"
27764072Seric # endif
27864072Seric # ifndef _PATH_SENDMAILPID
27964072Seric #  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
28064072Seric # endif
28159288Seric #endif
28259288Seric 
28364314Seric 
28463902Seric /*
28563962Seric **  4.4 BSD
28664831Seric **
28764831Seric **	See also BSD defines.
28863902Seric */
28963902Seric 
29060568Seric #ifdef BSD4_4
29164072Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
29264314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
29360568Seric # include <sys/cdefs.h>
29463838Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
29564072Seric # ifndef LA_TYPE
29664072Seric #  define LA_TYPE	LA_SUBR
29764072Seric # endif
29860568Seric #endif
29960568Seric 
30064314Seric 
30163902Seric /*
30264733Seric **  386BSD / FreeBSD 1.0E (works) / NetBSD (not tested)
30364733Seric **
30464733Seric **  4.3BSD clone, closer to 4.4BSD
30564831Seric **
30664831Seric **	See also BSD defines.
30764733Seric */
30864733Seric 
30964733Seric #ifdef __386BSD__
31064733Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
31164733Seric # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
31264733Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
31364733Seric # include <sys/cdefs.h>
31464733Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
31564733Seric # ifndef LA_TYPE
31664733Seric #  define LA_TYPE	LA_SUBR
31764733Seric # endif
31864733Seric #endif
31964733Seric 
32064733Seric 
32164733Seric /*
32264813Seric **  Mach386
32364813Seric **
32464813Seric **	For mt Xinu's Mach386 system.
32564813Seric */
32664813Seric 
32764813Seric #if defined(MACH) && defined(i386)
32864813Seric # define MACH386	1
32964813Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
33064813Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
33164813Seric # define HASFLOCK	1	/* has flock(2) call */
33264813Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
33364813Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
33464813Seric # define NEEDSTRTOL	1	/* need the strtol() function */
33564813Seric # define setpgid	setpgrp
33664813Seric # ifndef LA_TYPE
33764813Seric #  define LA_TYPE	LA_FLOAT
33864813Seric # endif
33964813Seric # undef WEXITSTATUS
34064813Seric # undef WIFEXITED
34164813Seric # ifndef _PATH_SENDMAILCF
34264813Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
34364813Seric # endif
34464813Seric # ifndef _PATH_SENDMAILPID
34564813Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
34664813Seric # endif
34764813Seric #endif
34864813Seric 
34964813Seric 
35064813Seric /*
35163969Seric **  4.3 BSD -- this is for very old systems
35263969Seric **
35363969Seric **	You'll also have to install a new resolver library.
35463969Seric **	I don't guarantee that support for this environment is complete.
35563969Seric */
35663969Seric 
35763969Seric #ifdef oldBSD43
35863969Seric # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
35963969Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
36063970Seric # define ARBPTR_T	char *
36164155Seric # define setpgid	setpgrp
36263969Seric # ifndef LA_TYPE
36363969Seric #  define LA_TYPE	LA_FLOAT
36463969Seric # endif
36563969Seric # ifndef _PATH_SENDMAILCF
36663969Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
36763969Seric # endif
36864358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
36964834Seric # undef WEXITSTATUS
37064834Seric # undef WIFEXITED
37164834Seric typedef short		pid_t;
37264834Seric extern int		errno;
37363969Seric #endif
37463969Seric 
37564314Seric 
37663969Seric /*
37763902Seric **  SCO Unix
37863902Seric */
37963902Seric 
38063838Seric #ifdef _SCO_unix_
38163838Seric # define SYSTEM5	1	/* include all the System V defines */
38264035Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
38363987Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
38463838Seric # define FORK		fork
38563838Seric # define MAXPATHLEN	PATHSIZE
38664718Seric # define LA_TYPE	LA_SHORT
38764813Seric # undef NETUNIX			/* no unix domain socket support */
38863838Seric #endif
38963838Seric 
39064314Seric 
39163962Seric /*
39263962Seric **  ConvexOS 11.0 and later
39363962Seric */
39463962Seric 
39563962Seric #ifdef _CONVEX_SOURCE
39663977Seric # define BSD		1	/* include all the BSD defines */
39763977Seric # define HASUNAME	1	/* use System V uname(2) system call */
39863962Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
39963962Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
40063977Seric # define NEEDGETOPT	1	/* need replacement for getopt(3) */
40163962Seric # define LA_TYPE	LA_FLOAT
40264032Seric # undef IDENTPROTO
40363962Seric #endif
40463962Seric 
40564314Seric 
40663962Seric /*
40763962Seric **  RISC/os 4.51
40863962Seric **
40963962Seric **	Untested...
41063962Seric */
41163962Seric 
41263965Seric #ifdef RISCOS
41363962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
41464831Seric # define HASFLOCK	1	/* has flock(2) call */
41563962Seric # define LA_TYPE	LA_INT
41663962Seric # define LA_AVENRUN	"avenrun"
41763962Seric # define _PATH_UNIX	"/unix"
41863962Seric #endif
41963962Seric 
42064314Seric 
42164155Seric /*
42264155Seric **  Linux 0.99pl10 and above...
42364155Seric **	From Karl London <karl@borg.demon.co.uk>.
42464155Seric */
42564155Seric 
42664770Seric #ifdef __linux__
42764155Seric # define BSD		1	/* pretend to be BSD based today */
42864155Seric # undef  NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
42964155Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
43064380Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
43164155Seric # ifndef LA_TYPE
43264155Seric #  define LA_TYPE	LA_FLOAT
43364155Seric # endif
43464763Seric # include <sys/sysmacros.h>
43564155Seric #endif
43664155Seric 
43764155Seric 
43864345Seric /*
43964345Seric **  DELL SVR4 Issue 2.2, and others
44064345Seric **	From Kimmo Suominen <kim@grendel.lut.fi>
44164345Seric **
44264345Seric **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
44364345Seric **	defined, and the definitions conflict.
44464924Seric **
44564924Seric **	Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid
44664924Seric **	trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A
44764924Seric **	(SVR4.0/386 version 3.0).
44864345Seric */
44964345Seric 
45064345Seric #ifdef DELL_SVR4
45164345Seric # define SYSTEM5	1
45264924Seric # define HASSETREUID	1	/* has seteuid(2) call & working saved uids */
45364924Seric # define setreuid(r, e)	seteuid(e)
45464345Seric /* # include <sys/time.h> */
45564345Seric # define _PATH_UNIX	"/unix"
45664345Seric # ifndef _PATH_SENDMAILCF
45764345Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
45864345Seric # endif
45964345Seric # ifndef _PATH_SENDMAILPID
46064345Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
46164345Seric # endif
46264345Seric #endif
46364345Seric 
46464345Seric 
46564380Seric /*
46664380Seric **  Apple A/UX 3.0
46764380Seric */
46864345Seric 
46964380Seric #ifdef _AUX_SOURCE
47064729Seric # include <sys/sysmacros.h>
47164380Seric # define BSD			/* has BSD routines */
47264380Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
47364380Seric # define HASUNAME	1	/* use System V uname(2) system call */
47464380Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
47564380Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
47664561Seric # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
47764718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
47864380Seric # define FORK		fork
47964380Seric # ifndef _PATH_SENDMAILCF
48064380Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
48164380Seric # endif
48264380Seric # ifndef LA_TYPE
48364380Seric #  define LA_TYPE	LA_ZERO
48464380Seric # endif
48564560Seric # undef WIFEXITED
48664560Seric # undef WEXITSTATUS
48764380Seric #endif
48864380Seric 
48964380Seric 
49064705Seric /*
49164705Seric **  Encore UMAX V
49264705Seric **
49364705Seric **	Not extensively tested.
49464705Seric */
49564380Seric 
49664705Seric #ifdef UMAXV
49764705Seric # include <limits.h>
49864705Seric # define HASUNAME	1	/* use System V uname(2) system call */
49964705Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
50064705Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
50164705Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
50264705Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
50364705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
50464705Seric # define FORK		fork	/* no vfork(2) primitive available */
50564705Seric # define MAXPATHLEN	PATH_MAX
50664705Seric extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
50764705Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
50864705Seric # undef WIFEXITED
50964705Seric # undef WEXITSTATUS
51064705Seric #endif
51164705Seric 
51264705Seric 
51364939Seric /*
51464939Seric **  Stardent Titan 3000 running TitanOS 4.2.
51564939Seric **
51664939Seric **	Must be compiled in "cc -43" mode.
51764939Seric **
518*64944Seric **	From Kate Hedstrom <kate@ahab.rutgers.edu>.
51964939Seric **
52064939Seric **	Note the tweaking below after the BSD defines are set.
52164939Seric */
52264705Seric 
52364939Seric #ifdef titan
52464939Seric # define setpgid	setpgrp
52564939Seric typedef int		pid_t;
52664939Seric # undef WIFEXITED
52764939Seric # undef WEXITSTATUS
52864939Seric #endif
52964939Seric 
53064939Seric 
53164939Seric 
53263902Seric /**********************************************************************
53363787Seric **  End of Per-Operating System defines
53463902Seric **********************************************************************/
53563787Seric 
53663949Seric /**********************************************************************
53763949Seric **  More general defines
53863949Seric **********************************************************************/
53963949Seric 
54063962Seric /* general BSD defines */
54163962Seric #ifdef BSD
54264035Seric # define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
54364035Seric # define HASSETREUID	1	/* has setreuid(2) call */
54464035Seric # define HASINITGROUPS	1	/* has initgroups(2) call */
54564035Seric # define HASFLOCK	1	/* has flock(2) call */
54663962Seric #endif
54763962Seric 
54863787Seric /* general System V defines */
54963787Seric # ifdef SYSTEM5
55064813Seric # include <sys/sysmacros.h>
55163949Seric # define HASUNAME	1	/* use System V uname(2) system call */
55263949Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
55364705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
55463962Seric # ifndef LA_TYPE
55563962Seric #  define LA_TYPE	LA_INT
55663962Seric # endif
55763949Seric # define bcopy(s, d, l)		(memmove((d), (s), (l)))
55863949Seric # define bzero(d, l)		(memset((d), '\0', (l)))
55963949Seric # define bcmp(s, d, l)		(memcmp((s), (d), (l)))
56063787Seric # endif
56163787Seric 
56263949Seric /* general "standard C" defines */
56364813Seric #if (defined(__STDC__) && !defined(MACH386)) || defined(SYSTEM5)
56463949Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
56563949Seric #endif
56663949Seric 
56763949Seric /* general POSIX defines */
56863949Seric #ifdef _POSIX_VERSION
56964718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
57064718Seric # define HASWAITPID	1	/* has Posix waitpid(2) call */
57163949Seric #endif
57263949Seric 
57363787Seric /*
57463937Seric **  If no type for argument two of getgroups call is defined, assume
57563937Seric **  it's an integer -- unfortunately, there seem to be several choices
57663937Seric **  here.
57763937Seric */
57863937Seric 
57963937Seric #ifndef GIDSET_T
58063937Seric # define GIDSET_T	int
58163937Seric #endif
58263937Seric 
58364939Seric /*
58464939Seric **  Tweaking for systems that (for example) claim to be BSD but
58564939Seric **  don't have all the standard BSD routines (boo hiss).
58664939Seric */
58764439Seric 
58864939Seric #ifdef titan
58964939Seric # undef HASINITGROUPS		/* doesn't have initgroups(3) call */
59064939Seric #endif
59164939Seric 
59264939Seric 
59364439Seric /**********************************************************************
59459023Seric **  Remaining definitions should never have to be changed.  They are
59559023Seric **  primarily to provide back compatibility for older systems -- for
59659287Seric **  example, it includes some POSIX compatibility definitions
59764439Seric **********************************************************************/
59859023Seric 
59959388Seric /* System 5 compatibility */
60059388Seric #ifndef S_ISREG
601*64944Seric # define S_ISREG(foo)	((foo & S_IFMT) == S_IFREG)
60259388Seric #endif
603*64944Seric #if !defined(S_ISLNK) && defined(S_IFLNK)
604*64944Seric # define S_ISLNK(foo)	((foo & S_IFMT) == S_IFLNK)
605*64944Seric #endif
60659388Seric #ifndef S_IWGRP
60759388Seric #define S_IWGRP		020
60859388Seric #endif
60959388Seric #ifndef S_IWOTH
61059388Seric #define S_IWOTH		002
61159388Seric #endif
61259388Seric 
61359023Seric /*
61450537Seric **  Older systems don't have this error code -- it should be in
61550537Seric **  /usr/include/sysexits.h.
61650537Seric */
61750537Seric 
61850537Seric # ifndef EX_CONFIG
61950537Seric # define EX_CONFIG	78	/* configuration error */
62050537Seric # endif
62156852Seric 
62264718Seric /* pseudo-code used in server SMTP */
62364718Seric # define EX_QUIT	22	/* drop out of server immediately */
62464718Seric 
62564718Seric 
62663993Seric /*
62763993Seric **  These are used in a few cases where we need some special
62863993Seric **  error codes, but where the system doesn't provide something
62963993Seric **  reasonable.  They are printed in errstring.
63063993Seric */
63163993Seric 
63263993Seric #ifndef E_PSEUDOBASE
63363993Seric # define E_PSEUDOBASE	256
63463993Seric #endif
63563993Seric 
63663993Seric #define EOPENTIMEOUT	(E_PSEUDOBASE + 0)	/* timeout on open */
63763993Seric #define E_DNSBASE	(E_PSEUDOBASE + 20)	/* base for DNS h_errno */
63863993Seric 
63963970Seric /* type of arbitrary pointer */
64063970Seric #ifndef ARBPTR_T
64163970Seric # define ARBPTR_T	void *
64263970Seric #endif
64363970Seric 
64460568Seric #ifndef __P
64560568Seric # include "cdefs.h"
64660568Seric #endif
64760568Seric 
64856852Seric /*
64958778Seric **  Do some required dependencies
65058778Seric */
65158778Seric 
65258778Seric #if defined(NETINET) || defined(NETISO)
65359107Seric # define SMTP		1	/* enable user and server SMTP */
65459107Seric # define QUEUE		1	/* enable queueing */
65559107Seric # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
65658778Seric #endif
65758778Seric 
65858778Seric 
65958778Seric /*
66056852Seric **  Arrange to use either varargs or stdargs
66156852Seric */
66256852Seric 
66356852Seric # ifdef __STDC__
66456852Seric 
66556852Seric # include <stdarg.h>
66656852Seric 
66756852Seric # define VA_LOCAL_DECL	va_list ap;
66856852Seric # define VA_START(f)	va_start(ap, f)
66956852Seric # define VA_END		va_end(ap)
67056852Seric 
67156852Seric # else
67256852Seric 
67356852Seric # include <varargs.h>
67456852Seric 
67556852Seric # define VA_LOCAL_DECL	va_list ap;
67656852Seric # define VA_START(f)	va_start(ap)
67756852Seric # define VA_END		va_end(ap)
67856852Seric 
67956852Seric # endif
68057631Seric 
68157943Seric #ifdef HASUNAME
68257631Seric # include <sys/utsname.h>
68357631Seric # ifdef newstr
68457631Seric #  undef newstr
68557631Seric # endif
68657943Seric #else /* ! HASUNAME */
68757631Seric # define NODE_LENGTH 32
68857631Seric struct utsname
68957631Seric {
69057631Seric 	char nodename[NODE_LENGTH+1];
69157631Seric };
69257943Seric #endif /* HASUNAME */
69357642Seric 
69463838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_)
69563838Seric # define MAXHOSTNAMELEN	256
69657735Seric #endif
69758153Seric 
69858153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
69958153Seric # define SIGCHLD	SIGCLD
70058153Seric #endif
70158153Seric 
70258153Seric #ifndef STDIN_FILENO
70358153Seric #define STDIN_FILENO	0
70458153Seric #endif
70558153Seric 
70658153Seric #ifndef STDOUT_FILENO
70758153Seric #define STDOUT_FILENO	1
70858153Seric #endif
70958153Seric 
71058153Seric #ifndef STDERR_FILENO
71158153Seric #define STDERR_FILENO	2
71258153Seric #endif
71358689Seric 
71464072Seric #ifndef LOCK_SH
71564035Seric # define LOCK_SH	0x01	/* shared lock */
71664035Seric # define LOCK_EX	0x02	/* exclusive lock */
71764035Seric # define LOCK_NB	0x04	/* non-blocking lock */
71864035Seric # define LOCK_UN	0x08	/* unlock */
71964035Seric #endif
72058692Seric 
72164035Seric #ifndef SIG_ERR
72264035Seric # define SIG_ERR	((void (*)()) -1)
72358689Seric #endif
72458702Seric 
72564500Seric #ifndef WEXITSTATUS
72664500Seric # define WEXITSTATUS(st)	(((st) >> 8) & 0377)
72764500Seric #endif
72864500Seric #ifndef WIFEXITED
72964500Seric # define WIFEXITED(st)		(((st) & 0377) == 0)
73064500Seric #endif
73164500Seric 
73264561Seric #ifndef SIGFUNC_DEFINED
73364561Seric typedef void		(*sigfunc_t) __P((int));
73464561Seric #endif
73564561Seric 
73658702Seric /*
73758702Seric **  Size of tobuf (deliver.c)
73858702Seric **	Tweak this to match your syslog implementation.  It will have to
73958702Seric **	allow for the extra information printed.
74058702Seric */
74158702Seric 
74258702Seric #ifndef TOBUFSIZE
74358702Seric # define TOBUFSIZE (1024 - 256)
74458702Seric #endif
74560219Seric 
74660219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */
74760219Seric # ifndef FORK
74860219Seric # define FORK		vfork		/* function to call to fork mailer */
74960219Seric # endif
75064929Seric 
75164929Seric #ifndef IDENTPROTO
75264929Seric # define IDENTPROTO	0		/* don't use RFC 1413 */
75364929Seric #endif
754