xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 64718)
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*64718Seric  *	@(#)conf.h	8.38 (Berkeley) 10/15/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 */
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 
7664032Seric # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
7764032Seric 
7863902Seric /**********************************************************************
7959023Seric **  Operating system configuration.
8059023Seric **
8159023Seric **	Unless you are porting to a new OS, you shouldn't have to
8259023Seric **	change these.
8363902Seric **********************************************************************/
8456823Seric 
8563787Seric /*
8663787Seric **  Per-Operating System defines
8763787Seric */
8863787Seric 
8964314Seric 
9063902Seric /*
9163902Seric **  HP-UX -- tested for 8.07
9263902Seric */
9363902Seric 
9459348Seric # ifdef __hpux
9563787Seric # define SYSTEM5	1	/* include all the System V defines */
9664035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
9764314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
9864035Seric # define HASSETREUID	1	/* has setreuid(2) call */
9963902Seric # define setreuid(r, e)		setresuid(r, e, -1)
10063962Seric # define LA_TYPE	LA_FLOAT
10163962Seric # define _PATH_UNIX	"/hp-ux"
10264358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
10356823Seric # endif
10456823Seric 
10564314Seric 
10663902Seric /*
10763902Seric **  IBM AIX 3.x -- actually tested for 3.2.3
10863902Seric */
10963902Seric 
11060224Seric # ifdef _AIX3
11164035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
11260219Seric # define FORK		fork	/* no vfork primitive available */
11364494Seric # undef  SETPROCTITLE		/* setproctitle confuses AIX */
11460219Seric # endif
11560219Seric 
11664314Seric 
11763902Seric /*
11863902Seric **  Silicon Graphics IRIX
11963902Seric **
12063965Seric **	Compiles on 4.0.1.
12163902Seric */
12263902Seric 
12363753Seric # ifdef IRIX
12464035Seric # define HASSETREUID	1	/* has setreuid(2) call */
12564035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
12664314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
12763753Seric # define FORK		fork	/* no vfork primitive available */
12864562Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
12964155Seric # define setpgid	BSDsetpgrp
13063937Seric # define GIDSET_T	gid_t
13163753Seric # endif
13263753Seric 
13363902Seric 
13463902Seric /*
13563902Seric **  SunOS
13663902Seric */
13763902Seric 
13863787Seric #if defined(sun) && !defined(BSD)
13959074Seric 
14063962Seric # define LA_TYPE	LA_INT
14164035Seric # define HASSETREUID	1	/* has setreuid(2) call */
14264035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
14360564Seric 
14460602Seric # ifdef SOLARIS
14563902Seric 			/* Solaris 2.x (a.k.a. SunOS 5.x) */
14663949Seric #  define SYSTEM5	1	/* use System V definitions */
14763977Seric #  define setreuid(r, e)	seteuid(e)
14863787Seric #  include <sys/time.h>
14964125Seric #  define gethostbyname	__switch_gethostbyname	/* get working version */
15064125Seric #  define gethostbyaddr	__switch_gethostbyaddr	/* get working version */
15163962Seric #  define _PATH_UNIX	"/kernel/unix"
15263962Seric #  ifndef _PATH_SENDMAILCF
15363962Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
15464072Seric #  endif
15564072Seric #  ifndef _PATH_SENDMAILPID
15663962Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
15763962Seric #  endif
15863787Seric 
15960602Seric # else
16063787Seric 			/* SunOS 4.1.x */
16160602Seric #  define HASSTATFS	1	/* has the statfs(2) syscall */
16264035Seric /* #  define HASFLOCK	1	/* has flock(2) call */
16360564Seric #  include <vfork.h>
16463787Seric 
16560564Seric # endif
16659023Seric #endif
16759023Seric 
168*64718Seric /*
169*64718Seric ** DG/UX 5.4.2
170*64718Seric */
17164314Seric 
172*64718Seric #ifdef	DGUX
173*64718Seric # define SYSTEM5	1
174*64718Seric # define LA_TYPE	LA_SUBR
175*64718Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
176*64718Seric # define HASSETREUID	1	/* has setreuid(2) call */
177*64718Seric # define HASUNAME	1	/* use System V uname(2) system call */
178*64718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
179*64718Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
180*64718Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
181*64718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
182*64718Seric # undef SETPROCTITLE
183*64718Seric # define inet_addr	dgux_inet_addr
184*64718Seric extern long	dgux_inet_addr();
185*64718Seric #endif
186*64718Seric 
187*64718Seric 
18863902Seric /*
18963902Seric **  Digital Ultrix 4.2A or 4.3
19064264Seric **
19164264Seric **	Apparently, fcntl locking is broken on 4.2A, in that locks are
19264264Seric **	not dropped when the process exits.  This causes major problems,
19364264Seric **	so flock is the only alternative.
19463902Seric */
19563902Seric 
19660564Seric #ifdef ultrix
19760564Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
19864035Seric # define HASSETREUID	1	/* has setreuid(2) call */
19963962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
20064035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
20164264Seric # define HASFLOCK	1	/* has flock(2) call */
20263962Seric # define LA_TYPE	LA_INT
20363962Seric # define LA_AVENRUN	"avenrun"
20464358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
20560564Seric #endif
20660564Seric 
20764314Seric 
20863902Seric /*
20963902Seric **  OSF/1 (tested on Alpha)
21063902Seric */
21163902Seric 
21263787Seric #ifdef __osf__
21364314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
21463962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
21564035Seric # define HASSETREUID	1	/* has setreuid(2) call */
21664035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
21764035Seric /* # define HASFLOCK	1	/* has flock(2) call */
21863962Seric # define LA_TYPE	LA_INT
21959287Seric #endif
22059287Seric 
22164314Seric 
22263902Seric /*
22363902Seric **  NeXTstep
22463902Seric */
22563902Seric 
22664076Seric #ifdef NeXT
22764035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
22864035Seric # define HASFLOCK	1	/* has flock(2) call */
22964125Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
23064314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
23164563Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
23263753Seric # define sleep		sleepX
23364155Seric # define setpgid	setpgrp
23464295Seric # ifndef LA_TYPE
23564295Seric #  define LA_TYPE	LA_MACH
23664295Seric # endif
23764500Seric # ifndef _POSIX_SOURCE
23864035Seric typedef int		pid_t;
23964500Seric #  undef WEXITSTATUS
24064500Seric #  undef WIFEXITED
24164500Seric # endif
24264072Seric # ifndef _PATH_SENDMAILCF
24364072Seric #  define _PATH_SENDMAILCF	"/etc/sendmail/sendmail.cf"
24464072Seric # endif
24564072Seric # ifndef _PATH_SENDMAILPID
24664072Seric #  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
24764072Seric # endif
24859288Seric #endif
24959288Seric 
25064314Seric 
25163902Seric /*
25263962Seric **  4.4 BSD
25363902Seric */
25463902Seric 
25560568Seric #ifdef BSD4_4
25664072Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
25764314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
25860568Seric # include <sys/cdefs.h>
25963838Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
26064072Seric # ifndef LA_TYPE
26164072Seric #  define LA_TYPE	LA_SUBR
26264072Seric # endif
26360568Seric #endif
26460568Seric 
26564314Seric 
26663902Seric /*
26763969Seric **  4.3 BSD -- this is for very old systems
26863969Seric **
26963969Seric **	You'll also have to install a new resolver library.
27063969Seric **	I don't guarantee that support for this environment is complete.
27163969Seric */
27263969Seric 
27363969Seric #ifdef oldBSD43
27463969Seric # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
27563969Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
27663970Seric # define ARBPTR_T	char *
27764155Seric # define setpgid	setpgrp
27863969Seric # ifndef LA_TYPE
27963969Seric #  define LA_TYPE	LA_FLOAT
28063969Seric # endif
28163969Seric # ifndef _PATH_SENDMAILCF
28263969Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
28363969Seric # endif
28464358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
28563969Seric #endif
28663969Seric 
28764314Seric 
28863969Seric /*
28963902Seric **  SCO Unix
29063902Seric */
29163902Seric 
29263838Seric #ifdef _SCO_unix_
29363838Seric # define SYSTEM5	1	/* include all the System V defines */
29464035Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
29563987Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
29663838Seric # define FORK		fork
29763838Seric # define MAXPATHLEN	PATHSIZE
298*64718Seric # define LA_TYPE	LA_SHORT
29963838Seric #endif
30063838Seric 
30164314Seric 
30263962Seric /*
30363962Seric **  ConvexOS 11.0 and later
30463962Seric */
30563962Seric 
30663962Seric #ifdef _CONVEX_SOURCE
30763977Seric # define BSD		1	/* include all the BSD defines */
30863977Seric # define HASUNAME	1	/* use System V uname(2) system call */
30963962Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
31063962Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
31163977Seric # define NEEDGETOPT	1	/* need replacement for getopt(3) */
31263962Seric # define LA_TYPE	LA_FLOAT
31364032Seric # undef IDENTPROTO
31463962Seric #endif
31563962Seric 
31664314Seric 
31763962Seric /*
31863962Seric **  RISC/os 4.51
31963962Seric **
32063962Seric **	Untested...
32163962Seric */
32263962Seric 
32363965Seric #ifdef RISCOS
32463962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
32564035Seric /* # define HASFLOCK	1	/* has flock(2) call */
32663962Seric # define LA_TYPE	LA_INT
32763962Seric # define LA_AVENRUN	"avenrun"
32863962Seric # define _PATH_UNIX	"/unix"
32963962Seric #endif
33063962Seric 
33164314Seric 
33264155Seric /*
33364155Seric **  Linux 0.99pl10 and above...
33464155Seric **	From Karl London <karl@borg.demon.co.uk>.
33564155Seric */
33664155Seric 
33764155Seric #ifdef linux
33864155Seric # define BSD		1	/* pretend to be BSD based today */
33964155Seric # undef  NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
34064155Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
34164380Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
34264155Seric # ifndef LA_TYPE
34364155Seric #  define LA_TYPE	LA_FLOAT
34464155Seric # endif
34564155Seric #endif
34664155Seric 
34764155Seric 
34864345Seric /*
34964345Seric **  DELL SVR4 Issue 2.2, and others
35064345Seric **	From Kimmo Suominen <kim@grendel.lut.fi>
35164345Seric **
35264345Seric **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
35364345Seric **	defined, and the definitions conflict.
35464345Seric */
35564345Seric 
35664345Seric #ifdef DELL_SVR4
35764345Seric # define SYSTEM5	1
35864345Seric /* # define setreuid(r, e)	seteuid(e) */
35964345Seric /* # include <sys/time.h> */
36064345Seric # define _PATH_UNIX	"/unix"
36164345Seric # ifndef _PATH_SENDMAILCF
36264345Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
36364345Seric # endif
36464345Seric # ifndef _PATH_SENDMAILPID
36564345Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
36664345Seric # endif
36764345Seric #endif
36864345Seric 
36964345Seric 
37064380Seric /*
37164380Seric **  Apple A/UX 3.0
37264380Seric */
37364345Seric 
37464380Seric #ifdef _AUX_SOURCE
37564380Seric # define BSD			/* has BSD routines */
37664380Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
37764380Seric # define HASUNAME	1	/* use System V uname(2) system call */
37864380Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
37964380Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
38064561Seric # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
381*64718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
38264380Seric # define FORK		fork
38364380Seric # ifndef _PATH_SENDMAILCF
38464380Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
38564380Seric # endif
38664380Seric # ifndef LA_TYPE
38764380Seric #  define LA_TYPE	LA_ZERO
38864380Seric # endif
38964560Seric # undef WIFEXITED
39064560Seric # undef WEXITSTATUS
39164380Seric #endif
39264380Seric 
39364380Seric 
39464705Seric /*
39564705Seric **  Encore UMAX V
39664705Seric **
39764705Seric **	Not extensively tested.
39864705Seric */
39964380Seric 
40064705Seric #ifdef UMAXV
40164705Seric # include <limits.h>
40264705Seric # define HASUNAME	1	/* use System V uname(2) system call */
40364705Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
40464705Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
40564705Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
40664705Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
40764705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
40864705Seric # define FORK		fork	/* no vfork(2) primitive available */
40964705Seric # define MAXPATHLEN	PATH_MAX
41064705Seric extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
41164705Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
41264705Seric # undef WIFEXITED
41364705Seric # undef WEXITSTATUS
41464705Seric #endif
41564705Seric 
41664705Seric 
41764705Seric 
41863902Seric /**********************************************************************
41963787Seric **  End of Per-Operating System defines
42063902Seric **********************************************************************/
42163787Seric 
42263949Seric /**********************************************************************
42363949Seric **  More general defines
42463949Seric **********************************************************************/
42563949Seric 
42663962Seric /* general BSD defines */
42763962Seric #ifdef BSD
42864035Seric # define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
42964035Seric # define HASSETREUID	1	/* has setreuid(2) call */
43064035Seric # define HASINITGROUPS	1	/* has initgroups(2) call */
43164035Seric # define HASFLOCK	1	/* has flock(2) call */
43263962Seric #endif
43363962Seric 
43463787Seric /* general System V defines */
43563787Seric # ifdef SYSTEM5
43663949Seric # define HASUNAME	1	/* use System V uname(2) system call */
43763949Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
43864705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
43963962Seric # ifndef LA_TYPE
44063962Seric #  define LA_TYPE	LA_INT
44163962Seric # endif
44263949Seric # define bcopy(s, d, l)		(memmove((d), (s), (l)))
44363949Seric # define bzero(d, l)		(memset((d), '\0', (l)))
44463949Seric # define bcmp(s, d, l)		(memcmp((s), (d), (l)))
44563787Seric # endif
44663787Seric 
44763949Seric /* general "standard C" defines */
44863949Seric #if defined(__STDC__) || defined(SYSTEM5)
44963949Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
45063949Seric #endif
45163949Seric 
45263949Seric /* general POSIX defines */
45363949Seric #ifdef _POSIX_VERSION
454*64718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
455*64718Seric # define HASWAITPID	1	/* has Posix waitpid(2) call */
45663949Seric #endif
45763949Seric 
45863787Seric /*
45963937Seric **  If no type for argument two of getgroups call is defined, assume
46063937Seric **  it's an integer -- unfortunately, there seem to be several choices
46163937Seric **  here.
46263937Seric */
46363937Seric 
46463937Seric #ifndef GIDSET_T
46563937Seric # define GIDSET_T	int
46663937Seric #endif
46763937Seric 
46864439Seric 
46964439Seric /**********************************************************************
47059023Seric **  Remaining definitions should never have to be changed.  They are
47159023Seric **  primarily to provide back compatibility for older systems -- for
47259287Seric **  example, it includes some POSIX compatibility definitions
47364439Seric **********************************************************************/
47459023Seric 
47559388Seric /* System 5 compatibility */
47659388Seric #ifndef S_ISREG
47759388Seric #define S_ISREG(foo)	((foo & S_IFREG) == S_IFREG)
47859388Seric #endif
47959388Seric #ifndef S_IWGRP
48059388Seric #define S_IWGRP		020
48159388Seric #endif
48259388Seric #ifndef S_IWOTH
48359388Seric #define S_IWOTH		002
48459388Seric #endif
48559388Seric 
48659023Seric /*
48750537Seric **  Older systems don't have this error code -- it should be in
48850537Seric **  /usr/include/sysexits.h.
48950537Seric */
49050537Seric 
49150537Seric # ifndef EX_CONFIG
49250537Seric # define EX_CONFIG	78	/* configuration error */
49350537Seric # endif
49456852Seric 
495*64718Seric /* pseudo-code used in server SMTP */
496*64718Seric # define EX_QUIT	22	/* drop out of server immediately */
497*64718Seric 
498*64718Seric 
49963993Seric /*
50063993Seric **  These are used in a few cases where we need some special
50163993Seric **  error codes, but where the system doesn't provide something
50263993Seric **  reasonable.  They are printed in errstring.
50363993Seric */
50463993Seric 
50563993Seric #ifndef E_PSEUDOBASE
50663993Seric # define E_PSEUDOBASE	256
50763993Seric #endif
50863993Seric 
50963993Seric #define EOPENTIMEOUT	(E_PSEUDOBASE + 0)	/* timeout on open */
51063993Seric #define E_DNSBASE	(E_PSEUDOBASE + 20)	/* base for DNS h_errno */
51163993Seric 
51263970Seric /* type of arbitrary pointer */
51363970Seric #ifndef ARBPTR_T
51463970Seric # define ARBPTR_T	void *
51563970Seric #endif
51663970Seric 
51760568Seric #ifndef __P
51860568Seric # include "cdefs.h"
51960568Seric #endif
52060568Seric 
52156852Seric /*
52258778Seric **  Do some required dependencies
52358778Seric */
52458778Seric 
52558778Seric #if defined(NETINET) || defined(NETISO)
52659107Seric # define SMTP		1	/* enable user and server SMTP */
52759107Seric # define QUEUE		1	/* enable queueing */
52859107Seric # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
52958778Seric #endif
53058778Seric 
53158778Seric 
53258778Seric /*
53356852Seric **  Arrange to use either varargs or stdargs
53456852Seric */
53556852Seric 
53656852Seric # ifdef __STDC__
53756852Seric 
53856852Seric # include <stdarg.h>
53956852Seric 
54056852Seric # define VA_LOCAL_DECL	va_list ap;
54156852Seric # define VA_START(f)	va_start(ap, f)
54256852Seric # define VA_END		va_end(ap)
54356852Seric 
54456852Seric # else
54556852Seric 
54656852Seric # include <varargs.h>
54756852Seric 
54856852Seric # define VA_LOCAL_DECL	va_list ap;
54956852Seric # define VA_START(f)	va_start(ap)
55056852Seric # define VA_END		va_end(ap)
55156852Seric 
55256852Seric # endif
55357631Seric 
55457943Seric #ifdef HASUNAME
55557631Seric # include <sys/utsname.h>
55657631Seric # ifdef newstr
55757631Seric #  undef newstr
55857631Seric # endif
55957943Seric #else /* ! HASUNAME */
56057631Seric # define NODE_LENGTH 32
56157631Seric struct utsname
56257631Seric {
56357631Seric 	char nodename[NODE_LENGTH+1];
56457631Seric };
56557943Seric #endif /* HASUNAME */
56657642Seric 
56763838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_)
56863838Seric # define MAXHOSTNAMELEN	256
56957735Seric #endif
57058153Seric 
57158153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
57258153Seric # define SIGCHLD	SIGCLD
57358153Seric #endif
57458153Seric 
57558153Seric #ifndef STDIN_FILENO
57658153Seric #define STDIN_FILENO	0
57758153Seric #endif
57858153Seric 
57958153Seric #ifndef STDOUT_FILENO
58058153Seric #define STDOUT_FILENO	1
58158153Seric #endif
58258153Seric 
58358153Seric #ifndef STDERR_FILENO
58458153Seric #define STDERR_FILENO	2
58558153Seric #endif
58658689Seric 
58764072Seric #ifndef LOCK_SH
58864035Seric # define LOCK_SH	0x01	/* shared lock */
58964035Seric # define LOCK_EX	0x02	/* exclusive lock */
59064035Seric # define LOCK_NB	0x04	/* non-blocking lock */
59164035Seric # define LOCK_UN	0x08	/* unlock */
59264035Seric #endif
59358692Seric 
59464035Seric #ifndef SIG_ERR
59564035Seric # define SIG_ERR	((void (*)()) -1)
59658689Seric #endif
59758702Seric 
59864500Seric #ifndef WEXITSTATUS
59964500Seric # define WEXITSTATUS(st)	(((st) >> 8) & 0377)
60064500Seric #endif
60164500Seric #ifndef WIFEXITED
60264500Seric # define WIFEXITED(st)		(((st) & 0377) == 0)
60364500Seric #endif
60464500Seric 
60564561Seric #ifndef SIGFUNC_DEFINED
60664561Seric typedef void		(*sigfunc_t) __P((int));
60764561Seric #endif
60864561Seric 
60958702Seric /*
61058702Seric **  Size of tobuf (deliver.c)
61158702Seric **	Tweak this to match your syslog implementation.  It will have to
61258702Seric **	allow for the extra information printed.
61358702Seric */
61458702Seric 
61558702Seric #ifndef TOBUFSIZE
61658702Seric # define TOBUFSIZE (1024 - 256)
61758702Seric #endif
61860219Seric 
61960219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */
62060219Seric # ifndef FORK
62160219Seric # define FORK		vfork		/* function to call to fork mailer */
62260219Seric # endif
623