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*65189Seric * @(#)conf.h 8.67 (Berkeley) 12/21/93 933728Sbostic */ 109147Seric 1122726Sdist /* 1222726Sdist ** CONF.H -- All user-configurable parameters for sendmail 1322726Sdist */ 149147Seric 1557232Seric # include <sys/param.h> 1664705Seric # include <sys/types.h> 1759389Seric # include <sys/stat.h> 1864380Seric # include <sys/file.h> 1964500Seric # include <sys/wait.h> 2058689Seric # include <fcntl.h> 2164035Seric # include <signal.h> 2257232Seric 2363902Seric /********************************************************************** 249147Seric ** Table sizes, etc.... 259147Seric ** There shouldn't be much need to change these.... 2663902Seric **********************************************************************/ 279147Seric 2859303Seric # define MAXLINE 2048 /* max line length */ 2924945Seric # define MAXNAME 256 /* max length of a name */ 309147Seric # define MAXPV 40 /* max # of parms to mailers */ 3159303Seric # define MAXATOM 200 /* max atoms per address */ 329147Seric # define MAXMAILERS 25 /* maximum mailers known to system */ 3357143Seric # define MAXRWSETS 100 /* max # of sets of rewriting rules */ 349147Seric # define MAXPRIORITIES 25 /* max values for Precedence: field */ 3557143Seric # define MAXMXHOSTS 20 /* max # of MX records */ 3652106Seric # define SMTPLINELIM 990 /* maximum SMTP line length */ 3757232Seric # define MAXKEY 128 /* maximum size of a database key */ 3857232Seric # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 3959056Seric # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 4059667Seric # define MAXALIASDB 12 /* max # of alias databases */ 4157143Seric 4257143Seric # ifndef QUEUESIZE 4357143Seric # define QUEUESIZE 1000 /* max # of jobs per queue run */ 4457143Seric # endif 4557143Seric 4663902Seric /********************************************************************** 479147Seric ** Compilation options. 4825673Seric ** 4925673Seric ** #define these if they are available; comment them out otherwise. 5063902Seric **********************************************************************/ 519147Seric 5225673Seric # define LOG 1 /* enable logging */ 5325673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 5464813Seric # define NETUNIX 1 /* include unix domain support */ 5558778Seric # define NETINET 1 /* include internet support */ 5625673Seric # define SETPROCTITLE 1 /* munge argv to display current status */ 5735651Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 5853735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 5963753Seric # define XDEBUG 1 /* enable extended debugging */ 6036483Sbostic 6156337Seric # ifdef NEWDB 6256337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6356337Seric # endif 6456337Seric 6564032Seric /* 6664944Seric ** Most systems have symbolic links today, so default them on. You 6764944Seric ** can turn them off by #undef'ing this below. 6864944Seric */ 6964944Seric 7064944Seric # define HASLSTAT 1 /* has lstat(2) call */ 7164944Seric 7264962Seric /* 7364962Seric ** General "standard C" defines. 7464962Seric ** 7564962Seric ** These may be undone later, to cope with systems that claim to 7664962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 7764962Seric ** doesn't realize that the library is part of the language. 7864962Seric ** 7964962Seric ** Life would be much easier if we could get rid of this sort 8064962Seric ** of bozo problems. 8164962Seric */ 8264962Seric 8364962Seric #ifdef __STDC__ 8464962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 8564962Seric #endif 8664962Seric 8763902Seric /********************************************************************** 8859023Seric ** Operating system configuration. 8959023Seric ** 9059023Seric ** Unless you are porting to a new OS, you shouldn't have to 9159023Seric ** change these. 9263902Seric **********************************************************************/ 9356823Seric 9463787Seric /* 9563787Seric ** Per-Operating System defines 9663787Seric */ 9763787Seric 9864314Seric 9963902Seric /* 10063902Seric ** HP-UX -- tested for 8.07 10163902Seric */ 10263902Seric 10359348Seric # ifdef __hpux 10464727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 10564727Seric # undef m_flags 10663787Seric # define SYSTEM5 1 /* include all the System V defines */ 10764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 10864314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 10964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 11063902Seric # define setreuid(r, e) setresuid(r, e, -1) 11163962Seric # define LA_TYPE LA_FLOAT 11263962Seric # define _PATH_UNIX "/hp-ux" 11365167Seric # ifndef IDENTPROTO 11465167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 11556823Seric # endif 11665167Seric # endif 11756823Seric 11864314Seric 11963902Seric /* 12063902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 12163902Seric */ 12263902Seric 12360224Seric # ifdef _AIX3 12464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 12564840Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 12664840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 12760219Seric # define FORK fork /* no vfork primitive available */ 12864494Seric # undef SETPROCTITLE /* setproctitle confuses AIX */ 12960219Seric # endif 13060219Seric 13164314Seric 13263902Seric /* 13363902Seric ** Silicon Graphics IRIX 13463902Seric ** 13563965Seric ** Compiles on 4.0.1. 13663902Seric */ 13763902Seric 13863753Seric # ifdef IRIX 13964727Seric # include <sys/sysmacros.h> 14064035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 14164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 14264314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 14363753Seric # define FORK fork /* no vfork primitive available */ 14464562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 14564155Seric # define setpgid BSDsetpgrp 14663937Seric # define GIDSET_T gid_t 14763753Seric # endif 14863753Seric 14963902Seric 15063902Seric /* 15164813Seric ** SunOS and Solaris 15264813Seric ** 15364813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 15464813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 15563902Seric */ 15663902Seric 15763787Seric #if defined(sun) && !defined(BSD) 15859074Seric 15963962Seric # define LA_TYPE LA_INT 16064035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 16164813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 16260564Seric 16364842Seric # ifdef SOLARIS_2_3 16464842Seric # define SOLARIS 16564842Seric # endif 16664842Seric 16760602Seric # ifdef SOLARIS 16863902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 169*65189Seric /* see also __svr4__ defines below */ 17063787Seric # include <sys/time.h> 17164832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 17264832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 17365172Seric # define GIDSET_T gid_t 174*65189Seric # ifndef _PATH_UNIX 175*65189Seric # define _PATH_UNIX "/kernel/unix" 176*65189Seric # endif 17763962Seric # ifndef _PATH_SENDMAILCF 17863962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 17964072Seric # endif 18064072Seric # ifndef _PATH_SENDMAILPID 18163962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 18263962Seric # endif 18363787Seric 18460602Seric # else 18565105Seric /* SunOS 4.0.3 or 4.1.x */ 186*65189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 18760602Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 18864831Seric # define HASFLOCK 1 /* has flock(2) call */ 18960564Seric # include <vfork.h> 19063787Seric 19165105Seric # ifdef SUNOS403 19265105Seric /* special tweaking for SunOS 4.0.3 */ 19365105Seric # include <malloc.h> 19465105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 19565105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 19665105Seric # undef WIFEXITED 19765105Seric # undef WEXITSTATUS 19865105Seric # undef HASUNAME 19965105Seric # define setpgid setpgrp 20065105Seric typedef int pid_t; 20165105Seric extern char *getenv(); 20265105Seric 20365105Seric # endif 20460564Seric # endif 20559023Seric #endif 20659023Seric 20764718Seric /* 20864813Seric ** DG/UX 20964813Seric ** 21064813Seric ** Tested on 5.4.2 21164718Seric */ 21264314Seric 21364718Seric #ifdef DGUX 21464718Seric # define SYSTEM5 1 21564718Seric # define LA_TYPE LA_SUBR 21664718Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 21764718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21864718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 21964718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 22064718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 22165167Seric # ifndef IDENTPROTO 22265167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 22365167Seric # endif 22464718Seric # undef SETPROCTITLE 22564813Seric 22664813Seric /* these include files must be included early on DG/UX */ 22764813Seric # include <netinet/in.h> 22864813Seric # include <arpa/inet.h> 22964813Seric 23064718Seric # define inet_addr dgux_inet_addr 23164718Seric extern long dgux_inet_addr(); 23264718Seric #endif 23364718Seric 23464718Seric 23563902Seric /* 23663902Seric ** Digital Ultrix 4.2A or 4.3 23764264Seric ** 23864264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 23964264Seric ** not dropped when the process exits. This causes major problems, 24064264Seric ** so flock is the only alternative. 24163902Seric */ 24263902Seric 24360564Seric #ifdef ultrix 24460564Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 24564035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 24663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 24764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 24864264Seric # define HASFLOCK 1 /* has flock(2) call */ 24965135Seric # ifdef vax 25065135Seric # define LA_TYPE LA_FLOAT 25165135Seric # else 25265135Seric # define LA_TYPE LA_INT 25365135Seric # define LA_AVENRUN "avenrun" 25465135Seric # endif 25565167Seric # ifndef IDENTPROTO 25665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 25765167Seric # endif 25860564Seric #endif 25960564Seric 26064314Seric 26163902Seric /* 26263902Seric ** OSF/1 (tested on Alpha) 26363902Seric */ 26463902Seric 26563787Seric #ifdef __osf__ 26664314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 26763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 26864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 26964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 27064831Seric # define HASFLOCK 1 /* has flock(2) call */ 27163962Seric # define LA_TYPE LA_INT 27264813Seric # ifndef _PATH_SENDMAILPID 27364813Seric # define _PATH_SENDMAILPID "/var/run/sendmial.pid" 27464813Seric # endif 27559287Seric #endif 27659287Seric 27764314Seric 27863902Seric /* 27963902Seric ** NeXTstep 28063902Seric */ 28163902Seric 28264076Seric #ifdef NeXT 28364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 28464035Seric # define HASFLOCK 1 /* has flock(2) call */ 28564125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 28664314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 28764563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 28863753Seric # define sleep sleepX 28964155Seric # define setpgid setpgrp 29064295Seric # ifndef LA_TYPE 29164295Seric # define LA_TYPE LA_MACH 29264295Seric # endif 29364500Seric # ifndef _POSIX_SOURCE 29464035Seric typedef int pid_t; 29564500Seric # undef WEXITSTATUS 29664500Seric # undef WIFEXITED 29764500Seric # endif 29864072Seric # ifndef _PATH_SENDMAILCF 29964072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 30064072Seric # endif 30164072Seric # ifndef _PATH_SENDMAILPID 30264072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 30364072Seric # endif 30459288Seric #endif 30559288Seric 30664314Seric 30763902Seric /* 30863962Seric ** 4.4 BSD 30964831Seric ** 31064831Seric ** See also BSD defines. 31163902Seric */ 31263902Seric 31360568Seric #ifdef BSD4_4 31464072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 31564314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 31660568Seric # include <sys/cdefs.h> 31763838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 31864072Seric # ifndef LA_TYPE 31964072Seric # define LA_TYPE LA_SUBR 32064072Seric # endif 32160568Seric #endif 32260568Seric 32364314Seric 32463902Seric /* 32565049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 32664733Seric ** 32764733Seric ** 4.3BSD clone, closer to 4.4BSD 32864831Seric ** 32964831Seric ** See also BSD defines. 33064733Seric */ 33164733Seric 33265049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 33364733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 33464733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 33564733Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 33664733Seric # include <sys/cdefs.h> 33764733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 33864733Seric # ifndef LA_TYPE 33964733Seric # define LA_TYPE LA_SUBR 34064733Seric # endif 34164733Seric #endif 34264733Seric 34364733Seric 34464733Seric /* 34564813Seric ** Mach386 34664813Seric ** 34764813Seric ** For mt Xinu's Mach386 system. 34864813Seric */ 34964813Seric 35064813Seric #if defined(MACH) && defined(i386) 35164813Seric # define MACH386 1 35264813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 35364813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 35464813Seric # define HASFLOCK 1 /* has flock(2) call */ 35564813Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 35664813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 35764813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 35864813Seric # define setpgid setpgrp 35964813Seric # ifndef LA_TYPE 36064813Seric # define LA_TYPE LA_FLOAT 36164813Seric # endif 36264962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 36364813Seric # undef WEXITSTATUS 36464813Seric # undef WIFEXITED 36564813Seric # ifndef _PATH_SENDMAILCF 36664813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 36764813Seric # endif 36864813Seric # ifndef _PATH_SENDMAILPID 36964813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 37064813Seric # endif 37164813Seric #endif 37264813Seric 37364813Seric 37464813Seric /* 37563969Seric ** 4.3 BSD -- this is for very old systems 37663969Seric ** 37763969Seric ** You'll also have to install a new resolver library. 37863969Seric ** I don't guarantee that support for this environment is complete. 37963969Seric */ 38063969Seric 38163969Seric #ifdef oldBSD43 38263969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 38363969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 38463970Seric # define ARBPTR_T char * 38564155Seric # define setpgid setpgrp 38663969Seric # ifndef LA_TYPE 38763969Seric # define LA_TYPE LA_FLOAT 38863969Seric # endif 38963969Seric # ifndef _PATH_SENDMAILCF 39063969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 39163969Seric # endif 39265167Seric # ifndef IDENTPROTO 39365167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 39465167Seric # endif 39564834Seric # undef WEXITSTATUS 39664834Seric # undef WIFEXITED 39764834Seric typedef short pid_t; 39864834Seric extern int errno; 39963969Seric #endif 40063969Seric 40164314Seric 40263969Seric /* 40363902Seric ** SCO Unix 40465087Seric ** 40565087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 40665087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 40765087Seric ** The second is, I believe, for an older version. 40863902Seric */ 40963902Seric 41065087Seric #ifdef _SCO_unix_4_2 41165087Seric # define _SCO_unix_ 41265087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 41365087Seric # define _PATH_UNIX "/unix" 41465087Seric # ifndef _PATH_SENDMAILCF 41565087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 41665087Seric # endif 41765087Seric # ifndef _PATH_SENDMAILPID 41865087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 41965087Seric # endif 42065087Seric #endif 42165087Seric 42263838Seric #ifdef _SCO_unix_ 42363838Seric # define SYSTEM5 1 /* include all the System V defines */ 42464035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 42563987Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 42663838Seric # define FORK fork 42763838Seric # define MAXPATHLEN PATHSIZE 42864718Seric # define LA_TYPE LA_SHORT 42964813Seric # undef NETUNIX /* no unix domain socket support */ 43063838Seric #endif 43163838Seric 43264314Seric 43363962Seric /* 43463962Seric ** ConvexOS 11.0 and later 43563962Seric */ 43663962Seric 43763962Seric #ifdef _CONVEX_SOURCE 43863977Seric # define BSD 1 /* include all the BSD defines */ 43963977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 44063962Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 44163962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 44263977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 44363962Seric # define LA_TYPE LA_FLOAT 44465167Seric # ifndef IDENTPROTO 44565167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 44665167Seric # endif 44763962Seric #endif 44863962Seric 44964314Seric 45063962Seric /* 45164999Seric ** RISC/os 4.52 45263962Seric ** 45364999Seric ** Gives a ton of warning messages, but otherwise compiles. 45463962Seric */ 45563962Seric 45663965Seric #ifdef RISCOS 45764999Seric 45863962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 45964831Seric # define HASFLOCK 1 /* has flock(2) call */ 46064999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 46164999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 46263962Seric # define LA_TYPE LA_INT 46363962Seric # define LA_AVENRUN "avenrun" 46463962Seric # define _PATH_UNIX "/unix" 46564999Seric # undef WIFEXITED 46664999Seric 46764999Seric # define setpgid setpgrp 46864999Seric 46964999Seric extern int errno; 47064999Seric typedef int pid_t; 47164999Seric #define SIGFUNC_DEFINED 47264999Seric typedef int (*sigfunc_t)(); 47364999Seric extern char *getenv(); 47464999Seric extern void *malloc(); 47564999Seric 47663962Seric #endif 47763962Seric 47864314Seric 47964155Seric /* 48064155Seric ** Linux 0.99pl10 and above... 48164155Seric ** From Karl London <karl@borg.demon.co.uk>. 48264155Seric */ 48364155Seric 48464770Seric #ifdef __linux__ 48564155Seric # define BSD 1 /* pretend to be BSD based today */ 48664155Seric # undef NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 48764155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 48864380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 48964155Seric # ifndef LA_TYPE 49064155Seric # define LA_TYPE LA_FLOAT 49164155Seric # endif 49264763Seric # include <sys/sysmacros.h> 49365046Seric # define GIDSET_T gid_t 49464155Seric #endif 49564155Seric 49664155Seric 49764345Seric /* 49864345Seric ** DELL SVR4 Issue 2.2, and others 49964345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 50064345Seric ** 50164345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 50264345Seric ** defined, and the definitions conflict. 50364924Seric ** 50464924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 50564924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 50664924Seric ** (SVR4.0/386 version 3.0). 50764345Seric */ 50864345Seric 50964345Seric #ifdef DELL_SVR4 510*65189Seric /* no changes necessary */ 511*65189Seric /* see general __svr4__ defines below */ 51264345Seric #endif 51364345Seric 51464345Seric 51564380Seric /* 51664380Seric ** Apple A/UX 3.0 51764380Seric */ 51864345Seric 51964380Seric #ifdef _AUX_SOURCE 52064729Seric # include <sys/sysmacros.h> 52164380Seric # define BSD /* has BSD routines */ 52264380Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 52364380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 52464380Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 52564380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 52664561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 52765167Seric # ifndef IDENTPROTO 52865167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 52965167Seric # endif 53064380Seric # define FORK fork 53164380Seric # ifndef _PATH_SENDMAILCF 53264380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 53364380Seric # endif 53464380Seric # ifndef LA_TYPE 53564380Seric # define LA_TYPE LA_ZERO 53664380Seric # endif 53764560Seric # undef WIFEXITED 53864560Seric # undef WEXITSTATUS 53964380Seric #endif 54064380Seric 54164380Seric 54264705Seric /* 54364705Seric ** Encore UMAX V 54464705Seric ** 54564705Seric ** Not extensively tested. 54664705Seric */ 54764380Seric 54864705Seric #ifdef UMAXV 54964705Seric # include <limits.h> 55064705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 55164705Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 55264705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 55364705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 55464705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 55564705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 55664705Seric # define FORK fork /* no vfork(2) primitive available */ 55764705Seric # define MAXPATHLEN PATH_MAX 55864705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 55964705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 56064705Seric # undef WIFEXITED 56164705Seric # undef WEXITSTATUS 56264705Seric #endif 56364705Seric 56464705Seric 56564939Seric /* 56664939Seric ** Stardent Titan 3000 running TitanOS 4.2. 56764939Seric ** 56864939Seric ** Must be compiled in "cc -43" mode. 56964939Seric ** 57064944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 57164939Seric ** 57264939Seric ** Note the tweaking below after the BSD defines are set. 57364939Seric */ 57464705Seric 57564939Seric #ifdef titan 57664939Seric # define setpgid setpgrp 57764939Seric typedef int pid_t; 57864939Seric # undef WIFEXITED 57964939Seric # undef WEXITSTATUS 58064939Seric #endif 58164939Seric 58264939Seric 58364962Seric /* 58464962Seric ** Sequent DYNIX 3.2.0 58564962Seric ** 58664962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 58764962Seric */ 58864939Seric 58964962Seric #ifdef sequent 59064962Seric # define BSD 1 59164962Seric # define HASUNSETENV 1 59264962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 59364962Seric # define WAITUNION 1 59464962Seric # define LA_TYPE LA_FLOAT 59564962Seric # ifdef _POSIX_VERSION 59664962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 59764962Seric # endif 59864962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 59964962Seric # define setpgid setpgrp 60064962Seric 60164962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 60264962Seric # undef WIFEXITED 60364962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 60464962Seric ((union wait*)&(s))->w_termsig == 0) 60564962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 60664962Seric typedef int pid_t; 60764962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 60864962Seric 60964962Seric # ifndef _PATH_UNIX 61064962Seric # define _PATH_UNIX "/dynix" 61164962Seric # endif 61264962Seric # ifndef _PATH_SENDMAILCF 61364962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 61464962Seric # endif 61564962Seric 61664962Seric #endif 61764962Seric 61864962Seric 61964962Seric 62064962Seric 62163902Seric /********************************************************************** 62263787Seric ** End of Per-Operating System defines 62363902Seric **********************************************************************/ 62463787Seric 62563949Seric /********************************************************************** 62663949Seric ** More general defines 62763949Seric **********************************************************************/ 62863949Seric 62963962Seric /* general BSD defines */ 63063962Seric #ifdef BSD 63164035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 63264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 63364035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 63464035Seric # define HASFLOCK 1 /* has flock(2) call */ 63563962Seric #endif 63663962Seric 637*65189Seric /* general System V Release 4 defines */ 638*65189Seric #ifdef __svr4__ 639*65189Seric # define SYSTEM5 1 640*65189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 641*65189Seric # define setreuid(r, e) seteuid(e) 642*65189Seric 643*65189Seric # ifndef _PATH_UNIX 644*65189Seric # define _PATH_UNIX "/unix" 645*65189Seric # endif 646*65189Seric # ifndef _PATH_SENDMAILCF 647*65189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 648*65189Seric # endif 649*65189Seric # ifndef _PATH_SENDMAILPID 650*65189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 651*65189Seric # endif 652*65189Seric # ifndef SYSLOG_BUFSIZE 653*65189Seric # define SYSLOG_BUFSIZE 128 654*65189Seric # endif 655*65189Seric #endif 656*65189Seric 65763787Seric /* general System V defines */ 65863787Seric # ifdef SYSTEM5 65964813Seric # include <sys/sysmacros.h> 66063949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 66163949Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 66264705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 66364962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 66463962Seric # ifndef LA_TYPE 66563962Seric # define LA_TYPE LA_INT 66663962Seric # endif 66763949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 66863949Seric # define bzero(d, l) (memset((d), '\0', (l))) 66963949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 67063787Seric # endif 67163787Seric 67263949Seric /* general POSIX defines */ 67363949Seric #ifdef _POSIX_VERSION 67464718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 67564718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 67663949Seric #endif 67763949Seric 67863787Seric /* 67963937Seric ** If no type for argument two of getgroups call is defined, assume 68063937Seric ** it's an integer -- unfortunately, there seem to be several choices 68163937Seric ** here. 68263937Seric */ 68363937Seric 68463937Seric #ifndef GIDSET_T 68563937Seric # define GIDSET_T int 68663937Seric #endif 68763937Seric 68864939Seric /* 68964939Seric ** Tweaking for systems that (for example) claim to be BSD but 69064939Seric ** don't have all the standard BSD routines (boo hiss). 69164939Seric */ 69264439Seric 69364939Seric #ifdef titan 69464939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 69564939Seric #endif 69664939Seric 69765167Seric /* 69865167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 69965167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 70065167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 70165167Seric ** are closed. Some firewalls return this error if you try to connect 70265167Seric ** to the IDENT port (113), so you can't receive email from these hosts 70365167Seric ** on these systems. The firewall really should use a more specific 70465167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 70565167Seric ** not explicitly set to zero above, default it on. 70665167Seric */ 70764939Seric 70865167Seric #ifndef IDENTPROTO 70965167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 71065167Seric #endif 71165167Seric 71265167Seric 71364439Seric /********************************************************************** 71459023Seric ** Remaining definitions should never have to be changed. They are 71559023Seric ** primarily to provide back compatibility for older systems -- for 71659287Seric ** example, it includes some POSIX compatibility definitions 71764439Seric **********************************************************************/ 71859023Seric 71959388Seric /* System 5 compatibility */ 72059388Seric #ifndef S_ISREG 72164944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 72259388Seric #endif 72364944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 72464944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 72564944Seric #endif 72659388Seric #ifndef S_IWGRP 72759388Seric #define S_IWGRP 020 72859388Seric #endif 72959388Seric #ifndef S_IWOTH 73059388Seric #define S_IWOTH 002 73159388Seric #endif 73259388Seric 73359023Seric /* 73450537Seric ** Older systems don't have this error code -- it should be in 73550537Seric ** /usr/include/sysexits.h. 73650537Seric */ 73750537Seric 73850537Seric # ifndef EX_CONFIG 73950537Seric # define EX_CONFIG 78 /* configuration error */ 74050537Seric # endif 74156852Seric 74264718Seric /* pseudo-code used in server SMTP */ 74364718Seric # define EX_QUIT 22 /* drop out of server immediately */ 74464718Seric 74564718Seric 74663993Seric /* 74763993Seric ** These are used in a few cases where we need some special 74863993Seric ** error codes, but where the system doesn't provide something 74963993Seric ** reasonable. They are printed in errstring. 75063993Seric */ 75163993Seric 75263993Seric #ifndef E_PSEUDOBASE 75363993Seric # define E_PSEUDOBASE 256 75463993Seric #endif 75563993Seric 75663993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 75763993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 75863993Seric 75963970Seric /* type of arbitrary pointer */ 76063970Seric #ifndef ARBPTR_T 76163970Seric # define ARBPTR_T void * 76263970Seric #endif 76363970Seric 76460568Seric #ifndef __P 76560568Seric # include "cdefs.h" 76660568Seric #endif 76760568Seric 76856852Seric /* 76958778Seric ** Do some required dependencies 77058778Seric */ 77158778Seric 77258778Seric #if defined(NETINET) || defined(NETISO) 77359107Seric # define SMTP 1 /* enable user and server SMTP */ 77459107Seric # define QUEUE 1 /* enable queueing */ 77559107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 77658778Seric #endif 77758778Seric 77858778Seric 77958778Seric /* 78056852Seric ** Arrange to use either varargs or stdargs 78156852Seric */ 78256852Seric 78356852Seric # ifdef __STDC__ 78456852Seric 78556852Seric # include <stdarg.h> 78656852Seric 78756852Seric # define VA_LOCAL_DECL va_list ap; 78856852Seric # define VA_START(f) va_start(ap, f) 78956852Seric # define VA_END va_end(ap) 79056852Seric 79156852Seric # else 79256852Seric 79356852Seric # include <varargs.h> 79456852Seric 79556852Seric # define VA_LOCAL_DECL va_list ap; 79656852Seric # define VA_START(f) va_start(ap) 79756852Seric # define VA_END va_end(ap) 79856852Seric 79956852Seric # endif 80057631Seric 80157943Seric #ifdef HASUNAME 80257631Seric # include <sys/utsname.h> 80357631Seric # ifdef newstr 80457631Seric # undef newstr 80557631Seric # endif 80657943Seric #else /* ! HASUNAME */ 80757631Seric # define NODE_LENGTH 32 80857631Seric struct utsname 80957631Seric { 81057631Seric char nodename[NODE_LENGTH+1]; 81157631Seric }; 81257943Seric #endif /* HASUNAME */ 81357642Seric 81463838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 81563838Seric # define MAXHOSTNAMELEN 256 81657735Seric #endif 81758153Seric 81858153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 81958153Seric # define SIGCHLD SIGCLD 82058153Seric #endif 82158153Seric 82258153Seric #ifndef STDIN_FILENO 82358153Seric #define STDIN_FILENO 0 82458153Seric #endif 82558153Seric 82658153Seric #ifndef STDOUT_FILENO 82758153Seric #define STDOUT_FILENO 1 82858153Seric #endif 82958153Seric 83058153Seric #ifndef STDERR_FILENO 83158153Seric #define STDERR_FILENO 2 83258153Seric #endif 83358689Seric 83464072Seric #ifndef LOCK_SH 83564035Seric # define LOCK_SH 0x01 /* shared lock */ 83664035Seric # define LOCK_EX 0x02 /* exclusive lock */ 83764035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 83864035Seric # define LOCK_UN 0x08 /* unlock */ 83964035Seric #endif 84058692Seric 84164035Seric #ifndef SIG_ERR 84264035Seric # define SIG_ERR ((void (*)()) -1) 84358689Seric #endif 84458702Seric 84564500Seric #ifndef WEXITSTATUS 84664500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 84764500Seric #endif 84864500Seric #ifndef WIFEXITED 84964500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 85064500Seric #endif 85164500Seric 85264561Seric #ifndef SIGFUNC_DEFINED 85364561Seric typedef void (*sigfunc_t) __P((int)); 85464561Seric #endif 85564561Seric 85665053Seric /* size of syslog buffer */ 85765053Seric #ifndef SYSLOG_BUFSIZE 85865053Seric # define SYSLOG_BUFSIZE 1024 85965053Seric #endif 86065053Seric 86158702Seric /* 86258702Seric ** Size of tobuf (deliver.c) 86358702Seric ** Tweak this to match your syslog implementation. It will have to 86458702Seric ** allow for the extra information printed. 86558702Seric */ 86658702Seric 86758702Seric #ifndef TOBUFSIZE 86865053Seric # if (SYSLOG_BUFSIZE) > 512 86965053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 87065053Seric # else 87165053Seric # define TOBUFSIZE 256 87265053Seric # endif 87358702Seric #endif 87460219Seric 87565015Seric /* 87665015Seric ** Size of prescan buffer. 87765015Seric ** Despite comments in the _sendmail_ book, this probably should 87865015Seric ** not be changed; there are some hard-to-define dependencies. 87965015Seric */ 88065015Seric 88165015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 88260219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 88360219Seric # ifndef FORK 88460219Seric # define FORK vfork /* function to call to fork mailer */ 88560219Seric # endif 886