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*64032Seric * @(#)conf.h 8.16 (Berkeley) 07/24/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 62*64032Seric /* 63*64032Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 64*64032Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 65*64032Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 66*64032Seric ** are closed. Some firewalls return this error if you try to connect 67*64032Seric ** to the IDENT port (113), so you can't receive email from these hosts 68*64032Seric ** on these systems. The firewall really should use a more specific 69*64032Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. This 70*64032Seric ** will get #undefed below as needed. 71*64032Seric */ 72*64032Seric 73*64032Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 74*64032Seric 7563902Seric /********************************************************************** 7659023Seric ** Operating system configuration. 7759023Seric ** 7859023Seric ** Unless you are porting to a new OS, you shouldn't have to 7959023Seric ** change these. 8063902Seric **********************************************************************/ 8156823Seric 8263787Seric /* 8363787Seric ** Per-Operating System defines 8463787Seric */ 8563787Seric 8663902Seric /* 8763902Seric ** HP-UX -- tested for 8.07 8863902Seric */ 8963902Seric 9059348Seric # ifdef __hpux 9163787Seric # define SYSTEM5 1 /* include all the System V defines */ 9263902Seric # define HASSETREUID 1 /* have setreuid(2) call */ 9363902Seric # define setreuid(r, e) setresuid(r, e, -1) 9463962Seric # define LA_TYPE LA_FLOAT 9563962Seric # define _PATH_UNIX "/hp-ux" 96*64032Seric # undef IDENTPROTO 9756823Seric # endif 9856823Seric 9963902Seric /* 10063902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 10163902Seric */ 10263902Seric 10360224Seric # ifdef _AIX3 10460219Seric # define LOCKF 1 /* use System V lockf instead of flock */ 10560219Seric # define FORK fork /* no vfork primitive available */ 10660219Seric # endif 10760219Seric 10863902Seric /* 10963902Seric ** Silicon Graphics IRIX 11063902Seric ** 11163965Seric ** Compiles on 4.0.1. 11263902Seric */ 11363902Seric 11463753Seric # ifdef IRIX 11563965Seric # define HASSETREUID 1 /* have setreuid(2) call */ 11663753Seric # define FORK fork /* no vfork primitive available */ 11763753Seric # define setpgrp BSDsetpgrp 11863937Seric # define GIDSET_T gid_t 11963753Seric # endif 12063753Seric 12163902Seric 12263902Seric /* 12363902Seric ** SunOS 12463902Seric */ 12563902Seric 12663787Seric #if defined(sun) && !defined(BSD) 12759074Seric 12863962Seric # define LA_TYPE LA_INT 12963977Seric # define HASSETREUID 1 /* have setreuid(2) call */ 13060564Seric 13160602Seric # ifdef SOLARIS 13263902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 13363949Seric # define SYSTEM5 1 /* use System V definitions */ 13463977Seric # define setreuid(r, e) seteuid(e) 13563787Seric # include <sys/time.h> 13663962Seric # define _PATH_UNIX "/kernel/unix" 13763962Seric # ifndef _PATH_SENDMAILCF 13863962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 13963962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 14063962Seric # endif 14163787Seric 14260602Seric # else 14363787Seric /* SunOS 4.1.x */ 14460602Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 14560564Seric # include <vfork.h> 14663787Seric 14760564Seric # endif 14859023Seric #endif 14959023Seric 15063902Seric /* 15163902Seric ** Digital Ultrix 4.2A or 4.3 15263902Seric */ 15363902Seric 15460564Seric #ifdef ultrix 15560564Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 15663902Seric # define HASSETREUID 1 /* have setreuid(2) call */ 15763962Seric # define HASSETENV 1 /* has setenv(3) call */ 15863962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 15963962Seric # define LA_TYPE LA_INT 16063962Seric # define LA_AVENRUN "avenrun" 161*64032Seric # undef IDENTPROTO 16260564Seric #endif 16360564Seric 16463902Seric /* 16563902Seric ** OSF/1 (tested on Alpha) 16663902Seric */ 16763902Seric 16863787Seric #ifdef __osf__ 16963962Seric # define HASSETENV 1 /* has setenv(3) call */ 17063962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 17163902Seric # define HASSETREUID 1 /* have setreuid(2) call */ 17263962Seric # define LA_TYPE LA_INT 17363962Seric # define LA_AVENRUN "avenrun" 17459287Seric #endif 17559287Seric 17663902Seric /* 17763902Seric ** NeXTstep 17863902Seric */ 17963902Seric 18063753Seric #ifdef __NeXT__ 18163753Seric # define sleep sleepX 18263962Seric # define LA_TYPE LA_ZERO 18359288Seric #endif 18459288Seric 18563902Seric /* 18663962Seric ** 4.4 BSD 18763902Seric */ 18863902Seric 18960568Seric #ifdef BSD4_4 19060568Seric # include <sys/cdefs.h> 19163838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 19260568Seric #endif 19360568Seric 19463902Seric /* 19563969Seric ** 4.3 BSD -- this is for very old systems 19663969Seric ** 19763969Seric ** You'll also have to install a new resolver library. 19863969Seric ** I don't guarantee that support for this environment is complete. 19963969Seric */ 20063969Seric 20163969Seric #ifdef oldBSD43 20263969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 20363969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 20463970Seric # define ARBPTR_T char * 20563969Seric # ifndef LA_TYPE 20663969Seric # define LA_TYPE LA_FLOAT 20763969Seric # endif 20863969Seric # ifndef _PATH_SENDMAILCF 20963969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 21063969Seric # endif 21163969Seric # ifndef _PATH_SENDMAILFC 21263969Seric # define _PATH_SENDMAILFC "/usr/lib/sendmail.fc" 21363969Seric # endif 21463969Seric #endif 21563969Seric 21663969Seric /* 21763902Seric ** SCO Unix 21863902Seric */ 21963902Seric 22063838Seric #ifdef _SCO_unix_ 22163838Seric # define SYSTEM5 1 /* include all the System V defines */ 22263987Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 22363838Seric # define FORK fork 22463838Seric # define MAXPATHLEN PATHSIZE 22563962Seric # define LA_TYPE LA_ZERO 22663838Seric #endif 22763838Seric 22863962Seric /* 22963962Seric ** ConvexOS 11.0 and later 23063962Seric */ 23163962Seric 23263962Seric #ifdef _CONVEX_SOURCE 23363977Seric # define BSD 1 /* include all the BSD defines */ 23463977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 23563977Seric # define LOCKF 1 /* use System V locking instead of flock */ 23663962Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 23763962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 23863962Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 23963977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 24063962Seric # define LA_TYPE LA_FLOAT 241*64032Seric # undef IDENTPROTO 24263962Seric #endif 24363962Seric 24463962Seric /* 24563962Seric ** RISC/os 4.51 24663962Seric ** 24763962Seric ** Untested... 24863962Seric */ 24963962Seric 25063965Seric #ifdef RISCOS 25163962Seric # define HASSETENV 1 /* has setenv(3) call */ 25263962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 25363962Seric # define LA_TYPE LA_INT 25463962Seric # define LA_AVENRUN "avenrun" 25563962Seric # define _PATH_UNIX "/unix" 25663962Seric #endif 25763962Seric 25863902Seric /********************************************************************** 25963787Seric ** End of Per-Operating System defines 26063902Seric **********************************************************************/ 26163787Seric 26263949Seric /********************************************************************** 26363949Seric ** More general defines 26463949Seric **********************************************************************/ 26563949Seric 26663962Seric /* general BSD defines */ 26763962Seric #ifdef BSD 26863962Seric # define HASSETENV 1 /* has setenv(3) call */ 26963962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 27063962Seric # define HASGETDTABLESIZE 1 /* we have getdtablesize(2) call */ 27163962Seric # define HASSETREUID 1 /* have setreuid(2) call */ 27263962Seric # ifndef LA_TYPE 27363962Seric # define LA_TYPE LA_SUBR 27463962Seric # endif 27563962Seric #endif 27663962Seric 27763787Seric /* general System V defines */ 27863787Seric # ifdef SYSTEM5 27963949Seric # define LOCKF 1 /* use System V locking instead of flock */ 28063949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 28163949Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 28263962Seric # ifndef LA_TYPE 28363962Seric # define LA_TYPE LA_INT 28463962Seric # endif 28563949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 28663949Seric # define bzero(d, l) (memset((d), '\0', (l))) 28763949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 28863787Seric # endif 28963787Seric 29063949Seric /* general "standard C" defines */ 29163949Seric #if defined(__STDC__) || defined(SYSTEM5) 29263949Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 29363949Seric #endif 29463949Seric 29563949Seric /* general POSIX defines */ 29663949Seric #ifdef _POSIX_VERSION 29763949Seric # define HASSETSID 1 /* has setsid(2) call */ 29863966Seric # define HASWAITPID 1 /* has waitpid(2) call */ 29963949Seric #endif 30063949Seric 30163787Seric /* 30263937Seric ** If no type for argument two of getgroups call is defined, assume 30363937Seric ** it's an integer -- unfortunately, there seem to be several choices 30463937Seric ** here. 30563937Seric */ 30663937Seric 30763937Seric #ifndef GIDSET_T 30863937Seric # define GIDSET_T int 30963937Seric #endif 31063937Seric 31163937Seric /* 31259023Seric ** Remaining definitions should never have to be changed. They are 31359023Seric ** primarily to provide back compatibility for older systems -- for 31459287Seric ** example, it includes some POSIX compatibility definitions 31559287Seric */ 31659023Seric 31759388Seric /* System 5 compatibility */ 31859388Seric #ifndef S_ISREG 31959388Seric #define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG) 32059388Seric #endif 32159388Seric #ifndef S_IWGRP 32259388Seric #define S_IWGRP 020 32359388Seric #endif 32459388Seric #ifndef S_IWOTH 32559388Seric #define S_IWOTH 002 32659388Seric #endif 32759388Seric 32859023Seric /* 32950537Seric ** Older systems don't have this error code -- it should be in 33050537Seric ** /usr/include/sysexits.h. 33150537Seric */ 33250537Seric 33350537Seric # ifndef EX_CONFIG 33450537Seric # define EX_CONFIG 78 /* configuration error */ 33550537Seric # endif 33656852Seric 33763993Seric /* 33863993Seric ** These are used in a few cases where we need some special 33963993Seric ** error codes, but where the system doesn't provide something 34063993Seric ** reasonable. They are printed in errstring. 34163993Seric */ 34263993Seric 34363993Seric #ifndef E_PSEUDOBASE 34463993Seric # define E_PSEUDOBASE 256 34563993Seric #endif 34663993Seric 34763993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 34863993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 34963993Seric 35063970Seric /* type of arbitrary pointer */ 35163970Seric #ifndef ARBPTR_T 35263970Seric # define ARBPTR_T void * 35363970Seric #endif 35463970Seric 35560568Seric #ifndef __P 35660568Seric # include "cdefs.h" 35760568Seric #endif 35860568Seric 35956852Seric /* 36058778Seric ** Do some required dependencies 36158778Seric */ 36258778Seric 36358778Seric #if defined(NETINET) || defined(NETISO) 36459107Seric # define SMTP 1 /* enable user and server SMTP */ 36559107Seric # define QUEUE 1 /* enable queueing */ 36659107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 36758778Seric #endif 36858778Seric 36958778Seric 37058778Seric /* 37156852Seric ** Arrange to use either varargs or stdargs 37256852Seric */ 37356852Seric 37456852Seric # ifdef __STDC__ 37556852Seric 37656852Seric # include <stdarg.h> 37756852Seric 37856852Seric # define VA_LOCAL_DECL va_list ap; 37956852Seric # define VA_START(f) va_start(ap, f) 38056852Seric # define VA_END va_end(ap) 38156852Seric 38256852Seric # else 38356852Seric 38456852Seric # include <varargs.h> 38556852Seric 38656852Seric # define VA_LOCAL_DECL va_list ap; 38756852Seric # define VA_START(f) va_start(ap) 38856852Seric # define VA_END va_end(ap) 38956852Seric 39056852Seric # endif 39157631Seric 39257943Seric #ifdef HASUNAME 39357631Seric # include <sys/utsname.h> 39457631Seric # ifdef newstr 39557631Seric # undef newstr 39657631Seric # endif 39757943Seric #else /* ! HASUNAME */ 39857631Seric # define NODE_LENGTH 32 39957631Seric struct utsname 40057631Seric { 40157631Seric char nodename[NODE_LENGTH+1]; 40257631Seric }; 40357943Seric #endif /* HASUNAME */ 40457642Seric 40563838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 40663838Seric # define MAXHOSTNAMELEN 256 40757735Seric #endif 40858153Seric 40958153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 41058153Seric # define SIGCHLD SIGCLD 41158153Seric #endif 41258153Seric 41358153Seric #ifndef STDIN_FILENO 41458153Seric #define STDIN_FILENO 0 41558153Seric #endif 41658153Seric 41758153Seric #ifndef STDOUT_FILENO 41858153Seric #define STDOUT_FILENO 1 41958153Seric #endif 42058153Seric 42158153Seric #ifndef STDERR_FILENO 42258153Seric #define STDERR_FILENO 2 42358153Seric #endif 42458689Seric 42558689Seric #ifdef LOCKF 42658689Seric #define LOCK_SH 0x01 /* shared lock */ 42758689Seric #define LOCK_EX 0x02 /* exclusive lock */ 42858689Seric #define LOCK_NB 0x04 /* non-blocking lock */ 42959447Seric #define LOCK_UN 0x08 /* unlock */ 43058692Seric 43158692Seric #else 43258692Seric 43358692Seric # include <sys/file.h> 43458692Seric 43558689Seric #endif 43658702Seric 43758702Seric /* 43858702Seric ** Size of tobuf (deliver.c) 43958702Seric ** Tweak this to match your syslog implementation. It will have to 44058702Seric ** allow for the extra information printed. 44158702Seric */ 44258702Seric 44358702Seric #ifndef TOBUFSIZE 44458702Seric # define TOBUFSIZE (1024 - 256) 44558702Seric #endif 44660219Seric 44760219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 44860219Seric # ifndef FORK 44960219Seric # define FORK vfork /* function to call to fork mailer */ 45060219Seric # endif 451