xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 63753)
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*63753Seric  *	@(#)conf.h	8.2 (Berkeley) 07/11/93
933728Sbostic  */
109147Seric 
1122726Sdist /*
1222726Sdist **  CONF.H -- All user-configurable parameters for sendmail
1322726Sdist */
149147Seric 
1557232Seric # include <sys/param.h>
1659389Seric # include <sys/stat.h>
1758689Seric # include <fcntl.h>
1857232Seric 
199147Seric /*
209147Seric **  Table sizes, etc....
219147Seric **	There shouldn't be much need to change these....
229147Seric */
239147Seric 
2459303Seric # define MAXLINE	2048		/* max line length */
2524945Seric # define MAXNAME	256		/* max length of a name */
269147Seric # define MAXPV		40		/* max # of parms to mailers */
2759303Seric # define MAXATOM	200		/* max atoms per address */
289147Seric # define MAXMAILERS	25		/* maximum mailers known to system */
2957143Seric # define MAXRWSETS	100		/* max # of sets of rewriting rules */
309147Seric # define MAXPRIORITIES	25		/* max values for Precedence: field */
3157143Seric # define MAXMXHOSTS	20		/* max # of MX records */
3252106Seric # define SMTPLINELIM	990		/* maximum SMTP line length */
3357232Seric # define MAXKEY		128		/* maximum size of a database key */
3457232Seric # define MEMCHUNKSIZE	1024		/* chunk size for memory allocation */
3559056Seric # define MAXUSERENVIRON	100		/* max envars saved, must be >= 3 */
3658106Seric # define MAXIPADDR	16		/* max # of IP addrs for this host */
3759667Seric # define MAXALIASDB	12		/* max # of alias databases */
3859303Seric # define PSBUFSIZE	(MAXLINE + MAXATOM)	/* size of prescan buffer */
3957143Seric 
4057143Seric # ifndef QUEUESIZE
4157143Seric # define QUEUESIZE	1000		/* max # of jobs per queue run */
4257143Seric # endif
4357143Seric 
449147Seric /*
459147Seric **  Compilation options.
4625673Seric **
4725673Seric **	#define these if they are available; comment them out otherwise.
489147Seric */
499147Seric 
5025673Seric # define LOG		1	/* enable logging */
5125673Seric # define UGLYUUCP	1	/* output ugly UUCP From lines */
5258778Seric # define NETINET	1	/* include internet support */
5325673Seric # define SETPROCTITLE	1	/* munge argv to display current status */
5435651Seric # define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
5553735Seric # define MATCHGECOS	1	/* match user names from gecos field */
56*63753Seric # define XDEBUG		1	/* enable extended debugging */
5736483Sbostic 
5856337Seric # ifdef NEWDB
5956337Seric # define USERDB		1	/* look in user database (requires NEWDB) */
6056337Seric # endif
6156337Seric 
6256823Seric /*
6359023Seric **  Operating system configuration.
6459023Seric **
6559023Seric **	Unless you are porting to a new OS, you shouldn't have to
6659023Seric **	change these.
6756823Seric */
6856823Seric 
69*63753Seric #ifdef __STDC__
70*63753Seric # define HASSETVBUF	1	/* yes, we have setvbuf in libc */
71*63753Seric #endif
72*63753Seric 
7360224Seric /* HP-UX -- tested for 8.07 */
7459348Seric # ifdef __hpux
7556823Seric # define SYSTEM5	1
7660564Seric # define UNSETENV	1	/* need unsetenv(3) support */
77*63753Seric # define seteuid	setuid
78*63753Seric # define HASSETVBUF		/* we have setvbuf in libc (but not __STDC__) */
7956823Seric # endif
8056823Seric 
8160224Seric /* IBM AIX 3.x -- actually tested for 3.2.3 */
8260224Seric # ifdef _AIX3
8360219Seric # define LOCKF		1	/* use System V lockf instead of flock */
8460219Seric # define FORK		fork	/* no vfork primitive available */
8560564Seric # define UNSETENV	1	/* need unsetenv(3) support */
86*63753Seric # define SYS5TZ		1	/* use System V style timezones */
8760219Seric # endif
8860219Seric 
89*63753Seric /* Silicon Graphics IRIX */
90*63753Seric # ifdef IRIX
91*63753Seric # define FORK		fork	/* no vfork primitive available */
92*63753Seric # define UNSETENV	1	/* need unsetenv(3) support */
93*63753Seric # define setpgrp	BSDsetpgrp
94*63753Seric # endif
95*63753Seric 
9660224Seric /* general System V defines */
9751918Seric # ifdef SYSTEM5
9851918Seric # define LOCKF		1	/* use System V lockf instead of flock */
9955418Seric # define SYS5TZ		1	/* use System V style timezones */
10057943Seric # define HASUNAME	1	/* use System V uname system call */
10159074Seric # endif
10259074Seric 
10360564Seric #if defined(sun) && !defined(BSD)
10460564Seric # define UNSETENV	1	/* need unsetenv(3) support */
10560564Seric 
10660602Seric # ifdef SOLARIS
10760602Seric #  define LOCKF		1	/* use System V lockf instead of flock */
10860602Seric #  define UNSETENV	1	/* need unsetenv(3) support */
10960602Seric #  define HASUSTAT	1	/* has the ustat(2) syscall */
11060602Seric # else
11160602Seric #  define HASSTATFS	1	/* has the statfs(2) syscall */
11260564Seric #  include <vfork.h>
11360564Seric # endif
11460564Seric 
11559023Seric #endif
11659023Seric 
11760564Seric #ifdef ultrix
11860564Seric # define HASSTATFS	1	/* has the statfs(2) syscall */
11960564Seric #endif
12060564Seric 
12159287Seric #ifdef _POSIX_VERSION
12259287Seric # define HASSETSID	1	/* has setsid(2) call */
12359287Seric #endif
12459287Seric 
125*63753Seric #ifdef __NeXT__
126*63753Seric # define sleep		sleepX
127*63753Seric # define UNSETENV	1	/* need unsetenv(3) support */
12859288Seric #endif
12959288Seric 
13060568Seric #ifdef BSD4_4
13160568Seric # include <sys/cdefs.h>
132*63753Seric # ifndef _POSIX_SAVED_IDS
133*63753Seric #  define _POSIX_SAVED_IDS	/* safe because we actually use seteuid */
134*63753Seric # endif
13560568Seric #endif
13660568Seric 
13759074Seric /*
13859092Seric **  Due to a "feature" in some operating systems such as Ultrix 4.3 and
13959092Seric **  HPUX 8.0, if you receive a "No route to host" message (ICMP message
14059092Seric **  ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
14159092Seric **  are closed.  Some firewalls return this error if you try to connect
14259092Seric **  to the IDENT port (113), so you can't receive email from these hosts
14359092Seric **  on these systems.  The firewall really should use a more specific
14459092Seric **  message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.
14559074Seric */
14651918Seric 
14759348Seric #if !defined(ultrix) && !defined(__hpux)
14859074Seric # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
14959074Seric #endif
15059074Seric 
15150537Seric /*
15259023Seric **  Remaining definitions should never have to be changed.  They are
15359023Seric **  primarily to provide back compatibility for older systems -- for
15459287Seric **  example, it includes some POSIX compatibility definitions
15559287Seric */
15659023Seric 
15759388Seric /* System 5 compatibility */
15859388Seric #ifndef S_ISREG
15959388Seric #define S_ISREG(foo)	((foo & S_IFREG) == S_IFREG)
16059388Seric #endif
16159388Seric #ifndef S_IWGRP
16259388Seric #define S_IWGRP		020
16359388Seric #endif
16459388Seric #ifndef S_IWOTH
16559388Seric #define S_IWOTH		002
16659388Seric #endif
16759388Seric 
16859023Seric /*
16950537Seric **  Older systems don't have this error code -- it should be in
17050537Seric **  /usr/include/sysexits.h.
17150537Seric */
17250537Seric 
17350537Seric # ifndef EX_CONFIG
17450537Seric # define EX_CONFIG	78	/* configuration error */
17550537Seric # endif
17656852Seric 
17760568Seric #ifndef __P
17860568Seric # include "cdefs.h"
17960568Seric #endif
18060568Seric 
18156852Seric /*
18258778Seric **  Do some required dependencies
18358778Seric */
18458778Seric 
18558778Seric #if defined(NETINET) || defined(NETISO)
18659107Seric # define SMTP		1	/* enable user and server SMTP */
18759107Seric # define QUEUE		1	/* enable queueing */
18859107Seric # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
18958778Seric #endif
19058778Seric 
19158778Seric 
19258778Seric /*
19356852Seric **  Arrange to use either varargs or stdargs
19456852Seric */
19556852Seric 
19656852Seric # ifdef __STDC__
19756852Seric 
19856852Seric # include <stdarg.h>
19956852Seric 
20056852Seric # define VA_LOCAL_DECL	va_list ap;
20156852Seric # define VA_START(f)	va_start(ap, f)
20256852Seric # define VA_END		va_end(ap)
20356852Seric 
20456852Seric # else
20556852Seric 
20656852Seric # include <varargs.h>
20756852Seric 
20856852Seric # define VA_LOCAL_DECL	va_list ap;
20956852Seric # define VA_START(f)	va_start(ap)
21056852Seric # define VA_END		va_end(ap)
21156852Seric 
21256852Seric # endif
21357631Seric 
21457943Seric #ifdef HASUNAME
21557631Seric # include <sys/utsname.h>
21657631Seric # ifdef newstr
21757631Seric #  undef newstr
21857631Seric # endif
21957943Seric #else /* ! HASUNAME */
22057631Seric # define NODE_LENGTH 32
22157631Seric struct utsname
22257631Seric {
22357631Seric 	char nodename[NODE_LENGTH+1];
22457631Seric };
22557943Seric #endif /* HASUNAME */
22657642Seric 
22757735Seric #ifndef MAXHOSTNAMELEN
22857735Seric #define MAXHOSTNAMELEN	256
22957735Seric #endif
23058153Seric 
23158153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
23258153Seric # define SIGCHLD	SIGCLD
23358153Seric #endif
23458153Seric 
23558153Seric #ifndef STDIN_FILENO
23658153Seric #define STDIN_FILENO	0
23758153Seric #endif
23858153Seric 
23958153Seric #ifndef STDOUT_FILENO
24058153Seric #define STDOUT_FILENO	1
24158153Seric #endif
24258153Seric 
24358153Seric #ifndef STDERR_FILENO
24458153Seric #define STDERR_FILENO	2
24558153Seric #endif
24658689Seric 
24758689Seric #ifdef LOCKF
24858689Seric #define LOCK_SH		0x01	/* shared lock */
24958689Seric #define LOCK_EX		0x02	/* exclusive lock */
25058689Seric #define LOCK_NB		0x04	/* non-blocking lock */
25159447Seric #define LOCK_UN		0x08	/* unlock */
25258692Seric 
25358692Seric #else
25458692Seric 
25558692Seric # include <sys/file.h>
25658692Seric 
25758689Seric #endif
25858702Seric 
25958702Seric /*
26058702Seric **  Size of tobuf (deliver.c)
26158702Seric **	Tweak this to match your syslog implementation.  It will have to
26258702Seric **	allow for the extra information printed.
26358702Seric */
26458702Seric 
26558702Seric #ifndef TOBUFSIZE
26658702Seric # define TOBUFSIZE (1024 - 256)
26758702Seric #endif
26860219Seric 
26960219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */
27060219Seric # ifndef FORK
27160219Seric # define FORK		vfork		/* function to call to fork mailer */
27260219Seric # endif
273