xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 59023)
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*59023Seric  *	@(#)conf.h	6.15 (Berkeley) 04/10/93
933728Sbostic  */
109147Seric 
1122726Sdist /*
1222726Sdist **  CONF.H -- All user-configurable parameters for sendmail
1322726Sdist */
149147Seric 
1557232Seric # include <sys/param.h>
1658689Seric # include <fcntl.h>
1757232Seric 
189147Seric /*
199147Seric **  Table sizes, etc....
209147Seric **	There shouldn't be much need to change these....
219147Seric */
229147Seric 
2324945Seric # define MAXLINE	1024		/* max line length */
2424945Seric # define MAXNAME	256		/* max length of a name */
259147Seric # define MAXPV		40		/* max # of parms to mailers */
269147Seric # define MAXATOM	100		/* max atoms per address */
279147Seric # define MAXMAILERS	25		/* maximum mailers known to system */
2857143Seric # define MAXRWSETS	100		/* max # of sets of rewriting rules */
299147Seric # define MAXPRIORITIES	25		/* max values for Precedence: field */
3057143Seric # define MAXMXHOSTS	20		/* max # of MX records */
3152106Seric # define SMTPLINELIM	990		/* maximum SMTP line length */
3257232Seric # define MAXKEY		128		/* maximum size of a database key */
3357232Seric # define MEMCHUNKSIZE	1024		/* chunk size for memory allocation */
3457642Seric # define MAXUSERENVIRON	100		/* max envariables saved */
3558106Seric # define MAXIPADDR	16		/* max # of IP addrs for this host */
3657997Seric # define PSBUFSIZE	(MAXNAME * 4)	/* size of prescan buffer */
3757143Seric 
3857143Seric # ifndef QUEUESIZE
3957143Seric # define QUEUESIZE	1000		/* max # of jobs per queue run */
4057143Seric # endif
4157143Seric 
4252107Seric # ifndef FORK
4352107Seric # define FORK		vfork		/* function to call to fork mailer */
4452107Seric # endif
459147Seric 
469147Seric /*
479147Seric **  Compilation options.
4825673Seric **
4925673Seric **	#define these if they are available; comment them out otherwise.
509147Seric */
519147Seric 
5225673Seric # define LOG		1	/* enable logging */
5325673Seric # define SMTP		1	/* enable user and server SMTP */
5425673Seric # define QUEUE		1	/* enable queueing */
5525673Seric # define UGLYUUCP	1	/* output ugly UUCP From lines */
5658778Seric # define NETINET	1	/* include internet support */
5725673Seric # define SETPROCTITLE	1	/* munge argv to display current status */
5835651Seric # define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
5953735Seric # define MATCHGECOS	1	/* match user names from gecos field */
6036483Sbostic 
6156337Seric # ifdef NEWDB
6256337Seric # define USERDB		1	/* look in user database (requires NEWDB) */
6356823Seric # define BTREE_MAP	1	/* enable BTREE mapping type (requires NEWDB) */
6457143Seric # define HASH_MAP	1	/* enable HASH mapping type (requires NEWDB) */
6556337Seric # endif
6656337Seric 
6756823Seric # ifdef NDBM
6856823Seric # define DBM_MAP	1	/* enable DBM mapping type (requires NDBM) */
6956823Seric # endif
7056823Seric 
7156823Seric /*
72*59023Seric **  Operating system configuration.
73*59023Seric **
74*59023Seric **	Unless you are porting to a new OS, you shouldn't have to
75*59023Seric **	change these.
7656823Seric */
7756823Seric 
7856823Seric # ifdef hpux
7956823Seric # define SYSTEM5	1
8056823Seric # endif
8156823Seric 
8251918Seric # ifdef SYSTEM5
8355418Seric 
8451918Seric # define LOCKF		1	/* use System V lockf instead of flock */
8555418Seric # define SYS5TZ		1	/* use System V style timezones */
8657943Seric # define HASUNAME	1	/* use System V uname system call */
8755418Seric 
88*59023Seric #ifdef sun
89*59023Seric # include <vfork.h>
90*59023Seric #endif
91*59023Seric 
9251918Seric # endif
9351918Seric 
9450537Seric /*
95*59023Seric **  Remaining definitions should never have to be changed.  They are
96*59023Seric **  primarily to provide back compatibility for older systems -- for
97*59023Seric **  example, it includes some POSIX compatibility definitions */
98*59023Seric 
99*59023Seric /*
10050537Seric **  Older systems don't have this error code -- it should be in
10150537Seric **  /usr/include/sysexits.h.
10250537Seric */
10350537Seric 
10450537Seric # ifndef EX_CONFIG
10550537Seric # define EX_CONFIG	78	/* configuration error */
10650537Seric # endif
10756852Seric 
10856852Seric /*
10958778Seric **  Do some required dependencies
11058778Seric */
11158778Seric 
11258778Seric #if defined(NETINET) || defined(NETISO)
11358778Seric # define DAEMON		1
11458778Seric # define SMTP		1
11558778Seric # define QUEUE		1
11658778Seric #endif
11758778Seric 
11858778Seric 
11958778Seric /*
12056852Seric **  Arrange to use either varargs or stdargs
12156852Seric */
12256852Seric 
12356852Seric # ifdef __STDC__
12456852Seric 
12556852Seric # include <stdarg.h>
12656852Seric 
12756852Seric # define VA_LOCAL_DECL	va_list ap;
12856852Seric # define VA_START(f)	va_start(ap, f)
12956852Seric # define VA_END		va_end(ap)
13056852Seric 
13156852Seric # else
13256852Seric 
13356852Seric # include <varargs.h>
13456852Seric 
13556852Seric # define VA_LOCAL_DECL	va_list ap;
13656852Seric # define VA_START(f)	va_start(ap)
13756852Seric # define VA_END		va_end(ap)
13856852Seric 
13956852Seric # endif
14057631Seric 
14157943Seric #ifdef HASUNAME
14257631Seric # include <sys/utsname.h>
14357631Seric # ifdef newstr
14457631Seric #  undef newstr
14557631Seric # endif
14657943Seric #else /* ! HASUNAME */
14757631Seric # define NODE_LENGTH 32
14857631Seric struct utsname
14957631Seric {
15057631Seric 	char nodename[NODE_LENGTH+1];
15157631Seric };
15257943Seric #endif /* HASUNAME */
15357642Seric 
15457735Seric #ifndef MAXHOSTNAMELEN
15557735Seric #define MAXHOSTNAMELEN	256
15657735Seric #endif
15758153Seric 
15858153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
15958153Seric # define SIGCHLD	SIGCLD
16058153Seric #endif
16158153Seric 
16258153Seric #ifndef STDIN_FILENO
16358153Seric #define STDIN_FILENO	0
16458153Seric #endif
16558153Seric 
16658153Seric #ifndef STDOUT_FILENO
16758153Seric #define STDOUT_FILENO	1
16858153Seric #endif
16958153Seric 
17058153Seric #ifndef STDERR_FILENO
17158153Seric #define STDERR_FILENO	2
17258153Seric #endif
17358689Seric 
17458689Seric #ifdef LOCKF
17558689Seric #define LOCK_SH		0x01	/* shared lock */
17658689Seric #define LOCK_EX		0x02	/* exclusive lock */
17758689Seric #define LOCK_NB		0x04	/* non-blocking lock */
17858692Seric 
17958692Seric #else
18058692Seric 
18158692Seric # include <sys/file.h>
18258692Seric 
18358689Seric #endif
18458702Seric 
18558702Seric /*
18658702Seric **  Size of tobuf (deliver.c)
18758702Seric **	Tweak this to match your syslog implementation.  It will have to
18858702Seric **	allow for the extra information printed.
18958702Seric */
19058702Seric 
19158702Seric #ifndef TOBUFSIZE
19258702Seric # define TOBUFSIZE (1024 - 256)
19358702Seric #endif
194