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*65172Seric * @(#)conf.h 8.66 (Berkeley) 12/17/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 HASSETREUID 1 /* has setreuid(2) call */ 16164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 16264813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 16360564Seric 16464842Seric # ifdef SOLARIS_2_3 16564842Seric # define SOLARIS 16664842Seric # endif 16764842Seric 16860602Seric # ifdef SOLARIS 16963902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 17063949Seric # define SYSTEM5 1 /* use System V definitions */ 17163977Seric # define setreuid(r, e) seteuid(e) 17263787Seric # include <sys/time.h> 17364832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 17464832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 175*65172Seric # define GIDSET_T gid_t 17663962Seric # define _PATH_UNIX "/kernel/unix" 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 */ 18660602Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 18764831Seric # define HASFLOCK 1 /* has flock(2) call */ 18860564Seric # include <vfork.h> 18963787Seric 19065105Seric # ifdef SUNOS403 19165105Seric /* special tweaking for SunOS 4.0.3 */ 19265105Seric # include <malloc.h> 19365105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 19465105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 19565105Seric # undef WIFEXITED 19665105Seric # undef WEXITSTATUS 19765105Seric # undef HASUNAME 19865105Seric # define setpgid setpgrp 19965105Seric typedef int pid_t; 20065105Seric extern char *getenv(); 20165105Seric 20265105Seric # endif 20360564Seric # endif 20459023Seric #endif 20559023Seric 20664718Seric /* 20764813Seric ** DG/UX 20864813Seric ** 20964813Seric ** Tested on 5.4.2 21064718Seric */ 21164314Seric 21264718Seric #ifdef DGUX 21364718Seric # define SYSTEM5 1 21464718Seric # define LA_TYPE LA_SUBR 21564718Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 21664718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21764718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 21864718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 21964718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 22065167Seric # ifndef IDENTPROTO 22165167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 22265167Seric # endif 22364718Seric # undef SETPROCTITLE 22464813Seric 22564813Seric /* these include files must be included early on DG/UX */ 22664813Seric # include <netinet/in.h> 22764813Seric # include <arpa/inet.h> 22864813Seric 22964718Seric # define inet_addr dgux_inet_addr 23064718Seric extern long dgux_inet_addr(); 23164718Seric #endif 23264718Seric 23364718Seric 23463902Seric /* 23563902Seric ** Digital Ultrix 4.2A or 4.3 23664264Seric ** 23764264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 23864264Seric ** not dropped when the process exits. This causes major problems, 23964264Seric ** so flock is the only alternative. 24063902Seric */ 24163902Seric 24260564Seric #ifdef ultrix 24360564Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 24464035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 24563962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 24664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 24764264Seric # define HASFLOCK 1 /* has flock(2) call */ 24865135Seric # ifdef vax 24965135Seric # define LA_TYPE LA_FLOAT 25065135Seric # else 25165135Seric # define LA_TYPE LA_INT 25265135Seric # define LA_AVENRUN "avenrun" 25365135Seric # endif 25465167Seric # ifndef IDENTPROTO 25565167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 25665167Seric # endif 25760564Seric #endif 25860564Seric 25964314Seric 26063902Seric /* 26163902Seric ** OSF/1 (tested on Alpha) 26263902Seric */ 26363902Seric 26463787Seric #ifdef __osf__ 26564314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 26663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 26764035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 26864035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 26964831Seric # define HASFLOCK 1 /* has flock(2) call */ 27063962Seric # define LA_TYPE LA_INT 27164813Seric # ifndef _PATH_SENDMAILPID 27264813Seric # define _PATH_SENDMAILPID "/var/run/sendmial.pid" 27364813Seric # endif 27459287Seric #endif 27559287Seric 27664314Seric 27763902Seric /* 27863902Seric ** NeXTstep 27963902Seric */ 28063902Seric 28164076Seric #ifdef NeXT 28264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 28364035Seric # define HASFLOCK 1 /* has flock(2) call */ 28464125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 28564314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 28664563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 28763753Seric # define sleep sleepX 28864155Seric # define setpgid setpgrp 28964295Seric # ifndef LA_TYPE 29064295Seric # define LA_TYPE LA_MACH 29164295Seric # endif 29264500Seric # ifndef _POSIX_SOURCE 29364035Seric typedef int pid_t; 29464500Seric # undef WEXITSTATUS 29564500Seric # undef WIFEXITED 29664500Seric # endif 29764072Seric # ifndef _PATH_SENDMAILCF 29864072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 29964072Seric # endif 30064072Seric # ifndef _PATH_SENDMAILPID 30164072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 30264072Seric # endif 30359288Seric #endif 30459288Seric 30564314Seric 30663902Seric /* 30763962Seric ** 4.4 BSD 30864831Seric ** 30964831Seric ** See also BSD defines. 31063902Seric */ 31163902Seric 31260568Seric #ifdef BSD4_4 31364072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 31464314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 31560568Seric # include <sys/cdefs.h> 31663838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 31764072Seric # ifndef LA_TYPE 31864072Seric # define LA_TYPE LA_SUBR 31964072Seric # endif 32060568Seric #endif 32160568Seric 32264314Seric 32363902Seric /* 32465049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 32564733Seric ** 32664733Seric ** 4.3BSD clone, closer to 4.4BSD 32764831Seric ** 32864831Seric ** See also BSD defines. 32964733Seric */ 33064733Seric 33165049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 33264733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 33364733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 33464733Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 33564733Seric # include <sys/cdefs.h> 33664733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 33764733Seric # ifndef LA_TYPE 33864733Seric # define LA_TYPE LA_SUBR 33964733Seric # endif 34064733Seric #endif 34164733Seric 34264733Seric 34364733Seric /* 34464813Seric ** Mach386 34564813Seric ** 34664813Seric ** For mt Xinu's Mach386 system. 34764813Seric */ 34864813Seric 34964813Seric #if defined(MACH) && defined(i386) 35064813Seric # define MACH386 1 35164813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 35264813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 35364813Seric # define HASFLOCK 1 /* has flock(2) call */ 35464813Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 35564813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 35664813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 35764813Seric # define setpgid setpgrp 35864813Seric # ifndef LA_TYPE 35964813Seric # define LA_TYPE LA_FLOAT 36064813Seric # endif 36164962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 36264813Seric # undef WEXITSTATUS 36364813Seric # undef WIFEXITED 36464813Seric # ifndef _PATH_SENDMAILCF 36564813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 36664813Seric # endif 36764813Seric # ifndef _PATH_SENDMAILPID 36864813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 36964813Seric # endif 37064813Seric #endif 37164813Seric 37264813Seric 37364813Seric /* 37463969Seric ** 4.3 BSD -- this is for very old systems 37563969Seric ** 37663969Seric ** You'll also have to install a new resolver library. 37763969Seric ** I don't guarantee that support for this environment is complete. 37863969Seric */ 37963969Seric 38063969Seric #ifdef oldBSD43 38163969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 38263969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 38363970Seric # define ARBPTR_T char * 38464155Seric # define setpgid setpgrp 38563969Seric # ifndef LA_TYPE 38663969Seric # define LA_TYPE LA_FLOAT 38763969Seric # endif 38863969Seric # ifndef _PATH_SENDMAILCF 38963969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 39063969Seric # endif 39165167Seric # ifndef IDENTPROTO 39265167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 39365167Seric # endif 39464834Seric # undef WEXITSTATUS 39564834Seric # undef WIFEXITED 39664834Seric typedef short pid_t; 39764834Seric extern int errno; 39863969Seric #endif 39963969Seric 40064314Seric 40163969Seric /* 40263902Seric ** SCO Unix 40365087Seric ** 40465087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 40565087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 40665087Seric ** The second is, I believe, for an older version. 40763902Seric */ 40863902Seric 40965087Seric #ifdef _SCO_unix_4_2 41065087Seric # define _SCO_unix_ 41165087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 41265087Seric # define _PATH_UNIX "/unix" 41365087Seric # ifndef _PATH_SENDMAILCF 41465087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 41565087Seric # endif 41665087Seric # ifndef _PATH_SENDMAILPID 41765087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 41865087Seric # endif 41965087Seric #endif 42065087Seric 42163838Seric #ifdef _SCO_unix_ 42263838Seric # define SYSTEM5 1 /* include all the System V defines */ 42364035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 42463987Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 42563838Seric # define FORK fork 42663838Seric # define MAXPATHLEN PATHSIZE 42764718Seric # define LA_TYPE LA_SHORT 42864813Seric # undef NETUNIX /* no unix domain socket support */ 42963838Seric #endif 43063838Seric 43164314Seric 43263962Seric /* 43363962Seric ** ConvexOS 11.0 and later 43463962Seric */ 43563962Seric 43663962Seric #ifdef _CONVEX_SOURCE 43763977Seric # define BSD 1 /* include all the BSD defines */ 43863977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 43963962Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 44063962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 44163977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 44263962Seric # define LA_TYPE LA_FLOAT 44365167Seric # ifndef IDENTPROTO 44465167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 44565167Seric # endif 44663962Seric #endif 44763962Seric 44864314Seric 44963962Seric /* 45064999Seric ** RISC/os 4.52 45163962Seric ** 45264999Seric ** Gives a ton of warning messages, but otherwise compiles. 45363962Seric */ 45463962Seric 45563965Seric #ifdef RISCOS 45664999Seric 45763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 45864831Seric # define HASFLOCK 1 /* has flock(2) call */ 45964999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 46064999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 46163962Seric # define LA_TYPE LA_INT 46263962Seric # define LA_AVENRUN "avenrun" 46363962Seric # define _PATH_UNIX "/unix" 46464999Seric # undef WIFEXITED 46564999Seric 46664999Seric # define setpgid setpgrp 46764999Seric 46864999Seric extern int errno; 46964999Seric typedef int pid_t; 47064999Seric #define SIGFUNC_DEFINED 47164999Seric typedef int (*sigfunc_t)(); 47264999Seric extern char *getenv(); 47364999Seric extern void *malloc(); 47464999Seric 47563962Seric #endif 47663962Seric 47764314Seric 47864155Seric /* 47964155Seric ** Linux 0.99pl10 and above... 48064155Seric ** From Karl London <karl@borg.demon.co.uk>. 48164155Seric */ 48264155Seric 48364770Seric #ifdef __linux__ 48464155Seric # define BSD 1 /* pretend to be BSD based today */ 48564155Seric # undef NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 48664155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 48764380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 48864155Seric # ifndef LA_TYPE 48964155Seric # define LA_TYPE LA_FLOAT 49064155Seric # endif 49164763Seric # include <sys/sysmacros.h> 49265046Seric # define GIDSET_T gid_t 49364155Seric #endif 49464155Seric 49564155Seric 49664345Seric /* 49764345Seric ** DELL SVR4 Issue 2.2, and others 49864345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 49964345Seric ** 50064345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 50164345Seric ** defined, and the definitions conflict. 50264924Seric ** 50364924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 50464924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 50564924Seric ** (SVR4.0/386 version 3.0). 50664345Seric */ 50764345Seric 50864345Seric #ifdef DELL_SVR4 50964345Seric # define SYSTEM5 1 51064924Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 51164924Seric # define setreuid(r, e) seteuid(e) 51264345Seric /* # include <sys/time.h> */ 51364345Seric # define _PATH_UNIX "/unix" 51464345Seric # ifndef _PATH_SENDMAILCF 51564345Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 51664345Seric # endif 51764345Seric # ifndef _PATH_SENDMAILPID 51864345Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 51964345Seric # endif 52065105Seric # ifndef SYSLOG_BUFSIZE 52165105Seric # define SYSLOG_BUFSIZE 128 52265105Seric # endif 52364345Seric #endif 52464345Seric 52564345Seric 52664380Seric /* 52764380Seric ** Apple A/UX 3.0 52864380Seric */ 52964345Seric 53064380Seric #ifdef _AUX_SOURCE 53164729Seric # include <sys/sysmacros.h> 53264380Seric # define BSD /* has BSD routines */ 53364380Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 53464380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 53564380Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 53664380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 53764561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 53865167Seric # ifndef IDENTPROTO 53965167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 54065167Seric # endif 54164380Seric # define FORK fork 54264380Seric # ifndef _PATH_SENDMAILCF 54364380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 54464380Seric # endif 54564380Seric # ifndef LA_TYPE 54664380Seric # define LA_TYPE LA_ZERO 54764380Seric # endif 54864560Seric # undef WIFEXITED 54964560Seric # undef WEXITSTATUS 55064380Seric #endif 55164380Seric 55264380Seric 55364705Seric /* 55464705Seric ** Encore UMAX V 55564705Seric ** 55664705Seric ** Not extensively tested. 55764705Seric */ 55864380Seric 55964705Seric #ifdef UMAXV 56064705Seric # include <limits.h> 56164705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 56264705Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 56364705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 56464705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 56564705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 56664705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 56764705Seric # define FORK fork /* no vfork(2) primitive available */ 56864705Seric # define MAXPATHLEN PATH_MAX 56964705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 57064705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 57164705Seric # undef WIFEXITED 57264705Seric # undef WEXITSTATUS 57364705Seric #endif 57464705Seric 57564705Seric 57664939Seric /* 57764939Seric ** Stardent Titan 3000 running TitanOS 4.2. 57864939Seric ** 57964939Seric ** Must be compiled in "cc -43" mode. 58064939Seric ** 58164944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 58264939Seric ** 58364939Seric ** Note the tweaking below after the BSD defines are set. 58464939Seric */ 58564705Seric 58664939Seric #ifdef titan 58764939Seric # define setpgid setpgrp 58864939Seric typedef int pid_t; 58964939Seric # undef WIFEXITED 59064939Seric # undef WEXITSTATUS 59164939Seric #endif 59264939Seric 59364939Seric 59464962Seric /* 59564962Seric ** Sequent DYNIX 3.2.0 59664962Seric ** 59764962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 59864962Seric */ 59964939Seric 60064962Seric #ifdef sequent 60164962Seric # define BSD 1 60264962Seric # define HASUNSETENV 1 60364962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 60464962Seric # define WAITUNION 1 60564962Seric # define LA_TYPE LA_FLOAT 60664962Seric # ifdef _POSIX_VERSION 60764962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 60864962Seric # endif 60964962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 61064962Seric # define setpgid setpgrp 61164962Seric 61264962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 61364962Seric # undef WIFEXITED 61464962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 61564962Seric ((union wait*)&(s))->w_termsig == 0) 61664962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 61764962Seric typedef int pid_t; 61864962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 61964962Seric 62064962Seric # ifndef _PATH_UNIX 62164962Seric # define _PATH_UNIX "/dynix" 62264962Seric # endif 62364962Seric # ifndef _PATH_SENDMAILCF 62464962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 62564962Seric # endif 62664962Seric 62764962Seric #endif 62864962Seric 62964962Seric 63064962Seric 63164962Seric 63263902Seric /********************************************************************** 63363787Seric ** End of Per-Operating System defines 63463902Seric **********************************************************************/ 63563787Seric 63663949Seric /********************************************************************** 63763949Seric ** More general defines 63863949Seric **********************************************************************/ 63963949Seric 64063962Seric /* general BSD defines */ 64163962Seric #ifdef BSD 64264035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 64364035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 64464035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 64564035Seric # define HASFLOCK 1 /* has flock(2) call */ 64663962Seric #endif 64763962Seric 64863787Seric /* general System V defines */ 64963787Seric # ifdef SYSTEM5 65064813Seric # include <sys/sysmacros.h> 65163949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 65263949Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 65364705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 65464962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 65563962Seric # ifndef LA_TYPE 65663962Seric # define LA_TYPE LA_INT 65763962Seric # endif 65863949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 65963949Seric # define bzero(d, l) (memset((d), '\0', (l))) 66063949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 66163787Seric # endif 66263787Seric 66363949Seric /* general POSIX defines */ 66463949Seric #ifdef _POSIX_VERSION 66564718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 66664718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 66763949Seric #endif 66863949Seric 66963787Seric /* 67063937Seric ** If no type for argument two of getgroups call is defined, assume 67163937Seric ** it's an integer -- unfortunately, there seem to be several choices 67263937Seric ** here. 67363937Seric */ 67463937Seric 67563937Seric #ifndef GIDSET_T 67663937Seric # define GIDSET_T int 67763937Seric #endif 67863937Seric 67964939Seric /* 68064939Seric ** Tweaking for systems that (for example) claim to be BSD but 68164939Seric ** don't have all the standard BSD routines (boo hiss). 68264939Seric */ 68364439Seric 68464939Seric #ifdef titan 68564939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 68664939Seric #endif 68764939Seric 68865167Seric /* 68965167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 69065167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 69165167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 69265167Seric ** are closed. Some firewalls return this error if you try to connect 69365167Seric ** to the IDENT port (113), so you can't receive email from these hosts 69465167Seric ** on these systems. The firewall really should use a more specific 69565167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 69665167Seric ** not explicitly set to zero above, default it on. 69765167Seric */ 69864939Seric 69965167Seric #ifndef IDENTPROTO 70065167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 70165167Seric #endif 70265167Seric 70365167Seric 70464439Seric /********************************************************************** 70559023Seric ** Remaining definitions should never have to be changed. They are 70659023Seric ** primarily to provide back compatibility for older systems -- for 70759287Seric ** example, it includes some POSIX compatibility definitions 70864439Seric **********************************************************************/ 70959023Seric 71059388Seric /* System 5 compatibility */ 71159388Seric #ifndef S_ISREG 71264944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 71359388Seric #endif 71464944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 71564944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 71664944Seric #endif 71759388Seric #ifndef S_IWGRP 71859388Seric #define S_IWGRP 020 71959388Seric #endif 72059388Seric #ifndef S_IWOTH 72159388Seric #define S_IWOTH 002 72259388Seric #endif 72359388Seric 72459023Seric /* 72550537Seric ** Older systems don't have this error code -- it should be in 72650537Seric ** /usr/include/sysexits.h. 72750537Seric */ 72850537Seric 72950537Seric # ifndef EX_CONFIG 73050537Seric # define EX_CONFIG 78 /* configuration error */ 73150537Seric # endif 73256852Seric 73364718Seric /* pseudo-code used in server SMTP */ 73464718Seric # define EX_QUIT 22 /* drop out of server immediately */ 73564718Seric 73664718Seric 73763993Seric /* 73863993Seric ** These are used in a few cases where we need some special 73963993Seric ** error codes, but where the system doesn't provide something 74063993Seric ** reasonable. They are printed in errstring. 74163993Seric */ 74263993Seric 74363993Seric #ifndef E_PSEUDOBASE 74463993Seric # define E_PSEUDOBASE 256 74563993Seric #endif 74663993Seric 74763993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 74863993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 74963993Seric 75063970Seric /* type of arbitrary pointer */ 75163970Seric #ifndef ARBPTR_T 75263970Seric # define ARBPTR_T void * 75363970Seric #endif 75463970Seric 75560568Seric #ifndef __P 75660568Seric # include "cdefs.h" 75760568Seric #endif 75860568Seric 75956852Seric /* 76058778Seric ** Do some required dependencies 76158778Seric */ 76258778Seric 76358778Seric #if defined(NETINET) || defined(NETISO) 76459107Seric # define SMTP 1 /* enable user and server SMTP */ 76559107Seric # define QUEUE 1 /* enable queueing */ 76659107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 76758778Seric #endif 76858778Seric 76958778Seric 77058778Seric /* 77156852Seric ** Arrange to use either varargs or stdargs 77256852Seric */ 77356852Seric 77456852Seric # ifdef __STDC__ 77556852Seric 77656852Seric # include <stdarg.h> 77756852Seric 77856852Seric # define VA_LOCAL_DECL va_list ap; 77956852Seric # define VA_START(f) va_start(ap, f) 78056852Seric # define VA_END va_end(ap) 78156852Seric 78256852Seric # else 78356852Seric 78456852Seric # include <varargs.h> 78556852Seric 78656852Seric # define VA_LOCAL_DECL va_list ap; 78756852Seric # define VA_START(f) va_start(ap) 78856852Seric # define VA_END va_end(ap) 78956852Seric 79056852Seric # endif 79157631Seric 79257943Seric #ifdef HASUNAME 79357631Seric # include <sys/utsname.h> 79457631Seric # ifdef newstr 79557631Seric # undef newstr 79657631Seric # endif 79757943Seric #else /* ! HASUNAME */ 79857631Seric # define NODE_LENGTH 32 79957631Seric struct utsname 80057631Seric { 80157631Seric char nodename[NODE_LENGTH+1]; 80257631Seric }; 80357943Seric #endif /* HASUNAME */ 80457642Seric 80563838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 80663838Seric # define MAXHOSTNAMELEN 256 80757735Seric #endif 80858153Seric 80958153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 81058153Seric # define SIGCHLD SIGCLD 81158153Seric #endif 81258153Seric 81358153Seric #ifndef STDIN_FILENO 81458153Seric #define STDIN_FILENO 0 81558153Seric #endif 81658153Seric 81758153Seric #ifndef STDOUT_FILENO 81858153Seric #define STDOUT_FILENO 1 81958153Seric #endif 82058153Seric 82158153Seric #ifndef STDERR_FILENO 82258153Seric #define STDERR_FILENO 2 82358153Seric #endif 82458689Seric 82564072Seric #ifndef LOCK_SH 82664035Seric # define LOCK_SH 0x01 /* shared lock */ 82764035Seric # define LOCK_EX 0x02 /* exclusive lock */ 82864035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 82964035Seric # define LOCK_UN 0x08 /* unlock */ 83064035Seric #endif 83158692Seric 83264035Seric #ifndef SIG_ERR 83364035Seric # define SIG_ERR ((void (*)()) -1) 83458689Seric #endif 83558702Seric 83664500Seric #ifndef WEXITSTATUS 83764500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 83864500Seric #endif 83964500Seric #ifndef WIFEXITED 84064500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 84164500Seric #endif 84264500Seric 84364561Seric #ifndef SIGFUNC_DEFINED 84464561Seric typedef void (*sigfunc_t) __P((int)); 84564561Seric #endif 84664561Seric 84765053Seric /* size of syslog buffer */ 84865053Seric #ifndef SYSLOG_BUFSIZE 84965053Seric # define SYSLOG_BUFSIZE 1024 85065053Seric #endif 85165053Seric 85258702Seric /* 85358702Seric ** Size of tobuf (deliver.c) 85458702Seric ** Tweak this to match your syslog implementation. It will have to 85558702Seric ** allow for the extra information printed. 85658702Seric */ 85758702Seric 85858702Seric #ifndef TOBUFSIZE 85965053Seric # if (SYSLOG_BUFSIZE) > 512 86065053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 86165053Seric # else 86265053Seric # define TOBUFSIZE 256 86365053Seric # endif 86458702Seric #endif 86560219Seric 86665015Seric /* 86765015Seric ** Size of prescan buffer. 86865015Seric ** Despite comments in the _sendmail_ book, this probably should 86965015Seric ** not be changed; there are some hard-to-define dependencies. 87065015Seric */ 87165015Seric 87265015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 87360219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 87460219Seric # ifndef FORK 87560219Seric # define FORK vfork /* function to call to fork mailer */ 87660219Seric # endif 877