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*60219Seric * @(#)conf.h 6.31 (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 8059348Seric # ifdef __hpux 8156823Seric # define SYSTEM5 1 8256823Seric # endif 8356823Seric 84*60219Seric # ifdef IBM_AIX 85*60219Seric # define LOCKF 1 /* use System V lockf instead of flock */ 86*60219Seric # define FORK fork /* no vfork primitive available */ 87*60219Seric # endif 88*60219Seric 8951918Seric # ifdef SYSTEM5 9055418Seric 9151918Seric # define LOCKF 1 /* use System V lockf instead of flock */ 9255418Seric # define SYS5TZ 1 /* use System V style timezones */ 9357943Seric # define HASUNAME 1 /* use System V uname system call */ 9455418Seric 9559074Seric # endif 9659074Seric 9760160Seric #if defined(sun) && !defined(BSD) 9859023Seric # include <vfork.h> 9959023Seric #endif 10059023Seric 10159287Seric #ifdef _POSIX_VERSION 10259287Seric # define HASSETSID 1 /* has setsid(2) call */ 10359287Seric #endif 10459287Seric 10559288Seric #ifdef NeXT 10659288Seric # define sleep sleepX 10759288Seric #endif 10859288Seric 10959074Seric /* 11059092Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 11159092Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 11259092Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 11359092Seric ** are closed. Some firewalls return this error if you try to connect 11459092Seric ** to the IDENT port (113), so you can't receive email from these hosts 11559092Seric ** on these systems. The firewall really should use a more specific 11659092Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. 11759074Seric */ 11851918Seric 11959348Seric #if !defined(ultrix) && !defined(__hpux) 12059074Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 12159074Seric #endif 12259074Seric 12350537Seric /* 12459023Seric ** Remaining definitions should never have to be changed. They are 12559023Seric ** primarily to provide back compatibility for older systems -- for 12659287Seric ** example, it includes some POSIX compatibility definitions 12759287Seric */ 12859023Seric 12959388Seric /* System 5 compatibility */ 13059388Seric #ifndef S_ISREG 13159388Seric #define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG) 13259388Seric #endif 13359388Seric #ifndef S_IWGRP 13459388Seric #define S_IWGRP 020 13559388Seric #endif 13659388Seric #ifndef S_IWOTH 13759388Seric #define S_IWOTH 002 13859388Seric #endif 13959388Seric 14059023Seric /* 14150537Seric ** Older systems don't have this error code -- it should be in 14250537Seric ** /usr/include/sysexits.h. 14350537Seric */ 14450537Seric 14550537Seric # ifndef EX_CONFIG 14650537Seric # define EX_CONFIG 78 /* configuration error */ 14750537Seric # endif 14856852Seric 14956852Seric /* 15058778Seric ** Do some required dependencies 15158778Seric */ 15258778Seric 15358778Seric #if defined(NETINET) || defined(NETISO) 15459107Seric # define SMTP 1 /* enable user and server SMTP */ 15559107Seric # define QUEUE 1 /* enable queueing */ 15659107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 15758778Seric #endif 15858778Seric 15958778Seric 16058778Seric /* 16156852Seric ** Arrange to use either varargs or stdargs 16256852Seric */ 16356852Seric 16456852Seric # ifdef __STDC__ 16556852Seric 16656852Seric # include <stdarg.h> 16756852Seric 16856852Seric # define VA_LOCAL_DECL va_list ap; 16956852Seric # define VA_START(f) va_start(ap, f) 17056852Seric # define VA_END va_end(ap) 17156852Seric 17256852Seric # else 17356852Seric 17456852Seric # include <varargs.h> 17556852Seric 17656852Seric # define VA_LOCAL_DECL va_list ap; 17756852Seric # define VA_START(f) va_start(ap) 17856852Seric # define VA_END va_end(ap) 17956852Seric 18056852Seric # endif 18157631Seric 18257943Seric #ifdef HASUNAME 18357631Seric # include <sys/utsname.h> 18457631Seric # ifdef newstr 18557631Seric # undef newstr 18657631Seric # endif 18757943Seric #else /* ! HASUNAME */ 18857631Seric # define NODE_LENGTH 32 18957631Seric struct utsname 19057631Seric { 19157631Seric char nodename[NODE_LENGTH+1]; 19257631Seric }; 19357943Seric #endif /* HASUNAME */ 19457642Seric 19557735Seric #ifndef MAXHOSTNAMELEN 19657735Seric #define MAXHOSTNAMELEN 256 19757735Seric #endif 19858153Seric 19958153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 20058153Seric # define SIGCHLD SIGCLD 20158153Seric #endif 20258153Seric 20358153Seric #ifndef STDIN_FILENO 20458153Seric #define STDIN_FILENO 0 20558153Seric #endif 20658153Seric 20758153Seric #ifndef STDOUT_FILENO 20858153Seric #define STDOUT_FILENO 1 20958153Seric #endif 21058153Seric 21158153Seric #ifndef STDERR_FILENO 21258153Seric #define STDERR_FILENO 2 21358153Seric #endif 21458689Seric 21558689Seric #ifdef LOCKF 21658689Seric #define LOCK_SH 0x01 /* shared lock */ 21758689Seric #define LOCK_EX 0x02 /* exclusive lock */ 21858689Seric #define LOCK_NB 0x04 /* non-blocking lock */ 21959447Seric #define LOCK_UN 0x08 /* unlock */ 22058692Seric 22158692Seric #else 22258692Seric 22358692Seric # include <sys/file.h> 22458692Seric 22558689Seric #endif 22658702Seric 22758702Seric /* 22858702Seric ** Size of tobuf (deliver.c) 22958702Seric ** Tweak this to match your syslog implementation. It will have to 23058702Seric ** allow for the extra information printed. 23158702Seric */ 23258702Seric 23358702Seric #ifndef TOBUFSIZE 23458702Seric # define TOBUFSIZE (1024 - 256) 23558702Seric #endif 236*60219Seric 237*60219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 238*60219Seric # ifndef FORK 239*60219Seric # define FORK vfork /* function to call to fork mailer */ 240*60219Seric # endif 241