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*68517Seric * @(#)conf.h 8.140 (Berkeley) 03/11/95 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 */ 3368384Seric # define MAXRWSETS 200 /* 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 */ 4167729Seric # define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 4267729Seric # define MAXTOCLASS 8 /* max # of message timeout classes */ 43*68517Seric # define MAXMIMEARGS 20 /* max args in Content-Type: */ 44*68517Seric # define MAXMIMENESTING 20 /* max MIME multipart nesting */ 4557143Seric 4657143Seric # ifndef QUEUESIZE 4757143Seric # define QUEUESIZE 1000 /* max # of jobs per queue run */ 4857143Seric # endif 4957143Seric 5063902Seric /********************************************************************** 519147Seric ** Compilation options. 5225673Seric ** 5325673Seric ** #define these if they are available; comment them out otherwise. 5463902Seric **********************************************************************/ 559147Seric 5625673Seric # define LOG 1 /* enable logging */ 5725673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 5864813Seric # define NETUNIX 1 /* include unix domain support */ 5958778Seric # define NETINET 1 /* include internet support */ 6053735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 6163753Seric # define XDEBUG 1 /* enable extended debugging */ 6256337Seric # ifdef NEWDB 6356337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6456337Seric # endif 6556337Seric 6666334Seric /********************************************************************** 6766334Seric ** 0/1 Compilation options. 6866334Seric ** #define these to 1 if they are available; 6966334Seric ** #define them to 0 otherwise. 7066334Seric **********************************************************************/ 7166334Seric 7266334Seric # ifndef NAMED_BIND 7366334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 7466334Seric # endif 7566334Seric 7664032Seric /* 7764944Seric ** Most systems have symbolic links today, so default them on. You 7864944Seric ** can turn them off by #undef'ing this below. 7964944Seric */ 8064944Seric 8164944Seric # define HASLSTAT 1 /* has lstat(2) call */ 8264944Seric 8364962Seric /* 8464962Seric ** General "standard C" defines. 8564962Seric ** 8664962Seric ** These may be undone later, to cope with systems that claim to 8764962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 8864962Seric ** doesn't realize that the library is part of the language. 8964962Seric ** 9064962Seric ** Life would be much easier if we could get rid of this sort 9164962Seric ** of bozo problems. 9264962Seric */ 9364962Seric 9464962Seric #ifdef __STDC__ 9564962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 9664962Seric #endif 9764962Seric 9863902Seric /********************************************************************** 9959023Seric ** Operating system configuration. 10059023Seric ** 10159023Seric ** Unless you are porting to a new OS, you shouldn't have to 10259023Seric ** change these. 10363902Seric **********************************************************************/ 10456823Seric 10563787Seric /* 10663787Seric ** Per-Operating System defines 10763787Seric */ 10863787Seric 10964314Seric 11063902Seric /* 11165565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 11263902Seric */ 11363902Seric 11467626Seric #ifdef __hpux 11564727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 11664727Seric # undef m_flags 11763787Seric # define SYSTEM5 1 /* include all the System V defines */ 11864035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 11964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 12065982Seric # define setreuid(r, e) setresuid(r, e, -1) 12168294Seric # define LA_TYPE LA_SUBR 12265749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 12365354Seric # define GIDSET_T gid_t 12463962Seric # define _PATH_UNIX "/hp-ux" 12565354Seric # ifndef _PATH_SENDMAILCF 12665354Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 12765354Seric # endif 12865167Seric # ifndef IDENTPROTO 12965167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 13056823Seric # endif 13165581Seric # ifndef HASGETUSERSHELL 13265581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 13365581Seric # endif 13465504Seric # define syslog hard_syslog 13565581Seric # ifdef __STDC__ 13665581Seric extern int syslog(int, char *, ...); 13765167Seric # endif 13867626Seric #endif 13956823Seric 14064314Seric 14163902Seric /* 14263902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 14363902Seric */ 14463902Seric 14567626Seric #ifdef _AIX3 14664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 14764840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 14865211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 14960219Seric # define FORK fork /* no vfork primitive available */ 15065749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 15167771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 15268145Seric # define LA_TYPE LA_INT 15367626Seric #endif 15460219Seric 15564314Seric 15663902Seric /* 15763902Seric ** Silicon Graphics IRIX 15863902Seric ** 15963965Seric ** Compiles on 4.0.1. 16067967Seric ** 16167967Seric ** Use IRIX64 instead of IRIX for 64-bit IRIX. 16267967Seric ** 16367967Seric ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 16463902Seric */ 16563902Seric 16667967Seric #ifdef IRIX64 16767967Seric # define IRIX 16867967Seric #endif 16967967Seric 17067626Seric #ifdef IRIX 17166763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 17264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 17364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 17465211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 17563753Seric # define FORK fork /* no vfork primitive available */ 17668236Seric # ifndef IRIX64 /* IRIX 6.0 */ 17768225Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 17868225Seric # endif 17964155Seric # define setpgid BSDsetpgrp 18063937Seric # define GIDSET_T gid_t 18165749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 18268439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 18366763Seric # define LA_TYPE LA_INT 18467967Seric # ifdef IRIX64 18567967Seric # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ 18667967Seric # else 18767967Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 18867967Seric # endif 18967626Seric #endif 19063753Seric 19163902Seric 19263902Seric /* 19364813Seric ** SunOS and Solaris 19464813Seric ** 19564813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 19664813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 19763902Seric */ 19863902Seric 19963787Seric #if defined(sun) && !defined(BSD) 20059074Seric 20164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 20264813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 20365211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 20465749Seric # define LA_TYPE LA_INT 20560564Seric 20664842Seric # ifdef SOLARIS_2_3 20768486Seric # define SOLARIS /* for back compat only -- use -DSOLARIS=203 */ 20864842Seric # endif 20964842Seric 21060602Seric # ifdef SOLARIS 21163902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 21265222Seric # ifndef __svr4__ 21365222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 21465222Seric # endif 21563787Seric # include <sys/time.h> 21665172Seric # define GIDSET_T gid_t 21765189Seric # ifndef _PATH_UNIX 21867129Seric # define _PATH_UNIX "/dev/ksyms" 21965189Seric # endif 22063962Seric # ifndef _PATH_SENDMAILCF 22163962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 22264072Seric # endif 22364072Seric # ifndef _PATH_SENDMAILPID 22463962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 22563962Seric # endif 22666022Seric # ifndef SYSLOG_BUFSIZE 22766022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 22866022Seric # endif 22968486Seric # if SOLARIS < 204 23068486Seric # define gethostbyname solaris_gethostbyname /* get good version */ 23168486Seric # define gethostbyaddr solaris_gethostbyaddr /* get good version */ 23268486Seric # endif 23363787Seric 23460602Seric # else 23565105Seric /* SunOS 4.0.3 or 4.1.x */ 23665189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 23765830Seric # ifndef HASFLOCK 23865830Seric # define HASFLOCK 1 /* has flock(2) call */ 23965830Seric # endif 24065749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 24160564Seric # include <vfork.h> 24263787Seric 24365105Seric # ifdef SUNOS403 24465105Seric /* special tweaking for SunOS 4.0.3 */ 24565105Seric # include <malloc.h> 24665105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 24765105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 24865105Seric # undef WIFEXITED 24965105Seric # undef WEXITSTATUS 25065105Seric # undef HASUNAME 25165105Seric # define setpgid setpgrp 25265105Seric typedef int pid_t; 25365105Seric extern char *getenv(); 25465105Seric 25566732Seric # else 25666732Seric /* 4.1.x specifics */ 25766732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 25866732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 25966732Seric 26065105Seric # endif 26160564Seric # endif 26259023Seric #endif 26359023Seric 26464718Seric /* 26564813Seric ** DG/UX 26664813Seric ** 26767427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 26867427Seric ** older support. 26967427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 27064718Seric */ 27164314Seric 27267427Seric #ifdef DGUX_5_4_2 27367427Seric # define DGUX 1 27467427Seric #endif 27567427Seric 27664718Seric #ifdef DGUX 27764718Seric # define SYSTEM5 1 27864718Seric # define LA_TYPE LA_SUBR 27964718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 28064718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 28164718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 28264718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 28366036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 28465167Seric # ifndef IDENTPROTO 28565167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 28665167Seric # endif 28767771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 28865749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 28964813Seric 29064813Seric /* these include files must be included early on DG/UX */ 29164813Seric # include <netinet/in.h> 29264813Seric # include <arpa/inet.h> 29364813Seric 29467427Seric # ifdef DGUX_5_4_2 29567427Seric # define inet_addr dgux_inet_addr 29664718Seric extern long dgux_inet_addr(); 29767427Seric # endif 29864718Seric #endif 29964718Seric 30064718Seric 30163902Seric /* 30263902Seric ** Digital Ultrix 4.2A or 4.3 30364264Seric ** 30464264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 30564264Seric ** not dropped when the process exits. This causes major problems, 30664264Seric ** so flock is the only alternative. 30763902Seric */ 30863902Seric 30960564Seric #ifdef ultrix 31064035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 31163962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 31264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 31366242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 31465830Seric # ifndef HASFLOCK 31565830Seric # define HASFLOCK 1 /* has flock(2) call */ 31665830Seric # endif 31765211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 31866318Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 31965135Seric # ifdef vax 32065135Seric # define LA_TYPE LA_FLOAT 32165135Seric # else 32265135Seric # define LA_TYPE LA_INT 32365135Seric # define LA_AVENRUN "avenrun" 32465135Seric # endif 32565749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 32665167Seric # ifndef IDENTPROTO 32765167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 32865167Seric # endif 32960564Seric #endif 33060564Seric 33164314Seric 33263902Seric /* 33368072Seric ** OSF/1 for Intel Paragon. 33468072Seric ** 33568082Seric ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> 33668082Seric ** of Intel Scalable Systems Divison. 33768072Seric */ 33868072Seric 33968072Seric #ifdef __PARAGON__ 34068072Seric # define __osf__ 1 /* get OSF/1 defines below */ 34168072Seric # ifndef _PATH_SENDMAILCF 34268072Seric # define _PATH_SENDMAILCF "/var/adm/sendmail/sendmail.cf" 34368072Seric # endif 34468072Seric #endif 34568072Seric 34668072Seric 34768072Seric /* 34863902Seric ** OSF/1 (tested on Alpha) 34963902Seric */ 35063902Seric 35163787Seric #ifdef __osf__ 35263962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 35364035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 35464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 35566226Seric # ifndef HASFLOCK 35665830Seric # define HASFLOCK 1 /* has flock(2) call */ 35765830Seric # endif 35863962Seric # define LA_TYPE LA_INT 35965749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 36064813Seric # ifndef _PATH_SENDMAILPID 36165504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 36264813Seric # endif 36359287Seric #endif 36459287Seric 36564314Seric 36663902Seric /* 36763902Seric ** NeXTstep 36863902Seric */ 36963902Seric 37064076Seric #ifdef NeXT 37164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 37265830Seric # ifndef HASFLOCK 37365830Seric # define HASFLOCK 1 /* has flock(2) call */ 37465830Seric # endif 37564125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 37664563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 37763753Seric # define sleep sleepX 37864155Seric # define setpgid setpgrp 37964295Seric # ifndef LA_TYPE 38064295Seric # define LA_TYPE LA_MACH 38164295Seric # endif 38265749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 38364500Seric # ifndef _POSIX_SOURCE 38464035Seric typedef int pid_t; 38564500Seric # undef WEXITSTATUS 38664500Seric # undef WIFEXITED 38764500Seric # endif 38864072Seric # ifndef _PATH_SENDMAILCF 38964072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 39064072Seric # endif 39164072Seric # ifndef _PATH_SENDMAILPID 39264072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 39364072Seric # endif 39459288Seric #endif 39559288Seric 39664314Seric 39763902Seric /* 39863962Seric ** 4.4 BSD 39964831Seric ** 40064831Seric ** See also BSD defines. 40163902Seric */ 40263902Seric 40360568Seric #ifdef BSD4_4 40464072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 40560568Seric # include <sys/cdefs.h> 40663838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 40764072Seric # ifndef LA_TYPE 40864072Seric # define LA_TYPE LA_SUBR 40964072Seric # endif 41065749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 41167771Seric # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 41260568Seric #endif 41360568Seric 41464314Seric 41563902Seric /* 41665982Seric ** BSD/386 (all versions) 41765982Seric ** From Tony Sanders, BSDI 41865982Seric */ 41965982Seric 42065982Seric #ifdef __bsdi__ 42165982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 42265982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 42366843Seric # include <sys/cdefs.h> 42466843Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 42566030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 42666843Seric # ifndef LA_TYPE 42766843Seric # define LA_TYPE LA_SUBR 42866843Seric # endif 42965982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 43066843Seric /* version 1.1 or later */ 43167771Seric # undef SPT_TYPE 43267771Seric # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 43366843Seric # else 43466843Seric /* version 1.0 or earlier */ 43566843Seric # ifndef OLD_NEWDB 43666843Seric # define OLD_NEWDB 1 /* old version of newdb library */ 43766843Seric # endif 43867771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 43965982Seric # endif 44065982Seric #endif 44165982Seric 44265982Seric 44365982Seric 44465982Seric /* 44565049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 44664733Seric ** 44764733Seric ** 4.3BSD clone, closer to 4.4BSD 44864831Seric ** 44964831Seric ** See also BSD defines. 45064733Seric */ 45164733Seric 45265049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 45364733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 45464733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 45566754Seric # ifdef __NetBSD__ 45666754Seric # define HASUNAME 1 /* has uname(2) syscall */ 45766754Seric # endif 45864733Seric # include <sys/cdefs.h> 45964733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 46064733Seric # ifndef LA_TYPE 46164733Seric # define LA_TYPE LA_SUBR 46264733Seric # endif 46365749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 46464733Seric #endif 46564733Seric 46664733Seric 46764733Seric /* 46864813Seric ** Mach386 46964813Seric ** 47064813Seric ** For mt Xinu's Mach386 system. 47164813Seric */ 47264813Seric 47364813Seric #if defined(MACH) && defined(i386) 47464813Seric # define MACH386 1 47564813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 47664813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 47766226Seric # ifndef HASFLOCK 47865830Seric # define HASFLOCK 1 /* has flock(2) call */ 47965830Seric # endif 48064813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 48164813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 48264813Seric # define setpgid setpgrp 48364813Seric # ifndef LA_TYPE 48464813Seric # define LA_TYPE LA_FLOAT 48564813Seric # endif 48665749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 48764962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 48864813Seric # undef WEXITSTATUS 48964813Seric # undef WIFEXITED 49064813Seric # ifndef _PATH_SENDMAILCF 49164813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 49264813Seric # endif 49364813Seric # ifndef _PATH_SENDMAILPID 49464813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 49564813Seric # endif 49664813Seric #endif 49764813Seric 49864813Seric 49964813Seric /* 50063969Seric ** 4.3 BSD -- this is for very old systems 50163969Seric ** 50265949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 50365949Seric ** 50463969Seric ** You'll also have to install a new resolver library. 50563969Seric ** I don't guarantee that support for this environment is complete. 50663969Seric */ 50763969Seric 50865949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 50963969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 51063969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 51163970Seric # define ARBPTR_T char * 51264155Seric # define setpgid setpgrp 51363969Seric # ifndef LA_TYPE 51463969Seric # define LA_TYPE LA_FLOAT 51563969Seric # endif 51663969Seric # ifndef _PATH_SENDMAILCF 51763969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 51863969Seric # endif 51965167Seric # ifndef IDENTPROTO 52065167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 52165167Seric # endif 52264834Seric # undef WEXITSTATUS 52364834Seric # undef WIFEXITED 52464834Seric typedef short pid_t; 52564834Seric extern int errno; 52663969Seric #endif 52763969Seric 52864314Seric 52963969Seric /* 53063902Seric ** SCO Unix 53165087Seric ** 53265087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 53365087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 53465087Seric ** The second is, I believe, for an older version. 53563902Seric */ 53663902Seric 53765087Seric #ifdef _SCO_unix_4_2 53865087Seric # define _SCO_unix_ 53965087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 54066757Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 54165087Seric # define _PATH_UNIX "/unix" 54265087Seric # ifndef _PATH_SENDMAILCF 54365087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 54465087Seric # endif 54565087Seric # ifndef _PATH_SENDMAILPID 54665087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 54765087Seric # endif 54865087Seric #endif 54965087Seric 55063838Seric #ifdef _SCO_unix_ 55163838Seric # define SYSTEM5 1 /* include all the System V defines */ 55264035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 55365212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 55463838Seric # define FORK fork 55563838Seric # define MAXPATHLEN PATHSIZE 55664718Seric # define LA_TYPE LA_SHORT 55767812Seric # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ 55868439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 55967608Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 56064813Seric # undef NETUNIX /* no unix domain socket support */ 56163838Seric #endif 56263838Seric 56364314Seric 56463962Seric /* 56568442Seric ** ISC (SunSoft) Unix. 56668442Seric ** 56768442Seric ** Contributed by J.J. Bailey <jjb@jagware.bcc.com> 56868442Seric */ 56968442Seric 57068442Seric #ifdef ISC_UNIX 57168442Seric # include <net/errno.h> 57268442Seric # define SYSTEM5 1 /* include all the System V defines */ 57368442Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 57468442Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 57568442Seric # define HASSETREUID 1 /* has setreuid(2) call */ 57668442Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 57768442Seric # undef NETUNIX /* no unix domain socket support */ 57868442Seric # define FORK fork 57968442Seric # define MAXPATHLEN 1024 58068442Seric # define LA_TYPE LA_SHORT 58168442Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 58268442Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 58368442Seric # define _PATH_UNIX "/unix" 58468442Seric # ifndef _PATH_SENDMAILCF 58568442Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 58668442Seric # endif 58768442Seric # ifndef _PATH_SENDMAILPID 58868442Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 58968442Seric # endif 59068442Seric 59168442Seric typedef short pid_t; 59268442Seric 59368442Seric #endif 59468442Seric 59568442Seric 59668442Seric /* 59768040Seric ** Altos System V. 59868040Seric ** Contributed by Tim Rice <timr@crl.com>. 59968040Seric */ 60068040Seric 60168040Seric #ifdef ALTOS_SYS_V 60268040Seric # include <limits.h> 60368040Seric # define SYSTEM5 1 /* include all the System V defines */ 60468040Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 60568040Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 60668040Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 60768040Seric # define NEEDFSYNC 1 /* no fsync(2) in system library */ 60868040Seric # define FORK fork 60968040Seric # define MAXPATHLEN PATHSIZE 61068040Seric # define LA_TYPE LA_SHORT 61168040Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 61268439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 61368040Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 61468040Seric # undef NETUNIX /* no unix domain socket support */ 61568040Seric # undef WIFEXITED 61668040Seric # undef WEXITSTATUS 61768040Seric # define strtoul strtol /* gcc library bogosity */ 61868040Seric 61968040Seric typedef unsigned short uid_t; 62068040Seric typedef unsigned short gid_t; 62168040Seric typedef short pid_t; 62268040Seric #endif 62368040Seric 62468040Seric 62568040Seric /* 62663962Seric ** ConvexOS 11.0 and later 62765949Seric ** 62865949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 62965949Seric ** works on 9.1 as well. 63063962Seric */ 63163962Seric 63263962Seric #ifdef _CONVEX_SOURCE 63363977Seric # define BSD 1 /* include all the BSD defines */ 63463977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 63563962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 63663977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 63763962Seric # define LA_TYPE LA_FLOAT 63865749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 63965949Seric # ifndef _PATH_SENDMAILCF 64065949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 64165949Seric # endif 64265949Seric # ifndef S_IREAD 64365949Seric # define S_IREAD _S_IREAD 64465949Seric # define S_IWRITE _S_IWRITE 64565949Seric # define S_IEXEC _S_IEXEC 64665949Seric # define S_IFMT _S_IFMT 64765949Seric # define S_IFCHR _S_IFCHR 64865949Seric # define S_IFBLK _S_IFBLK 64965949Seric # endif 65065167Seric # ifndef IDENTPROTO 65165167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 65265167Seric # endif 65363962Seric #endif 65463962Seric 65564314Seric 65663962Seric /* 65764999Seric ** RISC/os 4.52 65863962Seric ** 65964999Seric ** Gives a ton of warning messages, but otherwise compiles. 66063962Seric */ 66163962Seric 66263965Seric #ifdef RISCOS 66364999Seric 66463962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 66566226Seric # ifndef HASFLOCK 66665830Seric # define HASFLOCK 1 /* has flock(2) call */ 66765830Seric # endif 66864999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 66964999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 67063962Seric # define LA_TYPE LA_INT 67163962Seric # define LA_AVENRUN "avenrun" 67263962Seric # define _PATH_UNIX "/unix" 67364999Seric # undef WIFEXITED 67464999Seric 67564999Seric # define setpgid setpgrp 67664999Seric 67764999Seric extern int errno; 67864999Seric typedef int pid_t; 67964999Seric #define SIGFUNC_DEFINED 68064999Seric typedef int (*sigfunc_t)(); 68164999Seric extern char *getenv(); 68264999Seric extern void *malloc(); 68364999Seric 68463962Seric #endif 68563962Seric 68664314Seric 68764155Seric /* 68864155Seric ** Linux 0.99pl10 and above... 68966300Seric ** 69066300Seric ** Thanks to, in reverse order of contact: 69166300Seric ** 69268093Seric ** John Kennedy <warlock@csuchico.edu> 69367885Seric ** Andrew Pam <avatar@aus.xanadu.com> 69466300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 69566300Seric ** Karl London <karl@borg.demon.co.uk> 69666300Seric ** 69768093Seric ** Last compiled against: [12/14/94 @ 11:38:41 PM (Wednesday)] 69868093Seric ** sendmail 8.7.a.5 named 4.9.3-beta12-p1 db-1.85 69968093Seric ** gcc 2.6.2 libc.so.4.6.20 70068093Seric ** slackware 2.1.0 linux 1.1.70 70164155Seric */ 70264155Seric 70364770Seric #ifdef __linux__ 70466298Seric # define BSD 1 /* include BSD defines */ 70564155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 70666298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 70764380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 70866298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 70966300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 71067885Seric # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 71164155Seric # ifndef LA_TYPE 71266301Seric # define LA_TYPE LA_PROCSTR 71364155Seric # endif 71466300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 71568093Seric # ifndef _PATH_SENDMAILPID 71668093Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 71768093Seric # endif 71868093Seric # define TZ_TYPE TZ_TNAME 71964763Seric # include <sys/sysmacros.h> 72066300Seric # undef atol /* wounded in <stdlib.h> */ 72164155Seric #endif 72264155Seric 72364155Seric 72464345Seric /* 72564345Seric ** DELL SVR4 Issue 2.2, and others 72664345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 72764345Seric ** 72864345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 72964345Seric ** defined, and the definitions conflict. 73064924Seric ** 73164924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 73264924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 73364924Seric ** (SVR4.0/386 version 3.0). 73464345Seric */ 73564345Seric 73664345Seric #ifdef DELL_SVR4 73765189Seric /* no changes necessary */ 73865189Seric /* see general __svr4__ defines below */ 73964345Seric #endif 74064345Seric 74164345Seric 74264380Seric /* 74364380Seric ** Apple A/UX 3.0 74464380Seric */ 74564345Seric 74664380Seric #ifdef _AUX_SOURCE 74764729Seric # include <sys/sysmacros.h> 74864380Seric # define BSD /* has BSD routines */ 74964380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 75064380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 75164561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 75265167Seric # ifndef IDENTPROTO 75365167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 75465167Seric # endif 75564380Seric # define FORK fork 75664380Seric # ifndef _PATH_SENDMAILCF 75764380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 75864380Seric # endif 75964380Seric # ifndef LA_TYPE 76064380Seric # define LA_TYPE LA_ZERO 76164380Seric # endif 76265749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 76364560Seric # undef WIFEXITED 76464560Seric # undef WEXITSTATUS 76564380Seric #endif 76664380Seric 76764380Seric 76864705Seric /* 76964705Seric ** Encore UMAX V 77064705Seric ** 77164705Seric ** Not extensively tested. 77264705Seric */ 77364380Seric 77464705Seric #ifdef UMAXV 77564705Seric # include <limits.h> 77664705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 77764705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 77864705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 77965211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 78064705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 78164705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 78264705Seric # define FORK fork /* no vfork(2) primitive available */ 78365749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 78464705Seric # define MAXPATHLEN PATH_MAX 78564705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 78664705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 78764705Seric # undef WIFEXITED 78864705Seric # undef WEXITSTATUS 78964705Seric #endif 79064705Seric 79164705Seric 79264939Seric /* 79364939Seric ** Stardent Titan 3000 running TitanOS 4.2. 79464939Seric ** 79564939Seric ** Must be compiled in "cc -43" mode. 79664939Seric ** 79764944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 79864939Seric ** 79964939Seric ** Note the tweaking below after the BSD defines are set. 80064939Seric */ 80164705Seric 80264939Seric #ifdef titan 80364939Seric # define setpgid setpgrp 80464939Seric typedef int pid_t; 80564939Seric # undef WIFEXITED 80664939Seric # undef WEXITSTATUS 80764939Seric #endif 80864939Seric 80964939Seric 81064962Seric /* 81164962Seric ** Sequent DYNIX 3.2.0 81264962Seric ** 81364962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 81464962Seric */ 81564939Seric 81664962Seric #ifdef sequent 81766038Seric 81864962Seric # define BSD 1 81964962Seric # define HASUNSETENV 1 82064962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 82164962Seric # define WAITUNION 1 82264962Seric # define LA_TYPE LA_FLOAT 82364962Seric # ifdef _POSIX_VERSION 82464962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 82564962Seric # endif 82664962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 82764962Seric # define setpgid setpgrp 82864962Seric 82964962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 83064962Seric # undef WIFEXITED 83164962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 83264962Seric ((union wait*)&(s))->w_termsig == 0) 83364962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 83464962Seric typedef int pid_t; 83564962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 83664962Seric 83766144Seric # ifndef IDENTPROTO 83866144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 83966144Seric # endif 84066144Seric 84164962Seric # ifndef _PATH_UNIX 84264962Seric # define _PATH_UNIX "/dynix" 84364962Seric # endif 84464962Seric # ifndef _PATH_SENDMAILCF 84564962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 84664962Seric # endif 84764962Seric 84864962Seric #endif 84964962Seric 85064962Seric 85165748Seric /* 85266038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 85366038Seric ** 85466038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 85566038Seric ** 85666038Seric ** From Tim Wright <timw@sequent.com>. 85766038Seric */ 85866038Seric 85966038Seric #ifdef _SEQUENT_ 86066038Seric # define SYSTEM5 1 /* include all the System V defines */ 86166038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 86266038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 86366038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 86466038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 86566038Seric # define GIDSET_T gid_t 86666038Seric # define LA_TYPE LA_INT 86766038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 86867771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 86966144Seric # ifndef IDENTPROTO 87066144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 87166144Seric # endif 87266038Seric # ifndef _PATH_SENDMAILCF 87366038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 87466038Seric # endif 87566038Seric # ifndef _PATH_SENDMAILPID 87666038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 87766038Seric # endif 87866038Seric #endif 87966038Seric 88066038Seric 88166038Seric /* 88265748Seric ** Cray Unicos 88365748Seric ** 88465748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 88565748Seric */ 88664962Seric 88765748Seric #ifdef UNICOS 88865748Seric # define SYSTEM5 1 /* include all the System V defines */ 88965748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 89065748Seric # define MAXPATHLEN PATHSIZE 89165748Seric # define LA_TYPE LA_ZERO 89265749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 89368439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 89465748Seric #endif 89564962Seric 89665748Seric 89765820Seric /* 89865820Seric ** Apollo DomainOS 89965820Seric ** 90065820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 90165982Seric ** 90265820Seric ** 15 Jan 1994 90365820Seric ** 90465820Seric */ 90565748Seric 90665820Seric #ifdef apollo 90765820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 90865820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 90967771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 91065820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 91166044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 91268439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 91365820Seric # ifndef _PATH_SENDMAILCF 91465820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 91565820Seric # endif 91665820Seric # ifndef _PATH_SENDMAILPID 91765820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 91865820Seric # endif 91965820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 92065820Seric # undef S_IFIFO 92165820Seric # define S_IFIFO 0010000 92265820Seric # ifndef IDENTPROTO 92365820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 92465820Seric # endif 92565982Seric #endif 92665820Seric 92765820Seric 92866748Seric /* 92967745Seric ** UnixWare 1.1.2. 93066752Seric ** 93166752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 93266752Seric */ 93366752Seric 93466752Seric #ifdef UNIXWARE 93566752Seric # define SYSTEM5 1 93667745Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 93767745Seric # define HASGETDTABLESIZE 1 93867745Seric # define HASSETREUID 1 93967745Seric # define HASSETSID 1 94067745Seric # define HASINITGROUPS 1 94167745Seric # define GIDSET_T gid_t 94267745Seric # define SLEEP_T unsigned 94366752Seric # define SFS_TYPE SFS_STATVFS 94466752Seric # define LA_TYPE LA_ZERO 94566752Seric # undef WIFEXITED 94666752Seric # undef WEXITSTATUS 94766752Seric # define _PATH_UNIX "/unix" 94866752Seric # ifndef _PATH_SENDMAILCF 94966752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 95066752Seric # endif 95166752Seric # ifndef _PATH_SENDMAILPID 95266752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 95366752Seric # endif 95466752Seric # define SYSLOG_BUFSIZE 128 95566752Seric #endif 95666752Seric 95766752Seric 95866752Seric /* 95966748Seric ** Intergraph CLIX 3.1 96066748Seric ** 96166748Seric ** From Paul Southworth <pauls@locust.cic.net> 96266748Seric */ 96365820Seric 96466748Seric #ifdef CLIX 96566748Seric # define SYSTEM5 1 /* looks like System V */ 96666752Seric # ifndef HASGETUSERSHELL 96766752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 96866752Seric # endif 96966748Seric # define DEV_BSIZE 512 /* device block size not defined */ 97066748Seric # define GIDSET_T gid_t 97166748Seric # undef LOG /* syslog not available */ 97266748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 97366748Seric # define GETSHORT _getshort 97466748Seric #endif 97565820Seric 97666748Seric 97766776Seric /* 97866776Seric ** NCR 3000 Series (SysVr4) 97966776Seric ** 98067434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 98166776Seric */ 98266748Seric 98366776Seric #ifdef NCR3000 98466776Seric # define __svr4__ 98566776Seric # undef BSD 98666776Seric # define LA_AVENRUN "avenrun" 98766776Seric #endif 98866748Seric 98966776Seric 99067434Seric /* 99167434Seric ** Tandem NonStop-UX SVR4 99267434Seric ** 99367434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 99467434Seric */ 99566776Seric 99667434Seric #ifdef NonStop_UX_BXX 99767434Seric # define __svr4__ 99867434Seric #endif 99966776Seric 100067434Seric 100167488Seric /* 100267488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 100367488Seric ** 100467488Seric ** Tested for 1.04 and 1.03 100567488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 100667488Seric */ 100767434Seric 100867488Seric #ifdef __H3050R 100967488Seric # define SYSTEM5 1 /* include all the System V defines */ 101067488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 101167488Seric # define setreuid(r, e) setresuid(r, e, -1) 101267488Seric # define LA_TYPE LA_FLOAT 101367488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 101467488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 101567488Seric # ifndef GIDSET_T 101667488Seric # define GIDSET_T gid_t 101767488Seric # endif 101867488Seric # ifndef _PATH_UNIX 101967488Seric # define _PATH_UNIX "/HI-UX" 102067488Seric # endif 102167488Seric # ifndef _PATH_SENDMAILCF 102267488Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 102367488Seric # endif 102467488Seric # ifndef IDENTPROTO 102567488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 102667488Seric # endif 102767488Seric # ifndef HASGETUSERSHELL 102867488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 102967488Seric # endif 103067488Seric 103167488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 103267488Seric # undef m_flags 103367488Seric 103467488Seric # ifdef __STDC__ 103567488Seric extern int syslog(int, char *, ...); 103667488Seric # endif 103767488Seric 103867488Seric #endif 103967488Seric 104067488Seric 104168099Seric /* 104268099Seric ** Amdahl UTS System V 2.1.5 (SVr3-based) 104368099Seric ** 104468099Seric ** From: Janet Jackson <janet@dialix.oz.au>. 104568099Seric */ 104667488Seric 104768099Seric #ifdef _UTS 104868099Seric # include <sys/sysmacros.h> 104968099Seric # undef HASLSTAT /* has symlinks, but they cause problems */ 105068099Seric # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 105168099Seric # define SYS5SIGNALS 1 /* System V signal semantics */ 105268099Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 105368099Seric # define HASUNAME 1 /* use System V uname(2) system call */ 105468099Seric # define HASINITGROUPS 1 /* has initgroups(3) function */ 105568099Seric # define HASSETVBUF 1 /* has setvbuf(3) function */ 105668099Seric # define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */ 105768099Seric # ifndef HASGETUSERSHELL 105868099Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 105968099Seric # endif 106068099Seric # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 106168099Seric # define LA_TYPE LA_ZERO /* doesn't have load average */ 106268099Seric # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 106368439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 106468099Seric # define _PATH_UNIX "/unix" 106568099Seric # ifndef _PATH_SENDMAILCF 106668099Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 106768099Seric # endif 106868099Seric #endif 106968099Seric 107068357Seric /* 107168357Seric ** Cray Computer Corporation's CSOS 107268357Seric ** 107368357Seric ** Contributed by Scott Bolte <scott@craycos.com>. 107468357Seric */ 107568099Seric 107668357Seric #ifdef _CRAYCOM 107768357Seric # define SYSTEM5 1 /* include all the System V defines */ 107868357Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 107968357Seric # define NEEDFSYNC 1 /* no fsync in system library */ 108068357Seric # define MAXPATHLEN PATHSIZE 108168357Seric # define LA_TYPE LA_ZERO 108268357Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 108368439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 108468357Seric # define _POSIX_CHOWN_RESTRICTED -1 108568357Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 108668357Seric #endif 108768099Seric 108868099Seric 108963902Seric /********************************************************************** 109063787Seric ** End of Per-Operating System defines 109163902Seric **********************************************************************/ 109263787Seric 109363949Seric /********************************************************************** 109463949Seric ** More general defines 109563949Seric **********************************************************************/ 109663949Seric 109763962Seric /* general BSD defines */ 109863962Seric #ifdef BSD 109964035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 110064035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 110167742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 110267430Seric # ifndef HASSETRLIMIT 110367430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 110467430Seric # endif 110565830Seric # ifndef HASFLOCK 110665830Seric # define HASFLOCK 1 /* has flock(2) call */ 110765830Seric # endif 110867602Seric # ifndef TZ_TYPE 110967608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 111067602Seric # endif 111163962Seric #endif 111263962Seric 111365189Seric /* general System V Release 4 defines */ 111465189Seric #ifdef __svr4__ 111565189Seric # define SYSTEM5 1 111665189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 111767742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 111867742Seric # ifndef HASSETRLIMIT 111967742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 112067742Seric # endif 112165211Seric # ifndef HASGETUSERSHELL 112265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 112365210Seric # endif 112465189Seric # define setreuid(r, e) seteuid(e) 112565189Seric 112665189Seric # ifndef _PATH_UNIX 112765189Seric # define _PATH_UNIX "/unix" 112865189Seric # endif 112965189Seric # ifndef _PATH_SENDMAILCF 113065189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 113165189Seric # endif 113265189Seric # ifndef _PATH_SENDMAILPID 113365189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 113465189Seric # endif 113565189Seric # ifndef SYSLOG_BUFSIZE 113665189Seric # define SYSLOG_BUFSIZE 128 113765189Seric # endif 113867159Seric # ifndef SFS_TYPE 113967159Seric # define SFS_TYPE SFS_STATVFS 114067159Seric # endif 114165189Seric #endif 114265189Seric 114363787Seric /* general System V defines */ 114466298Seric #ifdef SYSTEM5 114564813Seric # include <sys/sysmacros.h> 114663949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 114764705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 114864962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 114967430Seric # ifndef HASULIMIT 115067430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 115167430Seric # endif 115263962Seric # ifndef LA_TYPE 115365749Seric # define LA_TYPE LA_INT /* assume integer load average */ 115463962Seric # endif 115565749Seric # ifndef SFS_TYPE 115665749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 115765749Seric # endif 115867602Seric # ifndef TZ_TYPE 115967608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 116067602Seric # endif 116168442Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 116268442Seric # define bzero(d, l) (memset((d), '\0', (l))) 116368442Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 116466298Seric #endif 116563787Seric 116663949Seric /* general POSIX defines */ 116763949Seric #ifdef _POSIX_VERSION 116864718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 116964718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 117063949Seric #endif 117163949Seric 117263787Seric /* 117363937Seric ** If no type for argument two of getgroups call is defined, assume 117463937Seric ** it's an integer -- unfortunately, there seem to be several choices 117563937Seric ** here. 117663937Seric */ 117763937Seric 117863937Seric #ifndef GIDSET_T 117963937Seric # define GIDSET_T int 118063937Seric #endif 118163937Seric 118264939Seric /* 118368357Seric ** Tweaking for systems that (for example) claim to be BSD or POSIX 118468357Seric ** but don't have all the standard BSD or POSIX routines (boo hiss). 118564939Seric */ 118664439Seric 118764939Seric #ifdef titan 118864939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 118964939Seric #endif 119064939Seric 119168357Seric #ifdef _CRAYCOM 119268357Seric # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ 119368357Seric #endif 119465830Seric 119568442Seric #ifdef ISC_UNIX 119668442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 119768442Seric #endif 119868357Seric 119968442Seric #ifdef ALTOS_SYS_V 120068442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 120168442Seric # undef bzero /* despite SystemV claim, uses BSD bzero */ 120268442Seric # undef bcmp /* despite SystemV claim, uses BSD bcmp */ 120368442Seric #endif 120468442Seric 120568442Seric 120665167Seric /* 120765167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 120865167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 120965167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 121065167Seric ** are closed. Some firewalls return this error if you try to connect 121165167Seric ** to the IDENT port (113), so you can't receive email from these hosts 121265167Seric ** on these systems. The firewall really should use a more specific 121365167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 121465167Seric ** not explicitly set to zero above, default it on. 121565167Seric */ 121664939Seric 121765167Seric #ifndef IDENTPROTO 121865167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 121965167Seric #endif 122065167Seric 122165211Seric #ifndef HASGETUSERSHELL 122265211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 122365210Seric #endif 122465167Seric 122565830Seric #ifndef HASFLOCK 122665830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 122765830Seric #endif 122865210Seric 122967430Seric #ifndef HASSETRLIMIT 123067430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 123167430Seric #endif 123267430Seric 123367430Seric #ifndef HASULIMIT 123467430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 123567430Seric #endif 123667430Seric 123766843Seric #ifndef OLD_NEWDB 123866843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 123966843Seric #endif 124065830Seric 124168099Seric /* heuristic setting of HASSETSIGMASK; can override above */ 124268099Seric #ifndef HASSIGSETMASK 124368099Seric # ifdef SIGVTALRM 124468099Seric # define HASSETSIGMASK 1 124568099Seric # else 124668099Seric # define HASSETSIGMASK 0 124768099Seric # endif 124868099Seric #endif 124966843Seric 125068099Seric 125164439Seric /********************************************************************** 125259023Seric ** Remaining definitions should never have to be changed. They are 125359023Seric ** primarily to provide back compatibility for older systems -- for 125459287Seric ** example, it includes some POSIX compatibility definitions 125564439Seric **********************************************************************/ 125659023Seric 125759388Seric /* System 5 compatibility */ 125859388Seric #ifndef S_ISREG 125964944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 126059388Seric #endif 126164944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 126264944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 126364944Seric #endif 126468494Seric #ifndef S_IWUSR 126568494Seric # define S_IWUSR 0200 126668494Seric #endif 126759388Seric #ifndef S_IWGRP 126868494Seric # define S_IWGRP 0020 126959388Seric #endif 127059388Seric #ifndef S_IWOTH 127168494Seric # define S_IWOTH 0002 127259388Seric #endif 127359388Seric 127459023Seric /* 127550537Seric ** Older systems don't have this error code -- it should be in 127650537Seric ** /usr/include/sysexits.h. 127750537Seric */ 127850537Seric 127950537Seric # ifndef EX_CONFIG 128050537Seric # define EX_CONFIG 78 /* configuration error */ 128150537Seric # endif 128256852Seric 128364718Seric /* pseudo-code used in server SMTP */ 128464718Seric # define EX_QUIT 22 /* drop out of server immediately */ 128564718Seric 128664718Seric 128763993Seric /* 128863993Seric ** These are used in a few cases where we need some special 128963993Seric ** error codes, but where the system doesn't provide something 129063993Seric ** reasonable. They are printed in errstring. 129163993Seric */ 129263993Seric 129363993Seric #ifndef E_PSEUDOBASE 129463993Seric # define E_PSEUDOBASE 256 129563993Seric #endif 129663993Seric 129763993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 129863993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 129963993Seric 130063970Seric /* type of arbitrary pointer */ 130163970Seric #ifndef ARBPTR_T 130263970Seric # define ARBPTR_T void * 130363970Seric #endif 130463970Seric 130560568Seric #ifndef __P 130660568Seric # include "cdefs.h" 130760568Seric #endif 130860568Seric 130967421Seric #if NAMED_BIND 131067421Seric # include <arpa/nameser.h> 131167434Seric # ifdef __svr4__ 131267434Seric # ifdef NOERROR 131367434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 131467434Seric # endif 131567434Seric # endif 131667421Seric #endif 131767421Seric 131856852Seric /* 131967419Seric ** The size of an IP address -- can't use sizeof because of problems 132067419Seric ** on Crays, where everything is 64 bits. This will break if/when 132167419Seric ** IP addresses are expanded to eight bytes. 132267419Seric */ 132367419Seric 132467421Seric #ifndef INADDRSZ 132567421Seric # define INADDRSZ 4 132667421Seric #endif 132767419Seric 132867419Seric /* 132967421Seric ** The size of various known types -- for reading network protocols. 133067421Seric ** Again, we can't use sizeof because of compiler randomness. 133167421Seric */ 133267421Seric 133367421Seric #ifndef INT16SZ 133467421Seric # define INT16SZ 2 133567421Seric #endif 133667421Seric #ifndef INT32SZ 133767421Seric # define INT32SZ 4 133867421Seric #endif 133967421Seric 134067421Seric /* 134158778Seric ** Do some required dependencies 134258778Seric */ 134358778Seric 134458778Seric #if defined(NETINET) || defined(NETISO) 134559107Seric # define SMTP 1 /* enable user and server SMTP */ 134659107Seric # define QUEUE 1 /* enable queueing */ 134759107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 134858778Seric #endif 134958778Seric 135058778Seric 135158778Seric /* 135256852Seric ** Arrange to use either varargs or stdargs 135356852Seric */ 135456852Seric 135556852Seric # ifdef __STDC__ 135656852Seric 135756852Seric # include <stdarg.h> 135856852Seric 135956852Seric # define VA_LOCAL_DECL va_list ap; 136056852Seric # define VA_START(f) va_start(ap, f) 136156852Seric # define VA_END va_end(ap) 136256852Seric 136356852Seric # else 136456852Seric 136556852Seric # include <varargs.h> 136656852Seric 136756852Seric # define VA_LOCAL_DECL va_list ap; 136856852Seric # define VA_START(f) va_start(ap) 136956852Seric # define VA_END va_end(ap) 137056852Seric 137156852Seric # endif 137257631Seric 137357943Seric #ifdef HASUNAME 137457631Seric # include <sys/utsname.h> 137557631Seric # ifdef newstr 137657631Seric # undef newstr 137757631Seric # endif 137857943Seric #else /* ! HASUNAME */ 137957631Seric # define NODE_LENGTH 32 138057631Seric struct utsname 138157631Seric { 138257631Seric char nodename[NODE_LENGTH+1]; 138357631Seric }; 138457943Seric #endif /* HASUNAME */ 138557642Seric 138668040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 138763838Seric # define MAXHOSTNAMELEN 256 138857735Seric #endif 138958153Seric 139058153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 139158153Seric # define SIGCHLD SIGCLD 139258153Seric #endif 139358153Seric 139458153Seric #ifndef STDIN_FILENO 139558153Seric #define STDIN_FILENO 0 139658153Seric #endif 139758153Seric 139858153Seric #ifndef STDOUT_FILENO 139958153Seric #define STDOUT_FILENO 1 140058153Seric #endif 140158153Seric 140258153Seric #ifndef STDERR_FILENO 140358153Seric #define STDERR_FILENO 2 140458153Seric #endif 140558689Seric 140664072Seric #ifndef LOCK_SH 140764035Seric # define LOCK_SH 0x01 /* shared lock */ 140864035Seric # define LOCK_EX 0x02 /* exclusive lock */ 140964035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 141064035Seric # define LOCK_UN 0x08 /* unlock */ 141164035Seric #endif 141258692Seric 141364035Seric #ifndef SIG_ERR 141464035Seric # define SIG_ERR ((void (*)()) -1) 141558689Seric #endif 141658702Seric 141764500Seric #ifndef WEXITSTATUS 141864500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 141964500Seric #endif 142064500Seric #ifndef WIFEXITED 142164500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 142264500Seric #endif 142364500Seric 142464561Seric #ifndef SIGFUNC_DEFINED 142564561Seric typedef void (*sigfunc_t) __P((int)); 142664561Seric #endif 142764561Seric 142865053Seric /* size of syslog buffer */ 142965053Seric #ifndef SYSLOG_BUFSIZE 143065053Seric # define SYSLOG_BUFSIZE 1024 143165053Seric #endif 143265053Seric 143358702Seric /* 143458702Seric ** Size of tobuf (deliver.c) 143558702Seric ** Tweak this to match your syslog implementation. It will have to 143658702Seric ** allow for the extra information printed. 143758702Seric */ 143858702Seric 143958702Seric #ifndef TOBUFSIZE 144065053Seric # if (SYSLOG_BUFSIZE) > 512 144165053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 144265053Seric # else 144365053Seric # define TOBUFSIZE 256 144465053Seric # endif 144558702Seric #endif 144660219Seric 144765015Seric /* 144865015Seric ** Size of prescan buffer. 144965015Seric ** Despite comments in the _sendmail_ book, this probably should 145065015Seric ** not be changed; there are some hard-to-define dependencies. 145165015Seric */ 145265015Seric 145365015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 145460219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 145560219Seric # ifndef FORK 145660219Seric # define FORK vfork /* function to call to fork mailer */ 145760219Seric # endif 145865955Seric 145965955Seric /* 146065955Seric ** If we are going to link scanf anyway, use it in readcf 146165955Seric */ 146265955Seric 146365955Seric #if !defined(HASUNAME) && !defined(SCANF) 146465955Seric # define SCANF 1 146565955Seric #endif 1466