xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 64733)
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*64733Seric  *	@(#)conf.h	8.42 (Berkeley) 10/21/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
9564727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */
9664727Seric # undef m_flags
9763787Seric # define SYSTEM5	1	/* include all the System V defines */
9864035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
9964314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
10064035Seric # define HASSETREUID	1	/* has setreuid(2) call */
10163902Seric # define setreuid(r, e)		setresuid(r, e, -1)
10263962Seric # define LA_TYPE	LA_FLOAT
10363962Seric # define _PATH_UNIX	"/hp-ux"
10464358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
10556823Seric # endif
10656823Seric 
10764314Seric 
10863902Seric /*
10963902Seric **  IBM AIX 3.x -- actually tested for 3.2.3
11063902Seric */
11163902Seric 
11260224Seric # ifdef _AIX3
11364035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
11460219Seric # define FORK		fork	/* no vfork primitive available */
11564494Seric # undef  SETPROCTITLE		/* setproctitle confuses AIX */
11660219Seric # endif
11760219Seric 
11864314Seric 
11963902Seric /*
12063902Seric **  Silicon Graphics IRIX
12163902Seric **
12263965Seric **	Compiles on 4.0.1.
12363902Seric */
12463902Seric 
12563753Seric # ifdef IRIX
12664727Seric # include <sys/sysmacros.h>
12764035Seric # define HASSETREUID	1	/* has setreuid(2) call */
12864035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
12964314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
13063753Seric # define FORK		fork	/* no vfork primitive available */
13164562Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
13264155Seric # define setpgid	BSDsetpgrp
13363937Seric # define GIDSET_T	gid_t
13463753Seric # endif
13563753Seric 
13663902Seric 
13763902Seric /*
13863902Seric **  SunOS
13963902Seric */
14063902Seric 
14163787Seric #if defined(sun) && !defined(BSD)
14259074Seric 
14363962Seric # define LA_TYPE	LA_INT
14464035Seric # define HASSETREUID	1	/* has setreuid(2) call */
14564035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
14660564Seric 
14760602Seric # ifdef SOLARIS
14863902Seric 			/* Solaris 2.x (a.k.a. SunOS 5.x) */
14963949Seric #  define SYSTEM5	1	/* use System V definitions */
15063977Seric #  define setreuid(r, e)	seteuid(e)
15164728Seric #  include <sys/sysmacros.h>
15263787Seric #  include <sys/time.h>
15364125Seric #  define gethostbyname	__switch_gethostbyname	/* get working version */
15464125Seric #  define gethostbyaddr	__switch_gethostbyaddr	/* get working version */
15563962Seric #  define _PATH_UNIX	"/kernel/unix"
15663962Seric #  ifndef _PATH_SENDMAILCF
15763962Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
15864072Seric #  endif
15964072Seric #  ifndef _PATH_SENDMAILPID
16063962Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
16163962Seric #  endif
16263787Seric 
16360602Seric # else
16463787Seric 			/* SunOS 4.1.x */
16560602Seric #  define HASSTATFS	1	/* has the statfs(2) syscall */
16664035Seric /* #  define HASFLOCK	1	/* has flock(2) call */
16760564Seric #  include <vfork.h>
16863787Seric 
16960564Seric # endif
17059023Seric #endif
17159023Seric 
17264718Seric /*
17364718Seric ** DG/UX 5.4.2
17464718Seric */
17564314Seric 
17664718Seric #ifdef	DGUX
17764718Seric # define SYSTEM5	1
17864718Seric # define LA_TYPE	LA_SUBR
17964718Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
18064718Seric # define HASSETREUID	1	/* has setreuid(2) call */
18164718Seric # define HASUNAME	1	/* use System V uname(2) system call */
18264718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
18364718Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
18464718Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
18564718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
18664718Seric # undef SETPROCTITLE
18764718Seric # define inet_addr	dgux_inet_addr
18864718Seric extern long	dgux_inet_addr();
18964718Seric #endif
19064718Seric 
19164718Seric 
19263902Seric /*
19363902Seric **  Digital Ultrix 4.2A or 4.3
19464264Seric **
19564264Seric **	Apparently, fcntl locking is broken on 4.2A, in that locks are
19664264Seric **	not dropped when the process exits.  This causes major problems,
19764264Seric **	so flock is the only alternative.
19863902Seric */
19963902Seric 
20060564Seric #ifdef ultrix
20160564Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
20264035Seric # define HASSETREUID	1	/* has setreuid(2) call */
20363962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
20464035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
20564264Seric # define HASFLOCK	1	/* has flock(2) call */
20663962Seric # define LA_TYPE	LA_INT
20763962Seric # define LA_AVENRUN	"avenrun"
20864358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
20960564Seric #endif
21060564Seric 
21164314Seric 
21263902Seric /*
21363902Seric **  OSF/1 (tested on Alpha)
21463902Seric */
21563902Seric 
21663787Seric #ifdef __osf__
21764314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
21863962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
21964035Seric # define HASSETREUID	1	/* has setreuid(2) call */
22064035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
22164035Seric /* # define HASFLOCK	1	/* has flock(2) call */
22263962Seric # define LA_TYPE	LA_INT
22359287Seric #endif
22459287Seric 
22564314Seric 
22663902Seric /*
22763902Seric **  NeXTstep
22863902Seric */
22963902Seric 
23064076Seric #ifdef NeXT
23164035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
23264035Seric # define HASFLOCK	1	/* has flock(2) call */
23364125Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
23464314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
23564563Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
23663753Seric # define sleep		sleepX
23764155Seric # define setpgid	setpgrp
23864295Seric # ifndef LA_TYPE
23964295Seric #  define LA_TYPE	LA_MACH
24064295Seric # endif
24164500Seric # ifndef _POSIX_SOURCE
24264035Seric typedef int		pid_t;
24364500Seric #  undef WEXITSTATUS
24464500Seric #  undef WIFEXITED
24564500Seric # endif
24664072Seric # ifndef _PATH_SENDMAILCF
24764072Seric #  define _PATH_SENDMAILCF	"/etc/sendmail/sendmail.cf"
24864072Seric # endif
24964072Seric # ifndef _PATH_SENDMAILPID
25064072Seric #  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
25164072Seric # endif
25259288Seric #endif
25359288Seric 
25464314Seric 
25563902Seric /*
25663962Seric **  4.4 BSD
25763902Seric */
25863902Seric 
25960568Seric #ifdef BSD4_4
26064072Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
26164314Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
26260568Seric # include <sys/cdefs.h>
26363838Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
26464072Seric # ifndef LA_TYPE
26564072Seric #  define LA_TYPE	LA_SUBR
26664072Seric # endif
26760568Seric #endif
26860568Seric 
26964314Seric 
27063902Seric /*
271*64733Seric **  386BSD / FreeBSD 1.0E (works) / NetBSD (not tested)
272*64733Seric **
273*64733Seric **  4.3BSD clone, closer to 4.4BSD
274*64733Seric */
275*64733Seric 
276*64733Seric #ifdef __386BSD__
277*64733Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
278*64733Seric # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
279*64733Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
280*64733Seric # include <sys/cdefs.h>
281*64733Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
282*64733Seric # ifndef LA_TYPE
283*64733Seric #  define LA_TYPE	LA_SUBR
284*64733Seric # endif
285*64733Seric #endif
286*64733Seric 
287*64733Seric 
288*64733Seric /*
28963969Seric **  4.3 BSD -- this is for very old systems
29063969Seric **
29163969Seric **	You'll also have to install a new resolver library.
29263969Seric **	I don't guarantee that support for this environment is complete.
29363969Seric */
29463969Seric 
29563969Seric #ifdef oldBSD43
29663969Seric # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
29763969Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
29863970Seric # define ARBPTR_T	char *
29964155Seric # define setpgid	setpgrp
30063969Seric # ifndef LA_TYPE
30163969Seric #  define LA_TYPE	LA_FLOAT
30263969Seric # endif
30363969Seric # ifndef _PATH_SENDMAILCF
30463969Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
30563969Seric # endif
30664358Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
30763969Seric #endif
30863969Seric 
30964314Seric 
31063969Seric /*
31163902Seric **  SCO Unix
31263902Seric */
31363902Seric 
31463838Seric #ifdef _SCO_unix_
31563838Seric # define SYSTEM5	1	/* include all the System V defines */
31664035Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
31763987Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
31863838Seric # define FORK		fork
31963838Seric # define MAXPATHLEN	PATHSIZE
32064718Seric # define LA_TYPE	LA_SHORT
32163838Seric #endif
32263838Seric 
32364314Seric 
32463962Seric /*
32563962Seric **  ConvexOS 11.0 and later
32663962Seric */
32763962Seric 
32863962Seric #ifdef _CONVEX_SOURCE
32963977Seric # define BSD		1	/* include all the BSD defines */
33063977Seric # define HASUNAME	1	/* use System V uname(2) system call */
33163962Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
33263962Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
33363977Seric # define NEEDGETOPT	1	/* need replacement for getopt(3) */
33463962Seric # define LA_TYPE	LA_FLOAT
33564032Seric # undef IDENTPROTO
33663962Seric #endif
33763962Seric 
33864314Seric 
33963962Seric /*
34063962Seric **  RISC/os 4.51
34163962Seric **
34263962Seric **	Untested...
34363962Seric */
34463962Seric 
34563965Seric #ifdef RISCOS
34663962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
34764035Seric /* # define HASFLOCK	1	/* has flock(2) call */
34863962Seric # define LA_TYPE	LA_INT
34963962Seric # define LA_AVENRUN	"avenrun"
35063962Seric # define _PATH_UNIX	"/unix"
35163962Seric #endif
35263962Seric 
35364314Seric 
35464155Seric /*
35564155Seric **  Linux 0.99pl10 and above...
35664155Seric **	From Karl London <karl@borg.demon.co.uk>.
35764155Seric */
35864155Seric 
35964155Seric #ifdef linux
36064155Seric # define BSD		1	/* pretend to be BSD based today */
36164155Seric # undef  NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
36264155Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
36364380Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
36464155Seric # ifndef LA_TYPE
36564155Seric #  define LA_TYPE	LA_FLOAT
36664155Seric # endif
36764155Seric #endif
36864155Seric 
36964155Seric 
37064345Seric /*
37164345Seric **  DELL SVR4 Issue 2.2, and others
37264345Seric **	From Kimmo Suominen <kim@grendel.lut.fi>
37364345Seric **
37464345Seric **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
37564345Seric **	defined, and the definitions conflict.
37664345Seric */
37764345Seric 
37864345Seric #ifdef DELL_SVR4
37964345Seric # define SYSTEM5	1
38064345Seric /* # define setreuid(r, e)	seteuid(e) */
38164345Seric /* # include <sys/time.h> */
38264345Seric # define _PATH_UNIX	"/unix"
38364345Seric # ifndef _PATH_SENDMAILCF
38464345Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
38564345Seric # endif
38664345Seric # ifndef _PATH_SENDMAILPID
38764345Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
38864345Seric # endif
38964345Seric #endif
39064345Seric 
39164345Seric 
39264380Seric /*
39364380Seric **  Apple A/UX 3.0
39464380Seric */
39564345Seric 
39664380Seric #ifdef _AUX_SOURCE
39764729Seric # include <sys/sysmacros.h>
39864380Seric # define BSD			/* has BSD routines */
39964380Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
40064380Seric # define HASUNAME	1	/* use System V uname(2) system call */
40164380Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
40264380Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
40364561Seric # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
40464718Seric # undef IDENTPROTO		/* TCP/IP implementation is broken */
40564380Seric # define FORK		fork
40664380Seric # ifndef _PATH_SENDMAILCF
40764380Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
40864380Seric # endif
40964380Seric # ifndef LA_TYPE
41064380Seric #  define LA_TYPE	LA_ZERO
41164380Seric # endif
41264560Seric # undef WIFEXITED
41364560Seric # undef WEXITSTATUS
41464380Seric #endif
41564380Seric 
41664380Seric 
41764705Seric /*
41864705Seric **  Encore UMAX V
41964705Seric **
42064705Seric **	Not extensively tested.
42164705Seric */
42264380Seric 
42364705Seric #ifdef UMAXV
42464705Seric # include <limits.h>
42564705Seric # define HASUNAME	1	/* use System V uname(2) system call */
42664705Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
42764705Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
42864705Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
42964705Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
43064705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
43164705Seric # define FORK		fork	/* no vfork(2) primitive available */
43264705Seric # define MAXPATHLEN	PATH_MAX
43364705Seric extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
43464705Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
43564705Seric # undef WIFEXITED
43664705Seric # undef WEXITSTATUS
43764705Seric #endif
43864705Seric 
43964705Seric 
44064705Seric 
44163902Seric /**********************************************************************
44263787Seric **  End of Per-Operating System defines
44363902Seric **********************************************************************/
44463787Seric 
44563949Seric /**********************************************************************
44663949Seric **  More general defines
44763949Seric **********************************************************************/
44863949Seric 
44963962Seric /* general BSD defines */
45063962Seric #ifdef BSD
45164035Seric # define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
45264035Seric # define HASSETREUID	1	/* has setreuid(2) call */
45364035Seric # define HASINITGROUPS	1	/* has initgroups(2) call */
45464035Seric # define HASFLOCK	1	/* has flock(2) call */
45563962Seric #endif
45663962Seric 
45763787Seric /* general System V defines */
45863787Seric # ifdef SYSTEM5
45963949Seric # define HASUNAME	1	/* use System V uname(2) system call */
46063949Seric # define HASUSTAT	1	/* use System V ustat(2) syscall */
46164705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
46263962Seric # ifndef LA_TYPE
46363962Seric #  define LA_TYPE	LA_INT
46463962Seric # endif
46563949Seric # define bcopy(s, d, l)		(memmove((d), (s), (l)))
46663949Seric # define bzero(d, l)		(memset((d), '\0', (l)))
46763949Seric # define bcmp(s, d, l)		(memcmp((s), (d), (l)))
46863787Seric # endif
46963787Seric 
47063949Seric /* general "standard C" defines */
47163949Seric #if defined(__STDC__) || defined(SYSTEM5)
47263949Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
47363949Seric #endif
47463949Seric 
47563949Seric /* general POSIX defines */
47663949Seric #ifdef _POSIX_VERSION
47764718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
47864718Seric # define HASWAITPID	1	/* has Posix waitpid(2) call */
47963949Seric #endif
48063949Seric 
48163787Seric /*
48263937Seric **  If no type for argument two of getgroups call is defined, assume
48363937Seric **  it's an integer -- unfortunately, there seem to be several choices
48463937Seric **  here.
48563937Seric */
48663937Seric 
48763937Seric #ifndef GIDSET_T
48863937Seric # define GIDSET_T	int
48963937Seric #endif
49063937Seric 
49164439Seric 
49264439Seric /**********************************************************************
49359023Seric **  Remaining definitions should never have to be changed.  They are
49459023Seric **  primarily to provide back compatibility for older systems -- for
49559287Seric **  example, it includes some POSIX compatibility definitions
49664439Seric **********************************************************************/
49759023Seric 
49859388Seric /* System 5 compatibility */
49959388Seric #ifndef S_ISREG
50059388Seric #define S_ISREG(foo)	((foo & S_IFREG) == S_IFREG)
50159388Seric #endif
50259388Seric #ifndef S_IWGRP
50359388Seric #define S_IWGRP		020
50459388Seric #endif
50559388Seric #ifndef S_IWOTH
50659388Seric #define S_IWOTH		002
50759388Seric #endif
50859388Seric 
50959023Seric /*
51050537Seric **  Older systems don't have this error code -- it should be in
51150537Seric **  /usr/include/sysexits.h.
51250537Seric */
51350537Seric 
51450537Seric # ifndef EX_CONFIG
51550537Seric # define EX_CONFIG	78	/* configuration error */
51650537Seric # endif
51756852Seric 
51864718Seric /* pseudo-code used in server SMTP */
51964718Seric # define EX_QUIT	22	/* drop out of server immediately */
52064718Seric 
52164718Seric 
52263993Seric /*
52363993Seric **  These are used in a few cases where we need some special
52463993Seric **  error codes, but where the system doesn't provide something
52563993Seric **  reasonable.  They are printed in errstring.
52663993Seric */
52763993Seric 
52863993Seric #ifndef E_PSEUDOBASE
52963993Seric # define E_PSEUDOBASE	256
53063993Seric #endif
53163993Seric 
53263993Seric #define EOPENTIMEOUT	(E_PSEUDOBASE + 0)	/* timeout on open */
53363993Seric #define E_DNSBASE	(E_PSEUDOBASE + 20)	/* base for DNS h_errno */
53463993Seric 
53563970Seric /* type of arbitrary pointer */
53663970Seric #ifndef ARBPTR_T
53763970Seric # define ARBPTR_T	void *
53863970Seric #endif
53963970Seric 
54060568Seric #ifndef __P
54160568Seric # include "cdefs.h"
54260568Seric #endif
54360568Seric 
54456852Seric /*
54558778Seric **  Do some required dependencies
54658778Seric */
54758778Seric 
54858778Seric #if defined(NETINET) || defined(NETISO)
54959107Seric # define SMTP		1	/* enable user and server SMTP */
55059107Seric # define QUEUE		1	/* enable queueing */
55159107Seric # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
55258778Seric #endif
55358778Seric 
55458778Seric 
55558778Seric /*
55656852Seric **  Arrange to use either varargs or stdargs
55756852Seric */
55856852Seric 
55956852Seric # ifdef __STDC__
56056852Seric 
56156852Seric # include <stdarg.h>
56256852Seric 
56356852Seric # define VA_LOCAL_DECL	va_list ap;
56456852Seric # define VA_START(f)	va_start(ap, f)
56556852Seric # define VA_END		va_end(ap)
56656852Seric 
56756852Seric # else
56856852Seric 
56956852Seric # include <varargs.h>
57056852Seric 
57156852Seric # define VA_LOCAL_DECL	va_list ap;
57256852Seric # define VA_START(f)	va_start(ap)
57356852Seric # define VA_END		va_end(ap)
57456852Seric 
57556852Seric # endif
57657631Seric 
57757943Seric #ifdef HASUNAME
57857631Seric # include <sys/utsname.h>
57957631Seric # ifdef newstr
58057631Seric #  undef newstr
58157631Seric # endif
58257943Seric #else /* ! HASUNAME */
58357631Seric # define NODE_LENGTH 32
58457631Seric struct utsname
58557631Seric {
58657631Seric 	char nodename[NODE_LENGTH+1];
58757631Seric };
58857943Seric #endif /* HASUNAME */
58957642Seric 
59063838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_)
59163838Seric # define MAXHOSTNAMELEN	256
59257735Seric #endif
59358153Seric 
59458153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
59558153Seric # define SIGCHLD	SIGCLD
59658153Seric #endif
59758153Seric 
59858153Seric #ifndef STDIN_FILENO
59958153Seric #define STDIN_FILENO	0
60058153Seric #endif
60158153Seric 
60258153Seric #ifndef STDOUT_FILENO
60358153Seric #define STDOUT_FILENO	1
60458153Seric #endif
60558153Seric 
60658153Seric #ifndef STDERR_FILENO
60758153Seric #define STDERR_FILENO	2
60858153Seric #endif
60958689Seric 
61064072Seric #ifndef LOCK_SH
61164035Seric # define LOCK_SH	0x01	/* shared lock */
61264035Seric # define LOCK_EX	0x02	/* exclusive lock */
61364035Seric # define LOCK_NB	0x04	/* non-blocking lock */
61464035Seric # define LOCK_UN	0x08	/* unlock */
61564035Seric #endif
61658692Seric 
61764035Seric #ifndef SIG_ERR
61864035Seric # define SIG_ERR	((void (*)()) -1)
61958689Seric #endif
62058702Seric 
62164500Seric #ifndef WEXITSTATUS
62264500Seric # define WEXITSTATUS(st)	(((st) >> 8) & 0377)
62364500Seric #endif
62464500Seric #ifndef WIFEXITED
62564500Seric # define WIFEXITED(st)		(((st) & 0377) == 0)
62664500Seric #endif
62764500Seric 
62864561Seric #ifndef SIGFUNC_DEFINED
62964561Seric typedef void		(*sigfunc_t) __P((int));
63064561Seric #endif
63164561Seric 
63258702Seric /*
63358702Seric **  Size of tobuf (deliver.c)
63458702Seric **	Tweak this to match your syslog implementation.  It will have to
63558702Seric **	allow for the extra information printed.
63658702Seric */
63758702Seric 
63858702Seric #ifndef TOBUFSIZE
63958702Seric # define TOBUFSIZE (1024 - 256)
64058702Seric #endif
64160219Seric 
64260219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */
64360219Seric # ifndef FORK
64460219Seric # define FORK		vfork		/* function to call to fork mailer */
64560219Seric # endif
646