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*68518Seric * @(#)conf.h 8.141 (Berkeley) 03/12/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 */ 4368517Seric # define MAXMIMEARGS 20 /* max args in Content-Type: */ 4468517Seric # 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 */ 711*68518Seric # ifndef HASFLOCK 712*68518Seric # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */ 713*68518Seric # endif 71464155Seric # ifndef LA_TYPE 71566301Seric # define LA_TYPE LA_PROCSTR 71664155Seric # endif 71766300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 71868093Seric # ifndef _PATH_SENDMAILPID 71968093Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 72068093Seric # endif 72168093Seric # define TZ_TYPE TZ_TNAME 72264763Seric # include <sys/sysmacros.h> 72366300Seric # undef atol /* wounded in <stdlib.h> */ 72464155Seric #endif 72564155Seric 72664155Seric 72764345Seric /* 72864345Seric ** DELL SVR4 Issue 2.2, and others 72964345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 73064345Seric ** 73164345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 73264345Seric ** defined, and the definitions conflict. 73364924Seric ** 73464924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 73564924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 73664924Seric ** (SVR4.0/386 version 3.0). 73764345Seric */ 73864345Seric 73964345Seric #ifdef DELL_SVR4 74065189Seric /* no changes necessary */ 74165189Seric /* see general __svr4__ defines below */ 74264345Seric #endif 74364345Seric 74464345Seric 74564380Seric /* 74664380Seric ** Apple A/UX 3.0 74764380Seric */ 74864345Seric 74964380Seric #ifdef _AUX_SOURCE 75064729Seric # include <sys/sysmacros.h> 75164380Seric # define BSD /* has BSD routines */ 75264380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 75364380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 75464561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 75565167Seric # ifndef IDENTPROTO 75665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 75765167Seric # endif 75864380Seric # define FORK fork 75964380Seric # ifndef _PATH_SENDMAILCF 76064380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 76164380Seric # endif 76264380Seric # ifndef LA_TYPE 76364380Seric # define LA_TYPE LA_ZERO 76464380Seric # endif 76565749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 76664560Seric # undef WIFEXITED 76764560Seric # undef WEXITSTATUS 76864380Seric #endif 76964380Seric 77064380Seric 77164705Seric /* 77264705Seric ** Encore UMAX V 77364705Seric ** 77464705Seric ** Not extensively tested. 77564705Seric */ 77664380Seric 77764705Seric #ifdef UMAXV 77864705Seric # include <limits.h> 77964705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 78064705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 78164705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 78265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 78364705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 78464705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 78564705Seric # define FORK fork /* no vfork(2) primitive available */ 78665749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 78764705Seric # define MAXPATHLEN PATH_MAX 78864705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 78964705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 79064705Seric # undef WIFEXITED 79164705Seric # undef WEXITSTATUS 79264705Seric #endif 79364705Seric 79464705Seric 79564939Seric /* 79664939Seric ** Stardent Titan 3000 running TitanOS 4.2. 79764939Seric ** 79864939Seric ** Must be compiled in "cc -43" mode. 79964939Seric ** 80064944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 80164939Seric ** 80264939Seric ** Note the tweaking below after the BSD defines are set. 80364939Seric */ 80464705Seric 80564939Seric #ifdef titan 80664939Seric # define setpgid setpgrp 80764939Seric typedef int pid_t; 80864939Seric # undef WIFEXITED 80964939Seric # undef WEXITSTATUS 81064939Seric #endif 81164939Seric 81264939Seric 81364962Seric /* 81464962Seric ** Sequent DYNIX 3.2.0 81564962Seric ** 81664962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 81764962Seric */ 81864939Seric 81964962Seric #ifdef sequent 82066038Seric 82164962Seric # define BSD 1 82264962Seric # define HASUNSETENV 1 82364962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 82464962Seric # define WAITUNION 1 82564962Seric # define LA_TYPE LA_FLOAT 82664962Seric # ifdef _POSIX_VERSION 82764962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 82864962Seric # endif 82964962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 83064962Seric # define setpgid setpgrp 83164962Seric 83264962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 83364962Seric # undef WIFEXITED 83464962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 83564962Seric ((union wait*)&(s))->w_termsig == 0) 83664962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 83764962Seric typedef int pid_t; 83864962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 83964962Seric 84066144Seric # ifndef IDENTPROTO 84166144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 84266144Seric # endif 84366144Seric 84464962Seric # ifndef _PATH_UNIX 84564962Seric # define _PATH_UNIX "/dynix" 84664962Seric # endif 84764962Seric # ifndef _PATH_SENDMAILCF 84864962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 84964962Seric # endif 85064962Seric 85164962Seric #endif 85264962Seric 85364962Seric 85465748Seric /* 85566038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 85666038Seric ** 85766038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 85866038Seric ** 85966038Seric ** From Tim Wright <timw@sequent.com>. 86066038Seric */ 86166038Seric 86266038Seric #ifdef _SEQUENT_ 86366038Seric # define SYSTEM5 1 /* include all the System V defines */ 86466038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 86566038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 86666038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 86766038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 86866038Seric # define GIDSET_T gid_t 86966038Seric # define LA_TYPE LA_INT 87066038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 87167771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 87266144Seric # ifndef IDENTPROTO 87366144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 87466144Seric # endif 87566038Seric # ifndef _PATH_SENDMAILCF 87666038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 87766038Seric # endif 87866038Seric # ifndef _PATH_SENDMAILPID 87966038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 88066038Seric # endif 88166038Seric #endif 88266038Seric 88366038Seric 88466038Seric /* 88565748Seric ** Cray Unicos 88665748Seric ** 88765748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 88865748Seric */ 88964962Seric 89065748Seric #ifdef UNICOS 89165748Seric # define SYSTEM5 1 /* include all the System V defines */ 89265748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 89365748Seric # define MAXPATHLEN PATHSIZE 89465748Seric # define LA_TYPE LA_ZERO 89565749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 89668439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 89765748Seric #endif 89864962Seric 89965748Seric 90065820Seric /* 90165820Seric ** Apollo DomainOS 90265820Seric ** 90365820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 90465982Seric ** 90565820Seric ** 15 Jan 1994 90665820Seric ** 90765820Seric */ 90865748Seric 90965820Seric #ifdef apollo 91065820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 91165820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 91267771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 91365820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 91466044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 91568439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 91665820Seric # ifndef _PATH_SENDMAILCF 91765820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 91865820Seric # endif 91965820Seric # ifndef _PATH_SENDMAILPID 92065820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 92165820Seric # endif 92265820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 92365820Seric # undef S_IFIFO 92465820Seric # define S_IFIFO 0010000 92565820Seric # ifndef IDENTPROTO 92665820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 92765820Seric # endif 92865982Seric #endif 92965820Seric 93065820Seric 93166748Seric /* 93267745Seric ** UnixWare 1.1.2. 93366752Seric ** 93466752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 93566752Seric */ 93666752Seric 93766752Seric #ifdef UNIXWARE 93866752Seric # define SYSTEM5 1 93967745Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 94067745Seric # define HASGETDTABLESIZE 1 94167745Seric # define HASSETREUID 1 94267745Seric # define HASSETSID 1 94367745Seric # define HASINITGROUPS 1 94467745Seric # define GIDSET_T gid_t 94567745Seric # define SLEEP_T unsigned 94666752Seric # define SFS_TYPE SFS_STATVFS 94766752Seric # define LA_TYPE LA_ZERO 94866752Seric # undef WIFEXITED 94966752Seric # undef WEXITSTATUS 95066752Seric # define _PATH_UNIX "/unix" 95166752Seric # ifndef _PATH_SENDMAILCF 95266752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 95366752Seric # endif 95466752Seric # ifndef _PATH_SENDMAILPID 95566752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 95666752Seric # endif 95766752Seric # define SYSLOG_BUFSIZE 128 95866752Seric #endif 95966752Seric 96066752Seric 96166752Seric /* 96266748Seric ** Intergraph CLIX 3.1 96366748Seric ** 96466748Seric ** From Paul Southworth <pauls@locust.cic.net> 96566748Seric */ 96665820Seric 96766748Seric #ifdef CLIX 96866748Seric # define SYSTEM5 1 /* looks like System V */ 96966752Seric # ifndef HASGETUSERSHELL 97066752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 97166752Seric # endif 97266748Seric # define DEV_BSIZE 512 /* device block size not defined */ 97366748Seric # define GIDSET_T gid_t 97466748Seric # undef LOG /* syslog not available */ 97566748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 97666748Seric # define GETSHORT _getshort 97766748Seric #endif 97865820Seric 97966748Seric 98066776Seric /* 98166776Seric ** NCR 3000 Series (SysVr4) 98266776Seric ** 98367434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 98466776Seric */ 98566748Seric 98666776Seric #ifdef NCR3000 98766776Seric # define __svr4__ 98866776Seric # undef BSD 98966776Seric # define LA_AVENRUN "avenrun" 99066776Seric #endif 99166748Seric 99266776Seric 99367434Seric /* 99467434Seric ** Tandem NonStop-UX SVR4 99567434Seric ** 99667434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 99767434Seric */ 99866776Seric 99967434Seric #ifdef NonStop_UX_BXX 100067434Seric # define __svr4__ 100167434Seric #endif 100266776Seric 100367434Seric 100467488Seric /* 100567488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 100667488Seric ** 100767488Seric ** Tested for 1.04 and 1.03 100867488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 100967488Seric */ 101067434Seric 101167488Seric #ifdef __H3050R 101267488Seric # define SYSTEM5 1 /* include all the System V defines */ 101367488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 101467488Seric # define setreuid(r, e) setresuid(r, e, -1) 101567488Seric # define LA_TYPE LA_FLOAT 101667488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 101767488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 101867488Seric # ifndef GIDSET_T 101967488Seric # define GIDSET_T gid_t 102067488Seric # endif 102167488Seric # ifndef _PATH_UNIX 102267488Seric # define _PATH_UNIX "/HI-UX" 102367488Seric # endif 102467488Seric # ifndef _PATH_SENDMAILCF 102567488Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 102667488Seric # endif 102767488Seric # ifndef IDENTPROTO 102867488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 102967488Seric # endif 103067488Seric # ifndef HASGETUSERSHELL 103167488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 103267488Seric # endif 103367488Seric 103467488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 103567488Seric # undef m_flags 103667488Seric 103767488Seric # ifdef __STDC__ 103867488Seric extern int syslog(int, char *, ...); 103967488Seric # endif 104067488Seric 104167488Seric #endif 104267488Seric 104367488Seric 104468099Seric /* 104568099Seric ** Amdahl UTS System V 2.1.5 (SVr3-based) 104668099Seric ** 104768099Seric ** From: Janet Jackson <janet@dialix.oz.au>. 104868099Seric */ 104967488Seric 105068099Seric #ifdef _UTS 105168099Seric # include <sys/sysmacros.h> 105268099Seric # undef HASLSTAT /* has symlinks, but they cause problems */ 105368099Seric # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 105468099Seric # define SYS5SIGNALS 1 /* System V signal semantics */ 105568099Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 105668099Seric # define HASUNAME 1 /* use System V uname(2) system call */ 105768099Seric # define HASINITGROUPS 1 /* has initgroups(3) function */ 105868099Seric # define HASSETVBUF 1 /* has setvbuf(3) function */ 105968099Seric # define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */ 106068099Seric # ifndef HASGETUSERSHELL 106168099Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 106268099Seric # endif 106368099Seric # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 106468099Seric # define LA_TYPE LA_ZERO /* doesn't have load average */ 106568099Seric # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 106668439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 106768099Seric # define _PATH_UNIX "/unix" 106868099Seric # ifndef _PATH_SENDMAILCF 106968099Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 107068099Seric # endif 107168099Seric #endif 107268099Seric 107368357Seric /* 107468357Seric ** Cray Computer Corporation's CSOS 107568357Seric ** 107668357Seric ** Contributed by Scott Bolte <scott@craycos.com>. 107768357Seric */ 107868099Seric 107968357Seric #ifdef _CRAYCOM 108068357Seric # define SYSTEM5 1 /* include all the System V defines */ 108168357Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 108268357Seric # define NEEDFSYNC 1 /* no fsync in system library */ 108368357Seric # define MAXPATHLEN PATHSIZE 108468357Seric # define LA_TYPE LA_ZERO 108568357Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 108668439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 108768357Seric # define _POSIX_CHOWN_RESTRICTED -1 108868357Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 108968357Seric #endif 109068099Seric 109168099Seric 109263902Seric /********************************************************************** 109363787Seric ** End of Per-Operating System defines 109463902Seric **********************************************************************/ 109563787Seric 109663949Seric /********************************************************************** 109763949Seric ** More general defines 109863949Seric **********************************************************************/ 109963949Seric 110063962Seric /* general BSD defines */ 110163962Seric #ifdef BSD 110264035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 110364035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 110467742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 110567430Seric # ifndef HASSETRLIMIT 110667430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 110767430Seric # endif 110865830Seric # ifndef HASFLOCK 110965830Seric # define HASFLOCK 1 /* has flock(2) call */ 111065830Seric # endif 111167602Seric # ifndef TZ_TYPE 111267608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 111367602Seric # endif 111463962Seric #endif 111563962Seric 111665189Seric /* general System V Release 4 defines */ 111765189Seric #ifdef __svr4__ 111865189Seric # define SYSTEM5 1 111965189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 112067742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 112167742Seric # ifndef HASSETRLIMIT 112267742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 112367742Seric # endif 112465211Seric # ifndef HASGETUSERSHELL 112565211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 112665210Seric # endif 112765189Seric # define setreuid(r, e) seteuid(e) 112865189Seric 112965189Seric # ifndef _PATH_UNIX 113065189Seric # define _PATH_UNIX "/unix" 113165189Seric # endif 113265189Seric # ifndef _PATH_SENDMAILCF 113365189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 113465189Seric # endif 113565189Seric # ifndef _PATH_SENDMAILPID 113665189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 113765189Seric # endif 113865189Seric # ifndef SYSLOG_BUFSIZE 113965189Seric # define SYSLOG_BUFSIZE 128 114065189Seric # endif 114167159Seric # ifndef SFS_TYPE 114267159Seric # define SFS_TYPE SFS_STATVFS 114367159Seric # endif 114465189Seric #endif 114565189Seric 114663787Seric /* general System V defines */ 114766298Seric #ifdef SYSTEM5 114864813Seric # include <sys/sysmacros.h> 114963949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 115064705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 115164962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 115267430Seric # ifndef HASULIMIT 115367430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 115467430Seric # endif 115563962Seric # ifndef LA_TYPE 115665749Seric # define LA_TYPE LA_INT /* assume integer load average */ 115763962Seric # endif 115865749Seric # ifndef SFS_TYPE 115965749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 116065749Seric # endif 116167602Seric # ifndef TZ_TYPE 116267608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 116367602Seric # endif 116468442Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 116568442Seric # define bzero(d, l) (memset((d), '\0', (l))) 116668442Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 116766298Seric #endif 116863787Seric 116963949Seric /* general POSIX defines */ 117063949Seric #ifdef _POSIX_VERSION 117164718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 117264718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 117363949Seric #endif 117463949Seric 117563787Seric /* 117663937Seric ** If no type for argument two of getgroups call is defined, assume 117763937Seric ** it's an integer -- unfortunately, there seem to be several choices 117863937Seric ** here. 117963937Seric */ 118063937Seric 118163937Seric #ifndef GIDSET_T 118263937Seric # define GIDSET_T int 118363937Seric #endif 118463937Seric 118564939Seric /* 118668357Seric ** Tweaking for systems that (for example) claim to be BSD or POSIX 118768357Seric ** but don't have all the standard BSD or POSIX routines (boo hiss). 118864939Seric */ 118964439Seric 119064939Seric #ifdef titan 119164939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 119264939Seric #endif 119364939Seric 119468357Seric #ifdef _CRAYCOM 119568357Seric # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ 119668357Seric #endif 119765830Seric 119868442Seric #ifdef ISC_UNIX 119968442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 120068442Seric #endif 120168357Seric 120268442Seric #ifdef ALTOS_SYS_V 120368442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 120468442Seric # undef bzero /* despite SystemV claim, uses BSD bzero */ 120568442Seric # undef bcmp /* despite SystemV claim, uses BSD bcmp */ 120668442Seric #endif 120768442Seric 120868442Seric 120965167Seric /* 121065167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 121165167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 121265167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 121365167Seric ** are closed. Some firewalls return this error if you try to connect 121465167Seric ** to the IDENT port (113), so you can't receive email from these hosts 121565167Seric ** on these systems. The firewall really should use a more specific 121665167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 121765167Seric ** not explicitly set to zero above, default it on. 121865167Seric */ 121964939Seric 122065167Seric #ifndef IDENTPROTO 122165167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 122265167Seric #endif 122365167Seric 122465211Seric #ifndef HASGETUSERSHELL 122565211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 122665210Seric #endif 122765167Seric 122865830Seric #ifndef HASFLOCK 122965830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 123065830Seric #endif 123165210Seric 123267430Seric #ifndef HASSETRLIMIT 123367430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 123467430Seric #endif 123567430Seric 123667430Seric #ifndef HASULIMIT 123767430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 123867430Seric #endif 123967430Seric 124066843Seric #ifndef OLD_NEWDB 124166843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 124266843Seric #endif 124365830Seric 124468099Seric /* heuristic setting of HASSETSIGMASK; can override above */ 124568099Seric #ifndef HASSIGSETMASK 124668099Seric # ifdef SIGVTALRM 124768099Seric # define HASSETSIGMASK 1 124868099Seric # else 124968099Seric # define HASSETSIGMASK 0 125068099Seric # endif 125168099Seric #endif 125266843Seric 125368099Seric 125464439Seric /********************************************************************** 125559023Seric ** Remaining definitions should never have to be changed. They are 125659023Seric ** primarily to provide back compatibility for older systems -- for 125759287Seric ** example, it includes some POSIX compatibility definitions 125864439Seric **********************************************************************/ 125959023Seric 126059388Seric /* System 5 compatibility */ 126159388Seric #ifndef S_ISREG 126264944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 126359388Seric #endif 126464944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 126564944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 126664944Seric #endif 126768494Seric #ifndef S_IWUSR 126868494Seric # define S_IWUSR 0200 126968494Seric #endif 127059388Seric #ifndef S_IWGRP 127168494Seric # define S_IWGRP 0020 127259388Seric #endif 127359388Seric #ifndef S_IWOTH 127468494Seric # define S_IWOTH 0002 127559388Seric #endif 127659388Seric 127759023Seric /* 127850537Seric ** Older systems don't have this error code -- it should be in 127950537Seric ** /usr/include/sysexits.h. 128050537Seric */ 128150537Seric 128250537Seric # ifndef EX_CONFIG 128350537Seric # define EX_CONFIG 78 /* configuration error */ 128450537Seric # endif 128556852Seric 128664718Seric /* pseudo-code used in server SMTP */ 128764718Seric # define EX_QUIT 22 /* drop out of server immediately */ 128864718Seric 128964718Seric 129063993Seric /* 129163993Seric ** These are used in a few cases where we need some special 129263993Seric ** error codes, but where the system doesn't provide something 129363993Seric ** reasonable. They are printed in errstring. 129463993Seric */ 129563993Seric 129663993Seric #ifndef E_PSEUDOBASE 129763993Seric # define E_PSEUDOBASE 256 129863993Seric #endif 129963993Seric 130063993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 130163993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 130263993Seric 130363970Seric /* type of arbitrary pointer */ 130463970Seric #ifndef ARBPTR_T 130563970Seric # define ARBPTR_T void * 130663970Seric #endif 130763970Seric 130860568Seric #ifndef __P 130960568Seric # include "cdefs.h" 131060568Seric #endif 131160568Seric 131267421Seric #if NAMED_BIND 131367421Seric # include <arpa/nameser.h> 131467434Seric # ifdef __svr4__ 131567434Seric # ifdef NOERROR 131667434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 131767434Seric # endif 131867434Seric # endif 131967421Seric #endif 132067421Seric 132156852Seric /* 132267419Seric ** The size of an IP address -- can't use sizeof because of problems 132367419Seric ** on Crays, where everything is 64 bits. This will break if/when 132467419Seric ** IP addresses are expanded to eight bytes. 132567419Seric */ 132667419Seric 132767421Seric #ifndef INADDRSZ 132867421Seric # define INADDRSZ 4 132967421Seric #endif 133067419Seric 133167419Seric /* 133267421Seric ** The size of various known types -- for reading network protocols. 133367421Seric ** Again, we can't use sizeof because of compiler randomness. 133467421Seric */ 133567421Seric 133667421Seric #ifndef INT16SZ 133767421Seric # define INT16SZ 2 133867421Seric #endif 133967421Seric #ifndef INT32SZ 134067421Seric # define INT32SZ 4 134167421Seric #endif 134267421Seric 134367421Seric /* 134458778Seric ** Do some required dependencies 134558778Seric */ 134658778Seric 134758778Seric #if defined(NETINET) || defined(NETISO) 134859107Seric # define SMTP 1 /* enable user and server SMTP */ 134959107Seric # define QUEUE 1 /* enable queueing */ 135059107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 135158778Seric #endif 135258778Seric 135358778Seric 135458778Seric /* 135556852Seric ** Arrange to use either varargs or stdargs 135656852Seric */ 135756852Seric 135856852Seric # ifdef __STDC__ 135956852Seric 136056852Seric # include <stdarg.h> 136156852Seric 136256852Seric # define VA_LOCAL_DECL va_list ap; 136356852Seric # define VA_START(f) va_start(ap, f) 136456852Seric # define VA_END va_end(ap) 136556852Seric 136656852Seric # else 136756852Seric 136856852Seric # include <varargs.h> 136956852Seric 137056852Seric # define VA_LOCAL_DECL va_list ap; 137156852Seric # define VA_START(f) va_start(ap) 137256852Seric # define VA_END va_end(ap) 137356852Seric 137456852Seric # endif 137557631Seric 137657943Seric #ifdef HASUNAME 137757631Seric # include <sys/utsname.h> 137857631Seric # ifdef newstr 137957631Seric # undef newstr 138057631Seric # endif 138157943Seric #else /* ! HASUNAME */ 138257631Seric # define NODE_LENGTH 32 138357631Seric struct utsname 138457631Seric { 138557631Seric char nodename[NODE_LENGTH+1]; 138657631Seric }; 138757943Seric #endif /* HASUNAME */ 138857642Seric 138968040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 139063838Seric # define MAXHOSTNAMELEN 256 139157735Seric #endif 139258153Seric 139358153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 139458153Seric # define SIGCHLD SIGCLD 139558153Seric #endif 139658153Seric 139758153Seric #ifndef STDIN_FILENO 139858153Seric #define STDIN_FILENO 0 139958153Seric #endif 140058153Seric 140158153Seric #ifndef STDOUT_FILENO 140258153Seric #define STDOUT_FILENO 1 140358153Seric #endif 140458153Seric 140558153Seric #ifndef STDERR_FILENO 140658153Seric #define STDERR_FILENO 2 140758153Seric #endif 140858689Seric 140964072Seric #ifndef LOCK_SH 141064035Seric # define LOCK_SH 0x01 /* shared lock */ 141164035Seric # define LOCK_EX 0x02 /* exclusive lock */ 141264035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 141364035Seric # define LOCK_UN 0x08 /* unlock */ 141464035Seric #endif 141558692Seric 141664035Seric #ifndef SIG_ERR 141764035Seric # define SIG_ERR ((void (*)()) -1) 141858689Seric #endif 141958702Seric 142064500Seric #ifndef WEXITSTATUS 142164500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 142264500Seric #endif 142364500Seric #ifndef WIFEXITED 142464500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 142564500Seric #endif 142664500Seric 142764561Seric #ifndef SIGFUNC_DEFINED 142864561Seric typedef void (*sigfunc_t) __P((int)); 142964561Seric #endif 143064561Seric 143165053Seric /* size of syslog buffer */ 143265053Seric #ifndef SYSLOG_BUFSIZE 143365053Seric # define SYSLOG_BUFSIZE 1024 143465053Seric #endif 143565053Seric 143658702Seric /* 143758702Seric ** Size of tobuf (deliver.c) 143858702Seric ** Tweak this to match your syslog implementation. It will have to 143958702Seric ** allow for the extra information printed. 144058702Seric */ 144158702Seric 144258702Seric #ifndef TOBUFSIZE 144365053Seric # if (SYSLOG_BUFSIZE) > 512 144465053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 144565053Seric # else 144665053Seric # define TOBUFSIZE 256 144765053Seric # endif 144858702Seric #endif 144960219Seric 145065015Seric /* 145165015Seric ** Size of prescan buffer. 145265015Seric ** Despite comments in the _sendmail_ book, this probably should 145365015Seric ** not be changed; there are some hard-to-define dependencies. 145465015Seric */ 145565015Seric 145665015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 145760219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 145860219Seric # ifndef FORK 145960219Seric # define FORK vfork /* function to call to fork mailer */ 146060219Seric # endif 146165955Seric 146265955Seric /* 146365955Seric ** If we are going to link scanf anyway, use it in readcf 146465955Seric */ 146565955Seric 146665955Seric #if !defined(HASUNAME) && !defined(SCANF) 146765955Seric # define SCANF 1 146865955Seric #endif 1469