xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 60224)
19147Seric /*
234920Sbostic  * Copyright (c) 1983 Eric P. Allman
333728Sbostic  * Copyright (c) 1988 Regents of the University of California.
433728Sbostic  * All rights reserved.
533728Sbostic  *
642825Sbostic  * %sccs.include.redist.c%
733728Sbostic  *
8*60224Seric  *	@(#)conf.h	6.32 (Berkeley) 05/22/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>
1860089Seric # include "cdefs.h"
1957232Seric 
209147Seric /*
219147Seric **  Table sizes, etc....
229147Seric **	There shouldn't be much need to change these....
239147Seric */
249147Seric 
2559303Seric # define MAXLINE	2048		/* max line length */
2624945Seric # define MAXNAME	256		/* max length of a name */
279147Seric # define MAXPV		40		/* max # of parms to mailers */
2859303Seric # define MAXATOM	200		/* max atoms per address */
299147Seric # define MAXMAILERS	25		/* maximum mailers known to system */
3057143Seric # define MAXRWSETS	100		/* max # of sets of rewriting rules */
319147Seric # define MAXPRIORITIES	25		/* max values for Precedence: field */
3257143Seric # define MAXMXHOSTS	20		/* max # of MX records */
3352106Seric # define SMTPLINELIM	990		/* maximum SMTP line length */
3457232Seric # define MAXKEY		128		/* maximum size of a database key */
3557232Seric # define MEMCHUNKSIZE	1024		/* chunk size for memory allocation */
3659056Seric # define MAXUSERENVIRON	100		/* max envars saved, must be >= 3 */
3758106Seric # define MAXIPADDR	16		/* max # of IP addrs for this host */
3859667Seric # define MAXALIASDB	12		/* max # of alias databases */
3959303Seric # define PSBUFSIZE	(MAXLINE + MAXATOM)	/* size of prescan buffer */
4057143Seric 
4157143Seric # ifndef QUEUESIZE
4257143Seric # define QUEUESIZE	1000		/* max # of jobs per queue run */
4357143Seric # endif
4457143Seric 
459147Seric /*
469147Seric **  Compilation options.
4725673Seric **
4825673Seric **	#define these if they are available; comment them out otherwise.
499147Seric */
509147Seric 
5125673Seric # define LOG		1	/* enable logging */
5225673Seric # define UGLYUUCP	1	/* output ugly UUCP From lines */
5358778Seric # define NETINET	1	/* include internet support */
5425673Seric # define SETPROCTITLE	1	/* munge argv to display current status */
5535651Seric # define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
5653735Seric # define MATCHGECOS	1	/* match user names from gecos field */
5736483Sbostic 
5856337Seric # ifdef NEWDB
5956337Seric # define USERDB		1	/* look in user database (requires NEWDB) */
6056823Seric # define BTREE_MAP	1	/* enable BTREE mapping type (requires NEWDB) */
6157143Seric # define HASH_MAP	1	/* enable HASH mapping type (requires NEWDB) */
6256337Seric # endif
6356337Seric 
6459723Seric # ifdef NIS
6559723Seric # define NIS_ALIASES	1	/* include NIS support for aliases */
6659723Seric # define NIS_MAP	1	/* include NIS mapping type */
6759723Seric # endif
6859723Seric 
6956823Seric # ifdef NDBM
7056823Seric # define DBM_MAP	1	/* enable DBM mapping type (requires NDBM) */
7156823Seric # endif
7256823Seric 
7356823Seric /*
7459023Seric **  Operating system configuration.
7559023Seric **
7659023Seric **	Unless you are porting to a new OS, you shouldn't have to
7759023Seric **	change these.
7856823Seric */
7956823Seric 
80*60224Seric /* HP-UX -- tested for 8.07 */
8159348Seric # ifdef __hpux
8256823Seric # define SYSTEM5	1
8356823Seric # endif
8456823Seric 
85*60224Seric /* IBM AIX 3.x -- actually tested for 3.2.3 */
86*60224Seric # ifdef _AIX3
8760219Seric # define LOCKF		1	/* use System V lockf instead of flock */
8860219Seric # define FORK		fork	/* no vfork primitive available */
8960219Seric # endif
9060219Seric 
91*60224Seric /* general System V defines */
9251918Seric # ifdef SYSTEM5
9351918Seric # define LOCKF		1	/* use System V lockf instead of flock */
9455418Seric # define SYS5TZ		1	/* use System V style timezones */
9557943Seric # define HASUNAME	1	/* use System V uname system call */
9659074Seric # endif
9759074Seric 
9860160Seric #if defined(sun) && !defined(BSD)
9959023Seric # include <vfork.h>
10059023Seric #endif
10159023Seric 
10259287Seric #ifdef _POSIX_VERSION
10359287Seric # define HASSETSID	1	/* has setsid(2) call */
10459287Seric #endif
10559287Seric 
10659288Seric #ifdef NeXT
10759288Seric # define	sleep	sleepX
10859288Seric #endif
10959288Seric 
11059074Seric /*
11159092Seric **  Due to a "feature" in some operating systems such as Ultrix 4.3 and
11259092Seric **  HPUX 8.0, if you receive a "No route to host" message (ICMP message
11359092Seric **  ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
11459092Seric **  are closed.  Some firewalls return this error if you try to connect
11559092Seric **  to the IDENT port (113), so you can't receive email from these hosts
11659092Seric **  on these systems.  The firewall really should use a more specific
11759092Seric **  message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.
11859074Seric */
11951918Seric 
12059348Seric #if !defined(ultrix) && !defined(__hpux)
12159074Seric # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
12259074Seric #endif
12359074Seric 
12450537Seric /*
12559023Seric **  Remaining definitions should never have to be changed.  They are
12659023Seric **  primarily to provide back compatibility for older systems -- for
12759287Seric **  example, it includes some POSIX compatibility definitions
12859287Seric */
12959023Seric 
13059388Seric /* System 5 compatibility */
13159388Seric #ifndef S_ISREG
13259388Seric #define S_ISREG(foo)	((foo & S_IFREG) == S_IFREG)
13359388Seric #endif
13459388Seric #ifndef S_IWGRP
13559388Seric #define S_IWGRP		020
13659388Seric #endif
13759388Seric #ifndef S_IWOTH
13859388Seric #define S_IWOTH		002
13959388Seric #endif
14059388Seric 
14159023Seric /*
14250537Seric **  Older systems don't have this error code -- it should be in
14350537Seric **  /usr/include/sysexits.h.
14450537Seric */
14550537Seric 
14650537Seric # ifndef EX_CONFIG
14750537Seric # define EX_CONFIG	78	/* configuration error */
14850537Seric # endif
14956852Seric 
15056852Seric /*
15158778Seric **  Do some required dependencies
15258778Seric */
15358778Seric 
15458778Seric #if defined(NETINET) || defined(NETISO)
15559107Seric # define SMTP		1	/* enable user and server SMTP */
15659107Seric # define QUEUE		1	/* enable queueing */
15759107Seric # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
15858778Seric #endif
15958778Seric 
16058778Seric 
16158778Seric /*
16256852Seric **  Arrange to use either varargs or stdargs
16356852Seric */
16456852Seric 
16556852Seric # ifdef __STDC__
16656852Seric 
16756852Seric # include <stdarg.h>
16856852Seric 
16956852Seric # define VA_LOCAL_DECL	va_list ap;
17056852Seric # define VA_START(f)	va_start(ap, f)
17156852Seric # define VA_END		va_end(ap)
17256852Seric 
17356852Seric # else
17456852Seric 
17556852Seric # include <varargs.h>
17656852Seric 
17756852Seric # define VA_LOCAL_DECL	va_list ap;
17856852Seric # define VA_START(f)	va_start(ap)
17956852Seric # define VA_END		va_end(ap)
18056852Seric 
18156852Seric # endif
18257631Seric 
18357943Seric #ifdef HASUNAME
18457631Seric # include <sys/utsname.h>
18557631Seric # ifdef newstr
18657631Seric #  undef newstr
18757631Seric # endif
18857943Seric #else /* ! HASUNAME */
18957631Seric # define NODE_LENGTH 32
19057631Seric struct utsname
19157631Seric {
19257631Seric 	char nodename[NODE_LENGTH+1];
19357631Seric };
19457943Seric #endif /* HASUNAME */
19557642Seric 
19657735Seric #ifndef MAXHOSTNAMELEN
19757735Seric #define MAXHOSTNAMELEN	256
19857735Seric #endif
19958153Seric 
20058153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
20158153Seric # define SIGCHLD	SIGCLD
20258153Seric #endif
20358153Seric 
20458153Seric #ifndef STDIN_FILENO
20558153Seric #define STDIN_FILENO	0
20658153Seric #endif
20758153Seric 
20858153Seric #ifndef STDOUT_FILENO
20958153Seric #define STDOUT_FILENO	1
21058153Seric #endif
21158153Seric 
21258153Seric #ifndef STDERR_FILENO
21358153Seric #define STDERR_FILENO	2
21458153Seric #endif
21558689Seric 
21658689Seric #ifdef LOCKF
21758689Seric #define LOCK_SH		0x01	/* shared lock */
21858689Seric #define LOCK_EX		0x02	/* exclusive lock */
21958689Seric #define LOCK_NB		0x04	/* non-blocking lock */
22059447Seric #define LOCK_UN		0x08	/* unlock */
22158692Seric 
22258692Seric #else
22358692Seric 
22458692Seric # include <sys/file.h>
22558692Seric 
22658689Seric #endif
22758702Seric 
22858702Seric /*
22958702Seric **  Size of tobuf (deliver.c)
23058702Seric **	Tweak this to match your syslog implementation.  It will have to
23158702Seric **	allow for the extra information printed.
23258702Seric */
23358702Seric 
23458702Seric #ifndef TOBUFSIZE
23558702Seric # define TOBUFSIZE (1024 - 256)
23658702Seric #endif
23760219Seric 
23860219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */
23960219Seric # ifndef FORK
24060219Seric # define FORK		vfork		/* function to call to fork mailer */
24160219Seric # endif
242