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*65049Seric * @(#)conf.h 8.59 (Berkeley) 12/10/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 /* 6664032Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 6764032Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 6864032Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 6964032Seric ** are closed. Some firewalls return this error if you try to connect 7064032Seric ** to the IDENT port (113), so you can't receive email from these hosts 7164032Seric ** on these systems. The firewall really should use a more specific 7264032Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. This 7364032Seric ** will get #undefed below as needed. 7464032Seric */ 7564032Seric 7664929Seric #ifndef IDENTPROTO 7764032Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 7864929Seric #endif 7964032Seric 8064944Seric /* 8164944Seric ** Most systems have symbolic links today, so default them on. You 8264944Seric ** can turn them off by #undef'ing this below. 8364944Seric */ 8464944Seric 8564944Seric # define HASLSTAT 1 /* has lstat(2) call */ 8664944Seric 8764962Seric /* 8864962Seric ** General "standard C" defines. 8964962Seric ** 9064962Seric ** These may be undone later, to cope with systems that claim to 9164962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 9264962Seric ** doesn't realize that the library is part of the language. 9364962Seric ** 9464962Seric ** Life would be much easier if we could get rid of this sort 9564962Seric ** of bozo problems. 9664962Seric */ 9764962Seric 9864962Seric #ifdef __STDC__ 9964962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 10064962Seric #endif 10164962Seric 10263902Seric /********************************************************************** 10359023Seric ** Operating system configuration. 10459023Seric ** 10559023Seric ** Unless you are porting to a new OS, you shouldn't have to 10659023Seric ** change these. 10763902Seric **********************************************************************/ 10856823Seric 10963787Seric /* 11063787Seric ** Per-Operating System defines 11163787Seric */ 11263787Seric 11364314Seric 11463902Seric /* 11563902Seric ** HP-UX -- tested for 8.07 11663902Seric */ 11763902Seric 11859348Seric # ifdef __hpux 11964727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 12064727Seric # undef m_flags 12163787Seric # define SYSTEM5 1 /* include all the System V defines */ 12264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 12364314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 12464035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 12563902Seric # define setreuid(r, e) setresuid(r, e, -1) 12663962Seric # define LA_TYPE LA_FLOAT 12763962Seric # define _PATH_UNIX "/hp-ux" 12864358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 12956823Seric # endif 13056823Seric 13164314Seric 13263902Seric /* 13363902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 13463902Seric */ 13563902Seric 13660224Seric # ifdef _AIX3 13764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 13864840Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 13964840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 14060219Seric # define FORK fork /* no vfork primitive available */ 14164494Seric # undef SETPROCTITLE /* setproctitle confuses AIX */ 14260219Seric # endif 14360219Seric 14464314Seric 14563902Seric /* 14663902Seric ** Silicon Graphics IRIX 14763902Seric ** 14863965Seric ** Compiles on 4.0.1. 14963902Seric */ 15063902Seric 15163753Seric # ifdef IRIX 15264727Seric # include <sys/sysmacros.h> 15364035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 15464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 15564314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 15663753Seric # define FORK fork /* no vfork primitive available */ 15764562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 15864155Seric # define setpgid BSDsetpgrp 15963937Seric # define GIDSET_T gid_t 16063753Seric # endif 16163753Seric 16263902Seric 16363902Seric /* 16464813Seric ** SunOS and Solaris 16564813Seric ** 16664813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 16764813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 16863902Seric */ 16963902Seric 17063787Seric #if defined(sun) && !defined(BSD) 17159074Seric 17263962Seric # define LA_TYPE LA_INT 17364035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 17464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 17564813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 17660564Seric 17764842Seric # ifdef SOLARIS_2_3 17864842Seric # define SOLARIS 17964842Seric # endif 18064842Seric 18160602Seric # ifdef SOLARIS 18263902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 18363949Seric # define SYSTEM5 1 /* use System V definitions */ 18463977Seric # define setreuid(r, e) seteuid(e) 18563787Seric # include <sys/time.h> 18664832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 18764832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 18863962Seric # define _PATH_UNIX "/kernel/unix" 18963962Seric # ifndef _PATH_SENDMAILCF 19063962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 19164072Seric # endif 19264072Seric # ifndef _PATH_SENDMAILPID 19363962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 19463962Seric # endif 19563787Seric 19660602Seric # else 19763787Seric /* SunOS 4.1.x */ 19860602Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 19964831Seric # define HASFLOCK 1 /* has flock(2) call */ 20060564Seric # include <vfork.h> 20163787Seric 20260564Seric # endif 20359023Seric #endif 20459023Seric 20564718Seric /* 20664813Seric ** DG/UX 20764813Seric ** 20864813Seric ** Tested on 5.4.2 20964718Seric */ 21064314Seric 21164718Seric #ifdef DGUX 21264718Seric # define SYSTEM5 1 21364718Seric # define LA_TYPE LA_SUBR 21464718Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 21564718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21664718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 21764718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 21864718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 21964718Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 22064718Seric # undef SETPROCTITLE 22164813Seric 22264813Seric /* these include files must be included early on DG/UX */ 22364813Seric # include <netinet/in.h> 22464813Seric # include <arpa/inet.h> 22564813Seric 22664718Seric # define inet_addr dgux_inet_addr 22764718Seric extern long dgux_inet_addr(); 22864718Seric #endif 22964718Seric 23064718Seric 23163902Seric /* 23263902Seric ** Digital Ultrix 4.2A or 4.3 23364264Seric ** 23464264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 23564264Seric ** not dropped when the process exits. This causes major problems, 23664264Seric ** so flock is the only alternative. 23763902Seric */ 23863902Seric 23960564Seric #ifdef ultrix 24060564Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 24164035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 24263962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 24364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 24464264Seric # define HASFLOCK 1 /* has flock(2) call */ 24563962Seric # define LA_TYPE LA_INT 24663962Seric # define LA_AVENRUN "avenrun" 24764358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 24860564Seric #endif 24960564Seric 25064314Seric 25163902Seric /* 25263902Seric ** OSF/1 (tested on Alpha) 25363902Seric */ 25463902Seric 25563787Seric #ifdef __osf__ 25664314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 25763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 25864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 25964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 26064831Seric # define HASFLOCK 1 /* has flock(2) call */ 26163962Seric # define LA_TYPE LA_INT 26264813Seric # ifndef _PATH_SENDMAILPID 26364813Seric # define _PATH_SENDMAILPID "/var/run/sendmial.pid" 26464813Seric # endif 26559287Seric #endif 26659287Seric 26764314Seric 26863902Seric /* 26963902Seric ** NeXTstep 27063902Seric */ 27163902Seric 27264076Seric #ifdef NeXT 27364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 27464035Seric # define HASFLOCK 1 /* has flock(2) call */ 27564125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 27664314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 27764563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 27863753Seric # define sleep sleepX 27964155Seric # define setpgid setpgrp 28064295Seric # ifndef LA_TYPE 28164295Seric # define LA_TYPE LA_MACH 28264295Seric # endif 28364500Seric # ifndef _POSIX_SOURCE 28464035Seric typedef int pid_t; 28564500Seric # undef WEXITSTATUS 28664500Seric # undef WIFEXITED 28764500Seric # endif 28864072Seric # ifndef _PATH_SENDMAILCF 28964072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 29064072Seric # endif 29164072Seric # ifndef _PATH_SENDMAILPID 29264072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 29364072Seric # endif 29459288Seric #endif 29559288Seric 29664314Seric 29763902Seric /* 29863962Seric ** 4.4 BSD 29964831Seric ** 30064831Seric ** See also BSD defines. 30163902Seric */ 30263902Seric 30360568Seric #ifdef BSD4_4 30464072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 30564314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 30660568Seric # include <sys/cdefs.h> 30763838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 30864072Seric # ifndef LA_TYPE 30964072Seric # define LA_TYPE LA_SUBR 31064072Seric # endif 31160568Seric #endif 31260568Seric 31364314Seric 31463902Seric /* 315*65049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 31664733Seric ** 31764733Seric ** 4.3BSD clone, closer to 4.4BSD 31864831Seric ** 31964831Seric ** See also BSD defines. 32064733Seric */ 32164733Seric 322*65049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 32364733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 32464733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 32564733Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 32664733Seric # include <sys/cdefs.h> 32764733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 32864733Seric # ifndef LA_TYPE 32964733Seric # define LA_TYPE LA_SUBR 33064733Seric # endif 33164733Seric #endif 33264733Seric 33364733Seric 33464733Seric /* 33564813Seric ** Mach386 33664813Seric ** 33764813Seric ** For mt Xinu's Mach386 system. 33864813Seric */ 33964813Seric 34064813Seric #if defined(MACH) && defined(i386) 34164813Seric # define MACH386 1 34264813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 34364813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 34464813Seric # define HASFLOCK 1 /* has flock(2) call */ 34564813Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 34664813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 34764813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 34864813Seric # define setpgid setpgrp 34964813Seric # ifndef LA_TYPE 35064813Seric # define LA_TYPE LA_FLOAT 35164813Seric # endif 35264962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 35364813Seric # undef WEXITSTATUS 35464813Seric # undef WIFEXITED 35564813Seric # ifndef _PATH_SENDMAILCF 35664813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 35764813Seric # endif 35864813Seric # ifndef _PATH_SENDMAILPID 35964813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 36064813Seric # endif 36164813Seric #endif 36264813Seric 36364813Seric 36464813Seric /* 36563969Seric ** 4.3 BSD -- this is for very old systems 36663969Seric ** 36763969Seric ** You'll also have to install a new resolver library. 36863969Seric ** I don't guarantee that support for this environment is complete. 36963969Seric */ 37063969Seric 37163969Seric #ifdef oldBSD43 37263969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 37363969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 37463970Seric # define ARBPTR_T char * 37564155Seric # define setpgid setpgrp 37663969Seric # ifndef LA_TYPE 37763969Seric # define LA_TYPE LA_FLOAT 37863969Seric # endif 37963969Seric # ifndef _PATH_SENDMAILCF 38063969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 38163969Seric # endif 38264358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 38364834Seric # undef WEXITSTATUS 38464834Seric # undef WIFEXITED 38564834Seric typedef short pid_t; 38664834Seric extern int errno; 38763969Seric #endif 38863969Seric 38964314Seric 39063969Seric /* 39163902Seric ** SCO Unix 39263902Seric */ 39363902Seric 39463838Seric #ifdef _SCO_unix_ 39563838Seric # define SYSTEM5 1 /* include all the System V defines */ 39664035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 39763987Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 39863838Seric # define FORK fork 39963838Seric # define MAXPATHLEN PATHSIZE 40064718Seric # define LA_TYPE LA_SHORT 40164813Seric # undef NETUNIX /* no unix domain socket support */ 40263838Seric #endif 40363838Seric 40464314Seric 40563962Seric /* 40663962Seric ** ConvexOS 11.0 and later 40763962Seric */ 40863962Seric 40963962Seric #ifdef _CONVEX_SOURCE 41063977Seric # define BSD 1 /* include all the BSD defines */ 41163977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 41263962Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 41363962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 41463977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 41563962Seric # define LA_TYPE LA_FLOAT 41664032Seric # undef IDENTPROTO 41763962Seric #endif 41863962Seric 41964314Seric 42063962Seric /* 42164999Seric ** RISC/os 4.52 42263962Seric ** 42364999Seric ** Gives a ton of warning messages, but otherwise compiles. 42463962Seric */ 42563962Seric 42663965Seric #ifdef RISCOS 42764999Seric 42863962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 42964831Seric # define HASFLOCK 1 /* has flock(2) call */ 43064999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 43164999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 43263962Seric # define LA_TYPE LA_INT 43363962Seric # define LA_AVENRUN "avenrun" 43463962Seric # define _PATH_UNIX "/unix" 43564999Seric # undef WIFEXITED 43664999Seric 43764999Seric # define setpgid setpgrp 43864999Seric 43964999Seric extern int errno; 44064999Seric typedef int pid_t; 44164999Seric #define SIGFUNC_DEFINED 44264999Seric typedef int (*sigfunc_t)(); 44364999Seric extern char *getenv(); 44464999Seric extern void *malloc(); 44564999Seric 44663962Seric #endif 44763962Seric 44864314Seric 44964155Seric /* 45064155Seric ** Linux 0.99pl10 and above... 45164155Seric ** From Karl London <karl@borg.demon.co.uk>. 45264155Seric */ 45364155Seric 45464770Seric #ifdef __linux__ 45564155Seric # define BSD 1 /* pretend to be BSD based today */ 45664155Seric # undef NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 45764155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 45864380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 45964155Seric # ifndef LA_TYPE 46064155Seric # define LA_TYPE LA_FLOAT 46164155Seric # endif 46264763Seric # include <sys/sysmacros.h> 46365046Seric # define GIDSET_T gid_t 46464155Seric #endif 46564155Seric 46664155Seric 46764345Seric /* 46864345Seric ** DELL SVR4 Issue 2.2, and others 46964345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 47064345Seric ** 47164345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 47264345Seric ** defined, and the definitions conflict. 47364924Seric ** 47464924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 47564924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 47664924Seric ** (SVR4.0/386 version 3.0). 47764345Seric */ 47864345Seric 47964345Seric #ifdef DELL_SVR4 48064345Seric # define SYSTEM5 1 48164924Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 48264924Seric # define setreuid(r, e) seteuid(e) 48364345Seric /* # include <sys/time.h> */ 48464345Seric # define _PATH_UNIX "/unix" 48564345Seric # ifndef _PATH_SENDMAILCF 48664345Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 48764345Seric # endif 48864345Seric # ifndef _PATH_SENDMAILPID 48964345Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 49064345Seric # endif 49164345Seric #endif 49264345Seric 49364345Seric 49464380Seric /* 49564380Seric ** Apple A/UX 3.0 49664380Seric */ 49764345Seric 49864380Seric #ifdef _AUX_SOURCE 49964729Seric # include <sys/sysmacros.h> 50064380Seric # define BSD /* has BSD routines */ 50164380Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 50264380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 50364380Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 50464380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 50564561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 50664718Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 50764380Seric # define FORK fork 50864380Seric # ifndef _PATH_SENDMAILCF 50964380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 51064380Seric # endif 51164380Seric # ifndef LA_TYPE 51264380Seric # define LA_TYPE LA_ZERO 51364380Seric # endif 51464560Seric # undef WIFEXITED 51564560Seric # undef WEXITSTATUS 51664380Seric #endif 51764380Seric 51864380Seric 51964705Seric /* 52064705Seric ** Encore UMAX V 52164705Seric ** 52264705Seric ** Not extensively tested. 52364705Seric */ 52464380Seric 52564705Seric #ifdef UMAXV 52664705Seric # include <limits.h> 52764705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 52864705Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 52964705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 53064705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 53164705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 53264705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 53364705Seric # define FORK fork /* no vfork(2) primitive available */ 53464705Seric # define MAXPATHLEN PATH_MAX 53564705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 53664705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 53764705Seric # undef WIFEXITED 53864705Seric # undef WEXITSTATUS 53964705Seric #endif 54064705Seric 54164705Seric 54264939Seric /* 54364939Seric ** Stardent Titan 3000 running TitanOS 4.2. 54464939Seric ** 54564939Seric ** Must be compiled in "cc -43" mode. 54664939Seric ** 54764944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 54864939Seric ** 54964939Seric ** Note the tweaking below after the BSD defines are set. 55064939Seric */ 55164705Seric 55264939Seric #ifdef titan 55364939Seric # define setpgid setpgrp 55464939Seric typedef int pid_t; 55564939Seric # undef WIFEXITED 55664939Seric # undef WEXITSTATUS 55764939Seric #endif 55864939Seric 55964939Seric 56064962Seric /* 56164962Seric ** Sequent DYNIX 3.2.0 56264962Seric ** 56364962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 56464962Seric */ 56564939Seric 56664962Seric #ifdef sequent 56764962Seric # define BSD 1 56864962Seric # define HASUNSETENV 1 56964962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 57064962Seric # define WAITUNION 1 57164962Seric # define LA_TYPE LA_FLOAT 57264962Seric # ifdef _POSIX_VERSION 57364962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 57464962Seric # endif 57564962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 57664962Seric # define setpgid setpgrp 57764962Seric 57864962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 57964962Seric # undef WIFEXITED 58064962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 58164962Seric ((union wait*)&(s))->w_termsig == 0) 58264962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 58364962Seric typedef int pid_t; 58464962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 58564962Seric 58664962Seric # ifndef _PATH_UNIX 58764962Seric # define _PATH_UNIX "/dynix" 58864962Seric # endif 58964962Seric # ifndef _PATH_SENDMAILCF 59064962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 59164962Seric # endif 59264962Seric 59364962Seric #endif 59464962Seric 59564962Seric 59664962Seric 59764962Seric 59863902Seric /********************************************************************** 59963787Seric ** End of Per-Operating System defines 60063902Seric **********************************************************************/ 60163787Seric 60263949Seric /********************************************************************** 60363949Seric ** More general defines 60463949Seric **********************************************************************/ 60563949Seric 60663962Seric /* general BSD defines */ 60763962Seric #ifdef BSD 60864035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 60964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 61064035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 61164035Seric # define HASFLOCK 1 /* has flock(2) call */ 61263962Seric #endif 61363962Seric 61463787Seric /* general System V defines */ 61563787Seric # ifdef SYSTEM5 61664813Seric # include <sys/sysmacros.h> 61763949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 61863949Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 61964705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 62064962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 62163962Seric # ifndef LA_TYPE 62263962Seric # define LA_TYPE LA_INT 62363962Seric # endif 62463949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 62563949Seric # define bzero(d, l) (memset((d), '\0', (l))) 62663949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 62763787Seric # endif 62863787Seric 62963949Seric /* general POSIX defines */ 63063949Seric #ifdef _POSIX_VERSION 63164718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 63264718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 63363949Seric #endif 63463949Seric 63563787Seric /* 63663937Seric ** If no type for argument two of getgroups call is defined, assume 63763937Seric ** it's an integer -- unfortunately, there seem to be several choices 63863937Seric ** here. 63963937Seric */ 64063937Seric 64163937Seric #ifndef GIDSET_T 64263937Seric # define GIDSET_T int 64363937Seric #endif 64463937Seric 64564939Seric /* 64664939Seric ** Tweaking for systems that (for example) claim to be BSD but 64764939Seric ** don't have all the standard BSD routines (boo hiss). 64864939Seric */ 64964439Seric 65064939Seric #ifdef titan 65164939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 65264939Seric #endif 65364939Seric 65464939Seric 65564439Seric /********************************************************************** 65659023Seric ** Remaining definitions should never have to be changed. They are 65759023Seric ** primarily to provide back compatibility for older systems -- for 65859287Seric ** example, it includes some POSIX compatibility definitions 65964439Seric **********************************************************************/ 66059023Seric 66159388Seric /* System 5 compatibility */ 66259388Seric #ifndef S_ISREG 66364944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 66459388Seric #endif 66564944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 66664944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 66764944Seric #endif 66859388Seric #ifndef S_IWGRP 66959388Seric #define S_IWGRP 020 67059388Seric #endif 67159388Seric #ifndef S_IWOTH 67259388Seric #define S_IWOTH 002 67359388Seric #endif 67459388Seric 67559023Seric /* 67650537Seric ** Older systems don't have this error code -- it should be in 67750537Seric ** /usr/include/sysexits.h. 67850537Seric */ 67950537Seric 68050537Seric # ifndef EX_CONFIG 68150537Seric # define EX_CONFIG 78 /* configuration error */ 68250537Seric # endif 68356852Seric 68464718Seric /* pseudo-code used in server SMTP */ 68564718Seric # define EX_QUIT 22 /* drop out of server immediately */ 68664718Seric 68764718Seric 68863993Seric /* 68963993Seric ** These are used in a few cases where we need some special 69063993Seric ** error codes, but where the system doesn't provide something 69163993Seric ** reasonable. They are printed in errstring. 69263993Seric */ 69363993Seric 69463993Seric #ifndef E_PSEUDOBASE 69563993Seric # define E_PSEUDOBASE 256 69663993Seric #endif 69763993Seric 69863993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 69963993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 70063993Seric 70163970Seric /* type of arbitrary pointer */ 70263970Seric #ifndef ARBPTR_T 70363970Seric # define ARBPTR_T void * 70463970Seric #endif 70563970Seric 70660568Seric #ifndef __P 70760568Seric # include "cdefs.h" 70860568Seric #endif 70960568Seric 71056852Seric /* 71158778Seric ** Do some required dependencies 71258778Seric */ 71358778Seric 71458778Seric #if defined(NETINET) || defined(NETISO) 71559107Seric # define SMTP 1 /* enable user and server SMTP */ 71659107Seric # define QUEUE 1 /* enable queueing */ 71759107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 71858778Seric #endif 71958778Seric 72058778Seric 72158778Seric /* 72256852Seric ** Arrange to use either varargs or stdargs 72356852Seric */ 72456852Seric 72556852Seric # ifdef __STDC__ 72656852Seric 72756852Seric # include <stdarg.h> 72856852Seric 72956852Seric # define VA_LOCAL_DECL va_list ap; 73056852Seric # define VA_START(f) va_start(ap, f) 73156852Seric # define VA_END va_end(ap) 73256852Seric 73356852Seric # else 73456852Seric 73556852Seric # include <varargs.h> 73656852Seric 73756852Seric # define VA_LOCAL_DECL va_list ap; 73856852Seric # define VA_START(f) va_start(ap) 73956852Seric # define VA_END va_end(ap) 74056852Seric 74156852Seric # endif 74257631Seric 74357943Seric #ifdef HASUNAME 74457631Seric # include <sys/utsname.h> 74557631Seric # ifdef newstr 74657631Seric # undef newstr 74757631Seric # endif 74857943Seric #else /* ! HASUNAME */ 74957631Seric # define NODE_LENGTH 32 75057631Seric struct utsname 75157631Seric { 75257631Seric char nodename[NODE_LENGTH+1]; 75357631Seric }; 75457943Seric #endif /* HASUNAME */ 75557642Seric 75663838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 75763838Seric # define MAXHOSTNAMELEN 256 75857735Seric #endif 75958153Seric 76058153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 76158153Seric # define SIGCHLD SIGCLD 76258153Seric #endif 76358153Seric 76458153Seric #ifndef STDIN_FILENO 76558153Seric #define STDIN_FILENO 0 76658153Seric #endif 76758153Seric 76858153Seric #ifndef STDOUT_FILENO 76958153Seric #define STDOUT_FILENO 1 77058153Seric #endif 77158153Seric 77258153Seric #ifndef STDERR_FILENO 77358153Seric #define STDERR_FILENO 2 77458153Seric #endif 77558689Seric 77664072Seric #ifndef LOCK_SH 77764035Seric # define LOCK_SH 0x01 /* shared lock */ 77864035Seric # define LOCK_EX 0x02 /* exclusive lock */ 77964035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 78064035Seric # define LOCK_UN 0x08 /* unlock */ 78164035Seric #endif 78258692Seric 78364035Seric #ifndef SIG_ERR 78464035Seric # define SIG_ERR ((void (*)()) -1) 78558689Seric #endif 78658702Seric 78764500Seric #ifndef WEXITSTATUS 78864500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 78964500Seric #endif 79064500Seric #ifndef WIFEXITED 79164500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 79264500Seric #endif 79364500Seric 79464561Seric #ifndef SIGFUNC_DEFINED 79564561Seric typedef void (*sigfunc_t) __P((int)); 79664561Seric #endif 79764561Seric 79858702Seric /* 79958702Seric ** Size of tobuf (deliver.c) 80058702Seric ** Tweak this to match your syslog implementation. It will have to 80158702Seric ** allow for the extra information printed. 80258702Seric */ 80358702Seric 80458702Seric #ifndef TOBUFSIZE 80558702Seric # define TOBUFSIZE (1024 - 256) 80658702Seric #endif 80760219Seric 80865015Seric /* 80965015Seric ** Size of prescan buffer. 81065015Seric ** Despite comments in the _sendmail_ book, this probably should 81165015Seric ** not be changed; there are some hard-to-define dependencies. 81265015Seric */ 81365015Seric 81465015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 81560219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 81660219Seric # ifndef FORK 81760219Seric # define FORK vfork /* function to call to fork mailer */ 81860219Seric # endif 81964929Seric 82064929Seric #ifndef IDENTPROTO 82164929Seric # define IDENTPROTO 0 /* don't use RFC 1413 */ 82264929Seric #endif 823