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*63987Seric * @(#)conf.h 8.14 (Berkeley) 07/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> 1857232Seric 1963902Seric /********************************************************************** 209147Seric ** Table sizes, etc.... 219147Seric ** There shouldn't be much need to change these.... 2263902Seric **********************************************************************/ 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 4463902Seric /********************************************************************** 459147Seric ** Compilation options. 4625673Seric ** 4725673Seric ** #define these if they are available; comment them out otherwise. 4863902Seric **********************************************************************/ 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 */ 5663753Seric # define XDEBUG 1 /* enable extended debugging */ 5736483Sbostic 5856337Seric # ifdef NEWDB 5956337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6056337Seric # endif 6156337Seric 6263902Seric /********************************************************************** 6359023Seric ** Operating system configuration. 6459023Seric ** 6559023Seric ** Unless you are porting to a new OS, you shouldn't have to 6659023Seric ** change these. 6763902Seric **********************************************************************/ 6856823Seric 6963787Seric /* 7063787Seric ** Per-Operating System defines 7163787Seric */ 7263787Seric 7363902Seric /* 7463902Seric ** HP-UX -- tested for 8.07 7563902Seric */ 7663902Seric 7759348Seric # ifdef __hpux 7863787Seric # define SYSTEM5 1 /* include all the System V defines */ 7963902Seric # define HASSETREUID 1 /* have setreuid(2) call */ 8063902Seric # define setreuid(r, e) setresuid(r, e, -1) 8163962Seric # define LA_TYPE LA_FLOAT 8263962Seric # define _PATH_UNIX "/hp-ux" 8356823Seric # endif 8456823Seric 8563902Seric /* 8663902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 8763902Seric */ 8863902Seric 8960224Seric # ifdef _AIX3 9060219Seric # define LOCKF 1 /* use System V lockf instead of flock */ 9160219Seric # define FORK fork /* no vfork primitive available */ 9260219Seric # endif 9360219Seric 9463902Seric /* 9563902Seric ** Silicon Graphics IRIX 9663902Seric ** 9763965Seric ** Compiles on 4.0.1. 9863902Seric */ 9963902Seric 10063753Seric # ifdef IRIX 10163965Seric # define HASSETREUID 1 /* have setreuid(2) call */ 10263753Seric # define FORK fork /* no vfork primitive available */ 10363753Seric # define setpgrp BSDsetpgrp 10463937Seric # define GIDSET_T gid_t 10563753Seric # endif 10663753Seric 10763902Seric 10863902Seric /* 10963902Seric ** SunOS 11063902Seric */ 11163902Seric 11263787Seric #if defined(sun) && !defined(BSD) 11359074Seric 11463962Seric # define LA_TYPE LA_INT 11563977Seric # define HASSETREUID 1 /* have setreuid(2) call */ 11660564Seric 11760602Seric # ifdef SOLARIS 11863902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 11963949Seric # define SYSTEM5 1 /* use System V definitions */ 12063977Seric # define setreuid(r, e) seteuid(e) 12163787Seric # include <sys/time.h> 12263962Seric # define _PATH_UNIX "/kernel/unix" 12363962Seric # ifndef _PATH_SENDMAILCF 12463962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 12563962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 12663962Seric # endif 12763787Seric 12860602Seric # else 12963787Seric /* SunOS 4.1.x */ 13060602Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 13160564Seric # include <vfork.h> 13263787Seric 13360564Seric # endif 13459023Seric #endif 13559023Seric 13663902Seric /* 13763902Seric ** Digital Ultrix 4.2A or 4.3 13863902Seric */ 13963902Seric 14060564Seric #ifdef ultrix 14160564Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 14263902Seric # define HASSETREUID 1 /* have setreuid(2) call */ 14363962Seric # define HASSETENV 1 /* has setenv(3) call */ 14463962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 14563962Seric # define LA_TYPE LA_INT 14663962Seric # define LA_AVENRUN "avenrun" 14760564Seric #endif 14860564Seric 14963902Seric /* 15063902Seric ** OSF/1 (tested on Alpha) 15163902Seric */ 15263902Seric 15363787Seric #ifdef __osf__ 15463962Seric # define HASSETENV 1 /* has setenv(3) call */ 15563962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 15663902Seric # define HASSETREUID 1 /* have setreuid(2) call */ 15763962Seric # define LA_TYPE LA_INT 15863962Seric # define LA_AVENRUN "avenrun" 15959287Seric #endif 16059287Seric 16163902Seric /* 16263902Seric ** NeXTstep 16363902Seric */ 16463902Seric 16563753Seric #ifdef __NeXT__ 16663753Seric # define sleep sleepX 16763962Seric # define LA_TYPE LA_ZERO 16859288Seric #endif 16959288Seric 17063902Seric /* 17163962Seric ** 4.4 BSD 17263902Seric */ 17363902Seric 17460568Seric #ifdef BSD4_4 17560568Seric # include <sys/cdefs.h> 17663838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 17760568Seric #endif 17860568Seric 17963902Seric /* 18063969Seric ** 4.3 BSD -- this is for very old systems 18163969Seric ** 18263969Seric ** You'll also have to install a new resolver library. 18363969Seric ** I don't guarantee that support for this environment is complete. 18463969Seric */ 18563969Seric 18663969Seric #ifdef oldBSD43 18763969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 18863969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 18963970Seric # define ARBPTR_T char * 19063969Seric # ifndef LA_TYPE 19163969Seric # define LA_TYPE LA_FLOAT 19263969Seric # endif 19363969Seric # ifndef _PATH_SENDMAILCF 19463969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 19563969Seric # endif 19663969Seric # ifndef _PATH_SENDMAILFC 19763969Seric # define _PATH_SENDMAILFC "/usr/lib/sendmail.fc" 19863969Seric # endif 19963969Seric #endif 20063969Seric 20163969Seric /* 20263902Seric ** SCO Unix 20363902Seric */ 20463902Seric 20563838Seric #ifdef _SCO_unix_ 20663838Seric # define SYSTEM5 1 /* include all the System V defines */ 207*63987Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 20863838Seric # define FORK fork 20963838Seric # define MAXPATHLEN PATHSIZE 21063962Seric # define LA_TYPE LA_ZERO 21163838Seric #endif 21263838Seric 21363962Seric /* 21463962Seric ** ConvexOS 11.0 and later 21563962Seric */ 21663962Seric 21763962Seric #ifdef _CONVEX_SOURCE 21863977Seric # define BSD 1 /* include all the BSD defines */ 21963977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 22063977Seric # define LOCKF 1 /* use System V locking instead of flock */ 22163962Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 22263962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 22363962Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 22463977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 22563962Seric # define LA_TYPE LA_FLOAT 22663962Seric #endif 22763962Seric 22863962Seric /* 22963962Seric ** RISC/os 4.51 23063962Seric ** 23163962Seric ** Untested... 23263962Seric */ 23363962Seric 23463965Seric #ifdef RISCOS 23563962Seric # define HASSETENV 1 /* has setenv(3) call */ 23663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 23763962Seric # define LA_TYPE LA_INT 23863962Seric # define LA_AVENRUN "avenrun" 23963962Seric # define _PATH_UNIX "/unix" 24063962Seric #endif 24163962Seric 24263902Seric /********************************************************************** 24363787Seric ** End of Per-Operating System defines 24463902Seric **********************************************************************/ 24563787Seric 24663949Seric /********************************************************************** 24763949Seric ** More general defines 24863949Seric **********************************************************************/ 24963949Seric 25063962Seric /* general BSD defines */ 25163962Seric #ifdef BSD 25263962Seric # define HASSETENV 1 /* has setenv(3) call */ 25363962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 25463962Seric # define HASGETDTABLESIZE 1 /* we have getdtablesize(2) call */ 25563962Seric # define HASSETREUID 1 /* have setreuid(2) call */ 25663962Seric # ifndef LA_TYPE 25763962Seric # define LA_TYPE LA_SUBR 25863962Seric # endif 25963962Seric #endif 26063962Seric 26163787Seric /* general System V defines */ 26263787Seric # ifdef SYSTEM5 26363949Seric # define LOCKF 1 /* use System V locking instead of flock */ 26463949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 26563949Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 26663962Seric # ifndef LA_TYPE 26763962Seric # define LA_TYPE LA_INT 26863962Seric # endif 26963949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 27063949Seric # define bzero(d, l) (memset((d), '\0', (l))) 27163949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 27263787Seric # endif 27363787Seric 27463949Seric /* general "standard C" defines */ 27563949Seric #if defined(__STDC__) || defined(SYSTEM5) 27663949Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 27763949Seric #endif 27863949Seric 27963949Seric /* general POSIX defines */ 28063949Seric #ifdef _POSIX_VERSION 28163949Seric # define HASSETSID 1 /* has setsid(2) call */ 28263966Seric # define HASWAITPID 1 /* has waitpid(2) call */ 28363949Seric #endif 28463949Seric 28563787Seric /* 28659092Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 28759092Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 28859092Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 28959092Seric ** are closed. Some firewalls return this error if you try to connect 29059092Seric ** to the IDENT port (113), so you can't receive email from these hosts 29159092Seric ** on these systems. The firewall really should use a more specific 29259092Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. 29359074Seric */ 29451918Seric 29559348Seric #if !defined(ultrix) && !defined(__hpux) 29659074Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 29759074Seric #endif 29859074Seric 29950537Seric /* 30063937Seric ** If no type for argument two of getgroups call is defined, assume 30163937Seric ** it's an integer -- unfortunately, there seem to be several choices 30263937Seric ** here. 30363937Seric */ 30463937Seric 30563937Seric #ifndef GIDSET_T 30663937Seric # define GIDSET_T int 30763937Seric #endif 30863937Seric 30963937Seric /* 31059023Seric ** Remaining definitions should never have to be changed. They are 31159023Seric ** primarily to provide back compatibility for older systems -- for 31259287Seric ** example, it includes some POSIX compatibility definitions 31359287Seric */ 31459023Seric 31559388Seric /* System 5 compatibility */ 31659388Seric #ifndef S_ISREG 31759388Seric #define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG) 31859388Seric #endif 31959388Seric #ifndef S_IWGRP 32059388Seric #define S_IWGRP 020 32159388Seric #endif 32259388Seric #ifndef S_IWOTH 32359388Seric #define S_IWOTH 002 32459388Seric #endif 32559388Seric 32659023Seric /* 32750537Seric ** Older systems don't have this error code -- it should be in 32850537Seric ** /usr/include/sysexits.h. 32950537Seric */ 33050537Seric 33150537Seric # ifndef EX_CONFIG 33250537Seric # define EX_CONFIG 78 /* configuration error */ 33350537Seric # endif 33456852Seric 33563970Seric /* type of arbitrary pointer */ 33663970Seric #ifndef ARBPTR_T 33763970Seric # define ARBPTR_T void * 33863970Seric #endif 33963970Seric 34060568Seric #ifndef __P 34160568Seric # include "cdefs.h" 34260568Seric #endif 34360568Seric 34456852Seric /* 34558778Seric ** Do some required dependencies 34658778Seric */ 34758778Seric 34858778Seric #if defined(NETINET) || defined(NETISO) 34959107Seric # define SMTP 1 /* enable user and server SMTP */ 35059107Seric # define QUEUE 1 /* enable queueing */ 35159107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 35258778Seric #endif 35358778Seric 35458778Seric 35558778Seric /* 35656852Seric ** Arrange to use either varargs or stdargs 35756852Seric */ 35856852Seric 35956852Seric # ifdef __STDC__ 36056852Seric 36156852Seric # include <stdarg.h> 36256852Seric 36356852Seric # define VA_LOCAL_DECL va_list ap; 36456852Seric # define VA_START(f) va_start(ap, f) 36556852Seric # define VA_END va_end(ap) 36656852Seric 36756852Seric # else 36856852Seric 36956852Seric # include <varargs.h> 37056852Seric 37156852Seric # define VA_LOCAL_DECL va_list ap; 37256852Seric # define VA_START(f) va_start(ap) 37356852Seric # define VA_END va_end(ap) 37456852Seric 37556852Seric # endif 37657631Seric 37757943Seric #ifdef HASUNAME 37857631Seric # include <sys/utsname.h> 37957631Seric # ifdef newstr 38057631Seric # undef newstr 38157631Seric # endif 38257943Seric #else /* ! HASUNAME */ 38357631Seric # define NODE_LENGTH 32 38457631Seric struct utsname 38557631Seric { 38657631Seric char nodename[NODE_LENGTH+1]; 38757631Seric }; 38857943Seric #endif /* HASUNAME */ 38957642Seric 39063838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 39163838Seric # define MAXHOSTNAMELEN 256 39257735Seric #endif 39358153Seric 39458153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 39558153Seric # define SIGCHLD SIGCLD 39658153Seric #endif 39758153Seric 39858153Seric #ifndef STDIN_FILENO 39958153Seric #define STDIN_FILENO 0 40058153Seric #endif 40158153Seric 40258153Seric #ifndef STDOUT_FILENO 40358153Seric #define STDOUT_FILENO 1 40458153Seric #endif 40558153Seric 40658153Seric #ifndef STDERR_FILENO 40758153Seric #define STDERR_FILENO 2 40858153Seric #endif 40958689Seric 41058689Seric #ifdef LOCKF 41158689Seric #define LOCK_SH 0x01 /* shared lock */ 41258689Seric #define LOCK_EX 0x02 /* exclusive lock */ 41358689Seric #define LOCK_NB 0x04 /* non-blocking lock */ 41459447Seric #define LOCK_UN 0x08 /* unlock */ 41558692Seric 41658692Seric #else 41758692Seric 41858692Seric # include <sys/file.h> 41958692Seric 42058689Seric #endif 42158702Seric 42258702Seric /* 42358702Seric ** Size of tobuf (deliver.c) 42458702Seric ** Tweak this to match your syslog implementation. It will have to 42558702Seric ** allow for the extra information printed. 42658702Seric */ 42758702Seric 42858702Seric #ifndef TOBUFSIZE 42958702Seric # define TOBUFSIZE (1024 - 256) 43058702Seric #endif 43160219Seric 43260219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 43360219Seric # ifndef FORK 43460219Seric # define FORK vfork /* function to call to fork mailer */ 43560219Seric # endif 436