xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 65105)
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*65105Seric  *	@(#)conf.h	8.62 (Berkeley) 12/12/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 */
4157143Seric 
4257143Seric # ifndef QUEUESIZE
4357143Seric # define QUEUESIZE	1000		/* max # of jobs per queue run */
4457143Seric # endif
4557143Seric 
4663902Seric /**********************************************************************
479147Seric **  Compilation options.
4825673Seric **
4925673Seric **	#define these if they are available; comment them out otherwise.
5063902Seric **********************************************************************/
519147Seric 
5225673Seric # define LOG		1	/* enable logging */
5325673Seric # define UGLYUUCP	1	/* output ugly UUCP From lines */
5464813Seric # define NETUNIX	1	/* include unix domain support */
5558778Seric # define NETINET	1	/* include internet support */
5625673Seric # define SETPROCTITLE	1	/* munge argv to display current status */
5735651Seric # define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
5853735Seric # define MATCHGECOS	1	/* match user names from gecos field */
5963753Seric # define XDEBUG		1	/* enable extended debugging */
6036483Sbostic 
6156337Seric # ifdef NEWDB
6256337Seric # define USERDB		1	/* look in user database (requires NEWDB) */
6356337Seric # endif
6456337Seric 
6564032Seric /*
6664032Seric **  Due to a "feature" in some operating systems such as Ultrix 4.3 and
6764032Seric **  HPUX 8.0, if you receive a "No route to host" message (ICMP message
6864032Seric **  ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
6964032Seric **  are closed.  Some firewalls return this error if you try to connect
7064032Seric **  to the IDENT port (113), so you can't receive email from these hosts
7164032Seric **  on these systems.  The firewall really should use a more specific
7264032Seric **  message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.  This
7364032Seric **  will get #undefed below as needed.
7464032Seric */
7564032Seric 
7664929Seric #ifndef IDENTPROTO
7764032Seric # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
7864929Seric #endif
7964032Seric 
8064944Seric /*
8164944Seric **  Most systems have symbolic links today, so default them on.  You
8264944Seric **  can turn them off by #undef'ing this below.
8364944Seric */
8464944Seric 
8564944Seric # define HASLSTAT	1	/* has lstat(2) call */
8664944Seric 
8764962Seric /*
8864962Seric **  General "standard C" defines.
8964962Seric **
9064962Seric **	These may be undone later, to cope with systems that claim to
9164962Seric **	be Standard C but aren't.  Gcc is the biggest offender -- it
9264962Seric **	doesn't realize that the library is part of the language.
9364962Seric **
9464962Seric **	Life would be much easier if we could get rid of this sort
9564962Seric **	of bozo problems.
9664962Seric */
9764962Seric 
9864962Seric #ifdef __STDC__
9964962Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
10064962Seric #endif
10164962Seric 
10263902Seric /**********************************************************************
10359023Seric **  Operating system configuration.
10459023Seric **
10559023Seric **	Unless you are porting to a new OS, you shouldn't have to
10659023Seric **	change these.
10763902Seric **********************************************************************/
10856823Seric 
10963787Seric /*
11063787Seric **  Per-Operating System defines
11163787Seric */
11263787Seric 
11364314Seric 
11463902Seric /*
11563902Seric **  HP-UX -- tested for 8.07
11663902Seric */
11763902Seric 
11859348Seric # ifdef __hpux
11964727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */
12064727Seric # undef m_flags
12163787Seric # define SYSTEM5	1	/* include all the System V defines */
12264035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
12364314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
12464035Seric # define HASSETREUID	1	/* has setreuid(2) call */
12563902Seric # define setreuid(r, e)		setresuid(r, e, -1)
12663962Seric # define LA_TYPE	LA_FLOAT
12763962Seric # define _PATH_UNIX	"/hp-ux"
12864358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
12956823Seric # endif
13056823Seric 
13164314Seric 
13263902Seric /*
13363902Seric **  IBM AIX 3.x -- actually tested for 3.2.3
13463902Seric */
13563902Seric 
13660224Seric # ifdef _AIX3
13764035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
13864840Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
13964840Seric # define HASUNAME	1	/* use System V uname(2) system call */
14060219Seric # define FORK		fork	/* no vfork primitive available */
14164494Seric # undef  SETPROCTITLE		/* setproctitle confuses AIX */
14260219Seric # endif
14360219Seric 
14464314Seric 
14563902Seric /*
14663902Seric **  Silicon Graphics IRIX
14763902Seric **
14863965Seric **	Compiles on 4.0.1.
14963902Seric */
15063902Seric 
15163753Seric # ifdef IRIX
15264727Seric # include <sys/sysmacros.h>
15364035Seric # define HASSETREUID	1	/* has setreuid(2) call */
15464035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
15564314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
15663753Seric # define FORK		fork	/* no vfork primitive available */
15764562Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
15864155Seric # define setpgid	BSDsetpgrp
15963937Seric # define GIDSET_T	gid_t
16063753Seric # endif
16163753Seric 
16263902Seric 
16363902Seric /*
16464813Seric **  SunOS and Solaris
16564813Seric **
16664813Seric **	Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
16764813Seric **	Solaris 2.2 (a.k.a. SunOS 5.2).
16863902Seric */
16963902Seric 
17063787Seric #if defined(sun) && !defined(BSD)
17159074Seric 
17263962Seric # define LA_TYPE	LA_INT
17364035Seric # define HASSETREUID	1	/* has setreuid(2) call */
17464035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
17564813Seric # define HASUNAME	1	/* use System V uname(2) system call */
17660564Seric 
17764842Seric # ifdef SOLARIS_2_3
17864842Seric #  define SOLARIS
17964842Seric # endif
18064842Seric 
18160602Seric # ifdef SOLARIS
18263902Seric 			/* Solaris 2.x (a.k.a. SunOS 5.x) */
18363949Seric #  define SYSTEM5	1	/* use System V definitions */
18463977Seric #  define setreuid(r, e)	seteuid(e)
18563787Seric #  include <sys/time.h>
18664832Seric #  define gethostbyname	solaris_gethostbyname	/* get working version */
18764832Seric #  define gethostbyaddr	solaris_gethostbyaddr	/* get working version */
18863962Seric #  define _PATH_UNIX	"/kernel/unix"
18963962Seric #  ifndef _PATH_SENDMAILCF
19063962Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
19164072Seric #  endif
19264072Seric #  ifndef _PATH_SENDMAILPID
19363962Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
19463962Seric #  endif
19563787Seric 
19660602Seric # else
197*65105Seric 			/* SunOS 4.0.3 or 4.1.x */
19860602Seric #  define HASSTATFS	1	/* has the statfs(2) syscall */
19964831Seric #  define HASFLOCK	1	/* has flock(2) call */
20060564Seric #  include <vfork.h>
20163787Seric 
202*65105Seric #  ifdef SUNOS403
203*65105Seric 			/* special tweaking for SunOS 4.0.3 */
204*65105Seric #   include <malloc.h>
205*65105Seric #   define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
206*65105Seric #   define WAITUNION	1	/* use "union wait" as wait argument type */
207*65105Seric #   undef WIFEXITED
208*65105Seric #   undef WEXITSTATUS
209*65105Seric #   undef HASUNAME
210*65105Seric #   define setpgid	setpgrp
211*65105Seric typedef int		pid_t;
212*65105Seric extern char		*getenv();
213*65105Seric 
214*65105Seric #  endif
21560564Seric # endif
21659023Seric #endif
21759023Seric 
21864718Seric /*
21964813Seric **  DG/UX
22064813Seric **
22164813Seric **	Tested on 5.4.2
22264718Seric */
22364314Seric 
22464718Seric #ifdef	DGUX
22564718Seric # define SYSTEM5	1
22664718Seric # define LA_TYPE	LA_SUBR
22764718Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
22864718Seric # define HASSETREUID	1	/* has setreuid(2) call */
22964718Seric # define HASUNAME	1	/* use System V uname(2) system call */
23064718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
23164718Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
23264718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
23364718Seric # undef SETPROCTITLE
23464813Seric 
23564813Seric /* these include files must be included early on DG/UX */
23664813Seric # include <netinet/in.h>
23764813Seric # include <arpa/inet.h>
23864813Seric 
23964718Seric # define inet_addr	dgux_inet_addr
24064718Seric extern long	dgux_inet_addr();
24164718Seric #endif
24264718Seric 
24364718Seric 
24463902Seric /*
24563902Seric **  Digital Ultrix 4.2A or 4.3
24664264Seric **
24764264Seric **	Apparently, fcntl locking is broken on 4.2A, in that locks are
24864264Seric **	not dropped when the process exits.  This causes major problems,
24964264Seric **	so flock is the only alternative.
25063902Seric */
25163902Seric 
25260564Seric #ifdef ultrix
25360564Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
25464035Seric # define HASSETREUID	1	/* has setreuid(2) call */
25563962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
25664035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
25764264Seric # define HASFLOCK	1	/* has flock(2) call */
25863962Seric # define LA_TYPE	LA_INT
25963962Seric # define LA_AVENRUN	"avenrun"
26064358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
26160564Seric #endif
26260564Seric 
26364314Seric 
26463902Seric /*
26563902Seric **  OSF/1 (tested on Alpha)
26663902Seric */
26763902Seric 
26863787Seric #ifdef __osf__
26964314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
27063962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
27164035Seric # define HASSETREUID	1	/* has setreuid(2) call */
27264035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
27364831Seric # define HASFLOCK	1	/* has flock(2) call */
27463962Seric # define LA_TYPE	LA_INT
27564813Seric # ifndef _PATH_SENDMAILPID
27664813Seric #  define _PATH_SENDMAILPID	"/var/run/sendmial.pid"
27764813Seric # endif
27859287Seric #endif
27959287Seric 
28064314Seric 
28163902Seric /*
28263902Seric **  NeXTstep
28363902Seric */
28463902Seric 
28564076Seric #ifdef NeXT
28664035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
28764035Seric # define HASFLOCK	1	/* has flock(2) call */
28864125Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
28964314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
29064563Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
29163753Seric # define sleep		sleepX
29264155Seric # define setpgid	setpgrp
29364295Seric # ifndef LA_TYPE
29464295Seric #  define LA_TYPE	LA_MACH
29564295Seric # endif
29664500Seric # ifndef _POSIX_SOURCE
29764035Seric typedef int		pid_t;
29864500Seric #  undef WEXITSTATUS
29964500Seric #  undef WIFEXITED
30064500Seric # endif
30164072Seric # ifndef _PATH_SENDMAILCF
30264072Seric #  define _PATH_SENDMAILCF	"/etc/sendmail/sendmail.cf"
30364072Seric # endif
30464072Seric # ifndef _PATH_SENDMAILPID
30564072Seric #  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
30664072Seric # endif
30759288Seric #endif
30859288Seric 
30964314Seric 
31063902Seric /*
31163962Seric **  4.4 BSD
31264831Seric **
31364831Seric **	See also BSD defines.
31463902Seric */
31563902Seric 
31660568Seric #ifdef BSD4_4
31764072Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
31864314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
31960568Seric # include <sys/cdefs.h>
32063838Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
32164072Seric # ifndef LA_TYPE
32264072Seric #  define LA_TYPE	LA_SUBR
32364072Seric # endif
32460568Seric #endif
32560568Seric 
32664314Seric 
32763902Seric /*
32865049Seric **  386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions)
32964733Seric **
33064733Seric **  4.3BSD clone, closer to 4.4BSD
33164831Seric **
33264831Seric **	See also BSD defines.
33364733Seric */
33464733Seric 
33565049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
33664733Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
33764733Seric # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
33864733Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
33964733Seric # include <sys/cdefs.h>
34064733Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
34164733Seric # ifndef LA_TYPE
34264733Seric #  define LA_TYPE	LA_SUBR
34364733Seric # endif
34464733Seric #endif
34564733Seric 
34664733Seric 
34764733Seric /*
34864813Seric **  Mach386
34964813Seric **
35064813Seric **	For mt Xinu's Mach386 system.
35164813Seric */
35264813Seric 
35364813Seric #if defined(MACH) && defined(i386)
35464813Seric # define MACH386	1
35564813Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
35664813Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
35764813Seric # define HASFLOCK	1	/* has flock(2) call */
35864813Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
35964813Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
36064813Seric # define NEEDSTRTOL	1	/* need the strtol() function */
36164813Seric # define setpgid	setpgrp
36264813Seric # ifndef LA_TYPE
36364813Seric #  define LA_TYPE	LA_FLOAT
36464813Seric # endif
36564962Seric # undef HASSETVBUF		/* don't actually have setvbuf(3) */
36664813Seric # undef WEXITSTATUS
36764813Seric # undef WIFEXITED
36864813Seric # ifndef _PATH_SENDMAILCF
36964813Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
37064813Seric # endif
37164813Seric # ifndef _PATH_SENDMAILPID
37264813Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
37364813Seric # endif
37464813Seric #endif
37564813Seric 
37664813Seric 
37764813Seric /*
37863969Seric **  4.3 BSD -- this is for very old systems
37963969Seric **
38063969Seric **	You'll also have to install a new resolver library.
38163969Seric **	I don't guarantee that support for this environment is complete.
38263969Seric */
38363969Seric 
38463969Seric #ifdef oldBSD43
38563969Seric # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
38663969Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
38763970Seric # define ARBPTR_T	char *
38864155Seric # define setpgid	setpgrp
38963969Seric # ifndef LA_TYPE
39063969Seric #  define LA_TYPE	LA_FLOAT
39163969Seric # endif
39263969Seric # ifndef _PATH_SENDMAILCF
39363969Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
39463969Seric # endif
39564358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
39664834Seric # undef WEXITSTATUS
39764834Seric # undef WIFEXITED
39864834Seric typedef short		pid_t;
39964834Seric extern int		errno;
40063969Seric #endif
40163969Seric 
40264314Seric 
40363969Seric /*
40463902Seric **  SCO Unix
40565087Seric **
40665087Seric **	This includes two parts -- the first is for SCO Open Server 3.2v4
40765087Seric **	(contributed by Philippe Brand <phb@colombo.telesys-innov.fr>).
40865087Seric **	The second is, I believe, for an older version.
40963902Seric */
41063902Seric 
41165087Seric #ifdef _SCO_unix_4_2
41265087Seric # define _SCO_unix_
41365087Seric # define HASSETREUID	1	/* has setreuid(2) call */
41465087Seric # define _PATH_UNIX	"/unix"
41565087Seric # ifndef _PATH_SENDMAILCF
41665087Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
41765087Seric # endif
41865087Seric # ifndef _PATH_SENDMAILPID
41965087Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
42065087Seric # endif
42165087Seric #endif
42265087Seric 
42363838Seric #ifdef _SCO_unix_
42463838Seric # define SYSTEM5	1	/* include all the System V defines */
42564035Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
42663987Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
42763838Seric # define FORK		fork
42863838Seric # define MAXPATHLEN	PATHSIZE
42964718Seric # define LA_TYPE	LA_SHORT
43064813Seric # undef NETUNIX			/* no unix domain socket support */
43163838Seric #endif
43263838Seric 
43364314Seric 
43463962Seric /*
43563962Seric **  ConvexOS 11.0 and later
43663962Seric */
43763962Seric 
43863962Seric #ifdef _CONVEX_SOURCE
43963977Seric # define BSD		1	/* include all the BSD defines */
44063977Seric # define HASUNAME	1	/* use System V uname(2) system call */
44163962Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
44263962Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
44363977Seric # define NEEDGETOPT	1	/* need replacement for getopt(3) */
44463962Seric # define LA_TYPE	LA_FLOAT
44564032Seric # undef IDENTPROTO
44663962Seric #endif
44763962Seric 
44864314Seric 
44963962Seric /*
45064999Seric **  RISC/os 4.52
45163962Seric **
45264999Seric **	Gives a ton of warning messages, but otherwise compiles.
45363962Seric */
45463962Seric 
45563965Seric #ifdef RISCOS
45664999Seric 
45763962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
45864831Seric # define HASFLOCK	1	/* has flock(2) call */
45964999Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
46064999Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
46163962Seric # define LA_TYPE	LA_INT
46263962Seric # define LA_AVENRUN	"avenrun"
46363962Seric # define _PATH_UNIX	"/unix"
46464999Seric # undef WIFEXITED
46564999Seric 
46664999Seric # define setpgid	setpgrp
46764999Seric 
46864999Seric extern int		errno;
46964999Seric typedef int		pid_t;
47064999Seric #define			SIGFUNC_DEFINED
47164999Seric typedef int		(*sigfunc_t)();
47264999Seric extern char		*getenv();
47364999Seric extern void		*malloc();
47464999Seric 
47563962Seric #endif
47663962Seric 
47764314Seric 
47864155Seric /*
47964155Seric **  Linux 0.99pl10 and above...
48064155Seric **	From Karl London <karl@borg.demon.co.uk>.
48164155Seric */
48264155Seric 
48364770Seric #ifdef __linux__
48464155Seric # define BSD		1	/* pretend to be BSD based today */
48564155Seric # undef  NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
48664155Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
48764380Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
48864155Seric # ifndef LA_TYPE
48964155Seric #  define LA_TYPE	LA_FLOAT
49064155Seric # endif
49164763Seric # include <sys/sysmacros.h>
49265046Seric # define GIDSET_T	gid_t
49364155Seric #endif
49464155Seric 
49564155Seric 
49664345Seric /*
49764345Seric **  DELL SVR4 Issue 2.2, and others
49864345Seric **	From Kimmo Suominen <kim@grendel.lut.fi>
49964345Seric **
50064345Seric **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
50164345Seric **	defined, and the definitions conflict.
50264924Seric **
50364924Seric **	Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid
50464924Seric **	trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A
50564924Seric **	(SVR4.0/386 version 3.0).
50664345Seric */
50764345Seric 
50864345Seric #ifdef DELL_SVR4
50964345Seric # define SYSTEM5	1
51064924Seric # define HASSETREUID	1	/* has seteuid(2) call & working saved uids */
51164924Seric # define setreuid(r, e)	seteuid(e)
51264345Seric /* # include <sys/time.h> */
51364345Seric # define _PATH_UNIX	"/unix"
51464345Seric # ifndef _PATH_SENDMAILCF
51564345Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
51664345Seric # endif
51764345Seric # ifndef _PATH_SENDMAILPID
51864345Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
51964345Seric # endif
520*65105Seric # ifndef SYSLOG_BUFSIZE
521*65105Seric #  define SYSLOG_BUFSIZE	128
522*65105Seric # endif
52364345Seric #endif
52464345Seric 
52564345Seric 
52664380Seric /*
52764380Seric **  Apple A/UX 3.0
52864380Seric */
52964345Seric 
53064380Seric #ifdef _AUX_SOURCE
53164729Seric # include <sys/sysmacros.h>
53264380Seric # define BSD			/* has BSD routines */
53364380Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
53464380Seric # define HASUNAME	1	/* use System V uname(2) system call */
53564380Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
53664380Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
53764561Seric # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
53864718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
53964380Seric # define FORK		fork
54064380Seric # ifndef _PATH_SENDMAILCF
54164380Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
54264380Seric # endif
54364380Seric # ifndef LA_TYPE
54464380Seric #  define LA_TYPE	LA_ZERO
54564380Seric # endif
54664560Seric # undef WIFEXITED
54764560Seric # undef WEXITSTATUS
54864380Seric #endif
54964380Seric 
55064380Seric 
55164705Seric /*
55264705Seric **  Encore UMAX V
55364705Seric **
55464705Seric **	Not extensively tested.
55564705Seric */
55664380Seric 
55764705Seric #ifdef UMAXV
55864705Seric # include <limits.h>
55964705Seric # define HASUNAME	1	/* use System V uname(2) system call */
56064705Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
56164705Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
56264705Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
56364705Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
56464705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
56564705Seric # define FORK		fork	/* no vfork(2) primitive available */
56664705Seric # define MAXPATHLEN	PATH_MAX
56764705Seric extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
56864705Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
56964705Seric # undef WIFEXITED
57064705Seric # undef WEXITSTATUS
57164705Seric #endif
57264705Seric 
57364705Seric 
57464939Seric /*
57564939Seric **  Stardent Titan 3000 running TitanOS 4.2.
57664939Seric **
57764939Seric **	Must be compiled in "cc -43" mode.
57864939Seric **
57964944Seric **	From Kate Hedstrom <kate@ahab.rutgers.edu>.
58064939Seric **
58164939Seric **	Note the tweaking below after the BSD defines are set.
58264939Seric */
58364705Seric 
58464939Seric #ifdef titan
58564939Seric # define setpgid	setpgrp
58664939Seric typedef int		pid_t;
58764939Seric # undef WIFEXITED
58864939Seric # undef WEXITSTATUS
58964939Seric #endif
59064939Seric 
59164939Seric 
59264962Seric /*
59364962Seric **  Sequent DYNIX 3.2.0
59464962Seric **
59564962Seric **	From Jim Davis <jdavis@cs.arizona.edu>.
59664962Seric */
59764939Seric 
59864962Seric #ifdef sequent
59964962Seric # define BSD		1
60064962Seric # define HASUNSETENV	1
60164962Seric # define BSD4_3		1	/* to get signal() in conf.c */
60264962Seric # define WAITUNION	1
60364962Seric # define LA_TYPE	LA_FLOAT
60464962Seric # ifdef	_POSIX_VERSION
60564962Seric #  undef _POSIX_VERSION		/* set in <unistd.h> */
60664962Seric # endif
60764962Seric # undef HASSETVBUF		/* don't actually have setvbuf(3) */
60864962Seric # define setpgid	setpgrp
60964962Seric 
61064962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */
61164962Seric # undef	WIFEXITED
61264962Seric # define WIFEXITED(s)	(((union wait*)&(s))->w_stopval != WSTOPPED && \
61364962Seric 			 ((union wait*)&(s))->w_termsig == 0)
61464962Seric # define WEXITSTATUS(s)	(((union wait*)&(s))->w_retcode)
61564962Seric typedef int		pid_t;
61664962Seric # define isgraph(c)	(isprint(c) && (c != ' '))
61764962Seric 
61864962Seric # ifndef _PATH_UNIX
61964962Seric #  define _PATH_UNIX	"/dynix"
62064962Seric # endif
62164962Seric # ifndef _PATH_SENDMAILCF
62264962Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
62364962Seric # endif
62464962Seric 
62564962Seric #endif
62664962Seric 
62764962Seric 
62864962Seric 
62964962Seric 
63063902Seric /**********************************************************************
63163787Seric **  End of Per-Operating System defines
63263902Seric **********************************************************************/
63363787Seric 
63463949Seric /**********************************************************************
63563949Seric **  More general defines
63663949Seric **********************************************************************/
63763949Seric 
63863962Seric /* general BSD defines */
63963962Seric #ifdef BSD
64064035Seric # define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
64164035Seric # define HASSETREUID	1	/* has setreuid(2) call */
64264035Seric # define HASINITGROUPS	1	/* has initgroups(2) call */
64364035Seric # define HASFLOCK	1	/* has flock(2) call */
64463962Seric #endif
64563962Seric 
64663787Seric /* general System V defines */
64763787Seric # ifdef SYSTEM5
64864813Seric # include <sys/sysmacros.h>
64963949Seric # define HASUNAME	1	/* use System V uname(2) system call */
65063949Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
65164705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
65264962Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
65363962Seric # ifndef LA_TYPE
65463962Seric #  define LA_TYPE	LA_INT
65563962Seric # endif
65663949Seric # define bcopy(s, d, l)		(memmove((d), (s), (l)))
65763949Seric # define bzero(d, l)		(memset((d), '\0', (l)))
65863949Seric # define bcmp(s, d, l)		(memcmp((s), (d), (l)))
65963787Seric # endif
66063787Seric 
66163949Seric /* general POSIX defines */
66263949Seric #ifdef _POSIX_VERSION
66364718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
66464718Seric # define HASWAITPID	1	/* has Posix waitpid(2) call */
66563949Seric #endif
66663949Seric 
66763787Seric /*
66863937Seric **  If no type for argument two of getgroups call is defined, assume
66963937Seric **  it's an integer -- unfortunately, there seem to be several choices
67063937Seric **  here.
67163937Seric */
67263937Seric 
67363937Seric #ifndef GIDSET_T
67463937Seric # define GIDSET_T	int
67563937Seric #endif
67663937Seric 
67764939Seric /*
67864939Seric **  Tweaking for systems that (for example) claim to be BSD but
67964939Seric **  don't have all the standard BSD routines (boo hiss).
68064939Seric */
68164439Seric 
68264939Seric #ifdef titan
68364939Seric # undef HASINITGROUPS		/* doesn't have initgroups(3) call */
68464939Seric #endif
68564939Seric 
68664939Seric 
68764439Seric /**********************************************************************
68859023Seric **  Remaining definitions should never have to be changed.  They are
68959023Seric **  primarily to provide back compatibility for older systems -- for
69059287Seric **  example, it includes some POSIX compatibility definitions
69164439Seric **********************************************************************/
69259023Seric 
69359388Seric /* System 5 compatibility */
69459388Seric #ifndef S_ISREG
69564944Seric # define S_ISREG(foo)	((foo & S_IFMT) == S_IFREG)
69659388Seric #endif
69764944Seric #if !defined(S_ISLNK) && defined(S_IFLNK)
69864944Seric # define S_ISLNK(foo)	((foo & S_IFMT) == S_IFLNK)
69964944Seric #endif
70059388Seric #ifndef S_IWGRP
70159388Seric #define S_IWGRP		020
70259388Seric #endif
70359388Seric #ifndef S_IWOTH
70459388Seric #define S_IWOTH		002
70559388Seric #endif
70659388Seric 
70759023Seric /*
70850537Seric **  Older systems don't have this error code -- it should be in
70950537Seric **  /usr/include/sysexits.h.
71050537Seric */
71150537Seric 
71250537Seric # ifndef EX_CONFIG
71350537Seric # define EX_CONFIG	78	/* configuration error */
71450537Seric # endif
71556852Seric 
71664718Seric /* pseudo-code used in server SMTP */
71764718Seric # define EX_QUIT	22	/* drop out of server immediately */
71864718Seric 
71964718Seric 
72063993Seric /*
72163993Seric **  These are used in a few cases where we need some special
72263993Seric **  error codes, but where the system doesn't provide something
72363993Seric **  reasonable.  They are printed in errstring.
72463993Seric */
72563993Seric 
72663993Seric #ifndef E_PSEUDOBASE
72763993Seric # define E_PSEUDOBASE	256
72863993Seric #endif
72963993Seric 
73063993Seric #define EOPENTIMEOUT	(E_PSEUDOBASE + 0)	/* timeout on open */
73163993Seric #define E_DNSBASE	(E_PSEUDOBASE + 20)	/* base for DNS h_errno */
73263993Seric 
73363970Seric /* type of arbitrary pointer */
73463970Seric #ifndef ARBPTR_T
73563970Seric # define ARBPTR_T	void *
73663970Seric #endif
73763970Seric 
73860568Seric #ifndef __P
73960568Seric # include "cdefs.h"
74060568Seric #endif
74160568Seric 
74256852Seric /*
74358778Seric **  Do some required dependencies
74458778Seric */
74558778Seric 
74658778Seric #if defined(NETINET) || defined(NETISO)
74759107Seric # define SMTP		1	/* enable user and server SMTP */
74859107Seric # define QUEUE		1	/* enable queueing */
74959107Seric # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
75058778Seric #endif
75158778Seric 
75258778Seric 
75358778Seric /*
75456852Seric **  Arrange to use either varargs or stdargs
75556852Seric */
75656852Seric 
75756852Seric # ifdef __STDC__
75856852Seric 
75956852Seric # include <stdarg.h>
76056852Seric 
76156852Seric # define VA_LOCAL_DECL	va_list ap;
76256852Seric # define VA_START(f)	va_start(ap, f)
76356852Seric # define VA_END		va_end(ap)
76456852Seric 
76556852Seric # else
76656852Seric 
76756852Seric # include <varargs.h>
76856852Seric 
76956852Seric # define VA_LOCAL_DECL	va_list ap;
77056852Seric # define VA_START(f)	va_start(ap)
77156852Seric # define VA_END		va_end(ap)
77256852Seric 
77356852Seric # endif
77457631Seric 
77557943Seric #ifdef HASUNAME
77657631Seric # include <sys/utsname.h>
77757631Seric # ifdef newstr
77857631Seric #  undef newstr
77957631Seric # endif
78057943Seric #else /* ! HASUNAME */
78157631Seric # define NODE_LENGTH 32
78257631Seric struct utsname
78357631Seric {
78457631Seric 	char nodename[NODE_LENGTH+1];
78557631Seric };
78657943Seric #endif /* HASUNAME */
78757642Seric 
78863838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_)
78963838Seric # define MAXHOSTNAMELEN	256
79057735Seric #endif
79158153Seric 
79258153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
79358153Seric # define SIGCHLD	SIGCLD
79458153Seric #endif
79558153Seric 
79658153Seric #ifndef STDIN_FILENO
79758153Seric #define STDIN_FILENO	0
79858153Seric #endif
79958153Seric 
80058153Seric #ifndef STDOUT_FILENO
80158153Seric #define STDOUT_FILENO	1
80258153Seric #endif
80358153Seric 
80458153Seric #ifndef STDERR_FILENO
80558153Seric #define STDERR_FILENO	2
80658153Seric #endif
80758689Seric 
80864072Seric #ifndef LOCK_SH
80964035Seric # define LOCK_SH	0x01	/* shared lock */
81064035Seric # define LOCK_EX	0x02	/* exclusive lock */
81164035Seric # define LOCK_NB	0x04	/* non-blocking lock */
81264035Seric # define LOCK_UN	0x08	/* unlock */
81364035Seric #endif
81458692Seric 
81564035Seric #ifndef SIG_ERR
81664035Seric # define SIG_ERR	((void (*)()) -1)
81758689Seric #endif
81858702Seric 
81964500Seric #ifndef WEXITSTATUS
82064500Seric # define WEXITSTATUS(st)	(((st) >> 8) & 0377)
82164500Seric #endif
82264500Seric #ifndef WIFEXITED
82364500Seric # define WIFEXITED(st)		(((st) & 0377) == 0)
82464500Seric #endif
82564500Seric 
82664561Seric #ifndef SIGFUNC_DEFINED
82764561Seric typedef void		(*sigfunc_t) __P((int));
82864561Seric #endif
82964561Seric 
83065053Seric /* size of syslog buffer */
83165053Seric #ifndef SYSLOG_BUFSIZE
83265053Seric # define SYSLOG_BUFSIZE	1024
83365053Seric #endif
83465053Seric 
83558702Seric /*
83658702Seric **  Size of tobuf (deliver.c)
83758702Seric **	Tweak this to match your syslog implementation.  It will have to
83858702Seric **	allow for the extra information printed.
83958702Seric */
84058702Seric 
84158702Seric #ifndef TOBUFSIZE
84265053Seric # if (SYSLOG_BUFSIZE) > 512
84365053Seric #  define TOBUFSIZE	(SYSLOG_BUFSIZE - 256)
84465053Seric # else
84565053Seric #  define TOBUFSIZE	256
84665053Seric # endif
84758702Seric #endif
84860219Seric 
84965015Seric /*
85065015Seric **  Size of prescan buffer.
85165015Seric **	Despite comments in the _sendmail_ book, this probably should
85265015Seric **	not be changed; there are some hard-to-define dependencies.
85365015Seric */
85465015Seric 
85565015Seric # define PSBUFSIZE	(MAXNAME + MAXATOM)	/* size of prescan buffer */
85660219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */
85760219Seric # ifndef FORK
85860219Seric # define FORK		vfork		/* function to call to fork mailer */
85960219Seric # endif
86064929Seric 
86164929Seric #ifndef IDENTPROTO
86264929Seric # define IDENTPROTO	0		/* don't use RFC 1413 */
86364929Seric #endif
864