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*60089Seric * @(#)conf.h 6.29 (Berkeley) 05/17/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> 18*60089Seric # 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 4552107Seric # ifndef FORK 4652107Seric # define FORK vfork /* function to call to fork mailer */ 4752107Seric # endif 489147Seric 499147Seric /* 509147Seric ** Compilation options. 5125673Seric ** 5225673Seric ** #define these if they are available; comment them out otherwise. 539147Seric */ 549147Seric 5525673Seric # define LOG 1 /* enable logging */ 5625673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 5758778Seric # define NETINET 1 /* include internet support */ 5825673Seric # define SETPROCTITLE 1 /* munge argv to display current status */ 5935651Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 6053735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 6136483Sbostic 6256337Seric # ifdef NEWDB 6356337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6456823Seric # define BTREE_MAP 1 /* enable BTREE mapping type (requires NEWDB) */ 6557143Seric # define HASH_MAP 1 /* enable HASH mapping type (requires NEWDB) */ 6656337Seric # endif 6756337Seric 6859723Seric # ifdef NIS 6959723Seric # define NIS_ALIASES 1 /* include NIS support for aliases */ 7059723Seric # define NIS_MAP 1 /* include NIS mapping type */ 7159723Seric # endif 7259723Seric 7356823Seric # ifdef NDBM 7456823Seric # define DBM_MAP 1 /* enable DBM mapping type (requires NDBM) */ 7556823Seric # endif 7656823Seric 7756823Seric /* 7859023Seric ** Operating system configuration. 7959023Seric ** 8059023Seric ** Unless you are porting to a new OS, you shouldn't have to 8159023Seric ** change these. 8256823Seric */ 8356823Seric 8459348Seric # ifdef __hpux 8556823Seric # define SYSTEM5 1 8656823Seric # endif 8756823Seric 8851918Seric # ifdef SYSTEM5 8955418Seric 9051918Seric # define LOCKF 1 /* use System V lockf instead of flock */ 9155418Seric # define SYS5TZ 1 /* use System V style timezones */ 9257943Seric # define HASUNAME 1 /* use System V uname system call */ 9355418Seric 9459074Seric # endif 9559074Seric 9659023Seric #ifdef sun 9759023Seric # include <vfork.h> 9859023Seric #endif 9959023Seric 10059287Seric #ifdef _POSIX_VERSION 10159287Seric # define HASSETSID 1 /* has setsid(2) call */ 10259287Seric #endif 10359287Seric 10459288Seric #ifdef NeXT 10559288Seric # define sleep sleepX 10659288Seric #endif 10759288Seric 10859074Seric /* 10959092Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 11059092Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 11159092Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 11259092Seric ** are closed. Some firewalls return this error if you try to connect 11359092Seric ** to the IDENT port (113), so you can't receive email from these hosts 11459092Seric ** on these systems. The firewall really should use a more specific 11559092Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. 11659074Seric */ 11751918Seric 11859348Seric #if !defined(ultrix) && !defined(__hpux) 11959074Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 12059074Seric #endif 12159074Seric 12250537Seric /* 12359023Seric ** Remaining definitions should never have to be changed. They are 12459023Seric ** primarily to provide back compatibility for older systems -- for 12559287Seric ** example, it includes some POSIX compatibility definitions 12659287Seric */ 12759023Seric 12859388Seric /* System 5 compatibility */ 12959388Seric #ifndef S_ISREG 13059388Seric #define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG) 13159388Seric #endif 13259388Seric #ifndef S_IWGRP 13359388Seric #define S_IWGRP 020 13459388Seric #endif 13559388Seric #ifndef S_IWOTH 13659388Seric #define S_IWOTH 002 13759388Seric #endif 13859388Seric 13959023Seric /* 14050537Seric ** Older systems don't have this error code -- it should be in 14150537Seric ** /usr/include/sysexits.h. 14250537Seric */ 14350537Seric 14450537Seric # ifndef EX_CONFIG 14550537Seric # define EX_CONFIG 78 /* configuration error */ 14650537Seric # endif 14756852Seric 14856852Seric /* 14958778Seric ** Do some required dependencies 15058778Seric */ 15158778Seric 15258778Seric #if defined(NETINET) || defined(NETISO) 15359107Seric # define SMTP 1 /* enable user and server SMTP */ 15459107Seric # define QUEUE 1 /* enable queueing */ 15559107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 15658778Seric #endif 15758778Seric 15858778Seric 15958778Seric /* 16056852Seric ** Arrange to use either varargs or stdargs 16156852Seric */ 16256852Seric 16356852Seric # ifdef __STDC__ 16456852Seric 16556852Seric # include <stdarg.h> 16656852Seric 16756852Seric # define VA_LOCAL_DECL va_list ap; 16856852Seric # define VA_START(f) va_start(ap, f) 16956852Seric # define VA_END va_end(ap) 17056852Seric 17156852Seric # else 17256852Seric 17356852Seric # include <varargs.h> 17456852Seric 17556852Seric # define VA_LOCAL_DECL va_list ap; 17656852Seric # define VA_START(f) va_start(ap) 17756852Seric # define VA_END va_end(ap) 17856852Seric 17956852Seric # endif 18057631Seric 18157943Seric #ifdef HASUNAME 18257631Seric # include <sys/utsname.h> 18357631Seric # ifdef newstr 18457631Seric # undef newstr 18557631Seric # endif 18657943Seric #else /* ! HASUNAME */ 18757631Seric # define NODE_LENGTH 32 18857631Seric struct utsname 18957631Seric { 19057631Seric char nodename[NODE_LENGTH+1]; 19157631Seric }; 19257943Seric #endif /* HASUNAME */ 19357642Seric 19457735Seric #ifndef MAXHOSTNAMELEN 19557735Seric #define MAXHOSTNAMELEN 256 19657735Seric #endif 19758153Seric 19858153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 19958153Seric # define SIGCHLD SIGCLD 20058153Seric #endif 20158153Seric 20258153Seric #ifndef STDIN_FILENO 20358153Seric #define STDIN_FILENO 0 20458153Seric #endif 20558153Seric 20658153Seric #ifndef STDOUT_FILENO 20758153Seric #define STDOUT_FILENO 1 20858153Seric #endif 20958153Seric 21058153Seric #ifndef STDERR_FILENO 21158153Seric #define STDERR_FILENO 2 21258153Seric #endif 21358689Seric 21458689Seric #ifdef LOCKF 21558689Seric #define LOCK_SH 0x01 /* shared lock */ 21658689Seric #define LOCK_EX 0x02 /* exclusive lock */ 21758689Seric #define LOCK_NB 0x04 /* non-blocking lock */ 21859447Seric #define LOCK_UN 0x08 /* unlock */ 21958692Seric 22058692Seric #else 22158692Seric 22258692Seric # include <sys/file.h> 22358692Seric 22458689Seric #endif 22558702Seric 22658702Seric /* 22758702Seric ** Size of tobuf (deliver.c) 22858702Seric ** Tweak this to match your syslog implementation. It will have to 22958702Seric ** allow for the extra information printed. 23058702Seric */ 23158702Seric 23258702Seric #ifndef TOBUFSIZE 23358702Seric # define TOBUFSIZE (1024 - 256) 23458702Seric #endif 235