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*67729Seric * @(#)conf.h 8.117 (Berkeley) 08/21/94 933728Sbostic */ 109147Seric 1122726Sdist /* 1222726Sdist ** CONF.H -- All user-configurable parameters for sendmail 1322726Sdist */ 149147Seric 1557232Seric # include <sys/param.h> 1664705Seric # include <sys/types.h> 1759389Seric # include <sys/stat.h> 1864380Seric # include <sys/file.h> 1964500Seric # include <sys/wait.h> 2058689Seric # include <fcntl.h> 2164035Seric # include <signal.h> 2257232Seric 2363902Seric /********************************************************************** 249147Seric ** Table sizes, etc.... 259147Seric ** There shouldn't be much need to change these.... 2663902Seric **********************************************************************/ 279147Seric 2859303Seric # define MAXLINE 2048 /* max line length */ 2924945Seric # define MAXNAME 256 /* max length of a name */ 309147Seric # define MAXPV 40 /* max # of parms to mailers */ 3159303Seric # define MAXATOM 200 /* max atoms per address */ 329147Seric # define MAXMAILERS 25 /* maximum mailers known to system */ 3357143Seric # define MAXRWSETS 100 /* max # of sets of rewriting rules */ 349147Seric # define MAXPRIORITIES 25 /* max values for Precedence: field */ 3557143Seric # define MAXMXHOSTS 20 /* max # of MX records */ 3652106Seric # define SMTPLINELIM 990 /* maximum SMTP line length */ 3757232Seric # define MAXKEY 128 /* maximum size of a database key */ 3857232Seric # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 3959056Seric # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 4059667Seric # define MAXALIASDB 12 /* max # of alias databases */ 41*67729Seric # define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 42*67729Seric # define MAXTOCLASS 8 /* max # of message timeout classes */ 4357143Seric 4457143Seric # ifndef QUEUESIZE 4557143Seric # define QUEUESIZE 1000 /* max # of jobs per queue run */ 4657143Seric # endif 4757143Seric 4863902Seric /********************************************************************** 499147Seric ** Compilation options. 5025673Seric ** 5125673Seric ** #define these if they are available; comment them out otherwise. 5263902Seric **********************************************************************/ 539147Seric 5425673Seric # define LOG 1 /* enable logging */ 5525673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 5664813Seric # define NETUNIX 1 /* include unix domain support */ 5758778Seric # define NETINET 1 /* include internet support */ 5825673Seric # define SETPROCTITLE 1 /* munge argv to display current status */ 5953735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 6063753Seric # define XDEBUG 1 /* enable extended debugging */ 6156337Seric # ifdef NEWDB 6256337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6356337Seric # endif 6456337Seric 6566334Seric /********************************************************************** 6666334Seric ** 0/1 Compilation options. 6766334Seric ** #define these to 1 if they are available; 6866334Seric ** #define them to 0 otherwise. 6966334Seric **********************************************************************/ 7066334Seric 7166334Seric # ifndef NAMED_BIND 7266334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 7366334Seric # endif 7466334Seric 7564032Seric /* 7664944Seric ** Most systems have symbolic links today, so default them on. You 7764944Seric ** can turn them off by #undef'ing this below. 7864944Seric */ 7964944Seric 8064944Seric # define HASLSTAT 1 /* has lstat(2) call */ 8164944Seric 8264962Seric /* 8364962Seric ** General "standard C" defines. 8464962Seric ** 8564962Seric ** These may be undone later, to cope with systems that claim to 8664962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 8764962Seric ** doesn't realize that the library is part of the language. 8864962Seric ** 8964962Seric ** Life would be much easier if we could get rid of this sort 9064962Seric ** of bozo problems. 9164962Seric */ 9264962Seric 9364962Seric #ifdef __STDC__ 9464962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 9564962Seric #endif 9664962Seric 9763902Seric /********************************************************************** 9859023Seric ** Operating system configuration. 9959023Seric ** 10059023Seric ** Unless you are porting to a new OS, you shouldn't have to 10159023Seric ** change these. 10263902Seric **********************************************************************/ 10356823Seric 10463787Seric /* 10563787Seric ** Per-Operating System defines 10663787Seric */ 10763787Seric 10864314Seric 10963902Seric /* 11065565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 11163902Seric */ 11263902Seric 11367626Seric #ifdef __hpux 11464727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 11564727Seric # undef m_flags 11663787Seric # define SYSTEM5 1 /* include all the System V defines */ 11764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 11864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 11965982Seric # define setreuid(r, e) setresuid(r, e, -1) 12063962Seric # define LA_TYPE LA_FLOAT 12165749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 12265354Seric # define GIDSET_T gid_t 12363962Seric # define _PATH_UNIX "/hp-ux" 12465354Seric # ifndef _PATH_SENDMAILCF 12565354Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 12665354Seric # endif 12765167Seric # ifndef IDENTPROTO 12865167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 12956823Seric # endif 13065581Seric # ifndef HASGETUSERSHELL 13165581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 13265581Seric # endif 13365504Seric # define syslog hard_syslog 13465581Seric # ifdef __STDC__ 13565581Seric extern int syslog(int, char *, ...); 13665167Seric # endif 13767626Seric #endif 13856823Seric 13964314Seric 14063902Seric /* 14163902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 14263902Seric */ 14363902Seric 14467626Seric #ifdef _AIX3 14564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 14664840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 14765211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 14860219Seric # define FORK fork /* no vfork primitive available */ 14965749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 15067626Seric #endif 15160219Seric 15264314Seric 15363902Seric /* 15463902Seric ** Silicon Graphics IRIX 15563902Seric ** 15663965Seric ** Compiles on 4.0.1. 15763902Seric */ 15863902Seric 15967626Seric #ifdef IRIX 16066763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 16164035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 16264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 16365211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 16463753Seric # define FORK fork /* no vfork primitive available */ 16564562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 16664155Seric # define setpgid BSDsetpgrp 16763937Seric # define GIDSET_T gid_t 16865749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 16966763Seric # define LA_TYPE LA_INT 17067435Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 17167626Seric #endif 17263753Seric 17363902Seric 17463902Seric /* 17564813Seric ** SunOS and Solaris 17664813Seric ** 17764813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 17864813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 17963902Seric */ 18063902Seric 18163787Seric #if defined(sun) && !defined(BSD) 18259074Seric 18364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 18464813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 18565211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 18665749Seric # define LA_TYPE LA_INT 18760564Seric 18864842Seric # ifdef SOLARIS_2_3 18964842Seric # define SOLARIS 19064842Seric # endif 19164842Seric 19260602Seric # ifdef SOLARIS 19363902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 19465222Seric # ifndef __svr4__ 19565222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 19665222Seric # endif 19763787Seric # include <sys/time.h> 19864832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 19964832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 20065172Seric # define GIDSET_T gid_t 20165189Seric # ifndef _PATH_UNIX 20267129Seric # define _PATH_UNIX "/dev/ksyms" 20365189Seric # endif 20463962Seric # ifndef _PATH_SENDMAILCF 20563962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 20664072Seric # endif 20764072Seric # ifndef _PATH_SENDMAILPID 20863962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 20963962Seric # endif 21066022Seric # ifndef SYSLOG_BUFSIZE 21166022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 21266022Seric # endif 21363787Seric 21460602Seric # else 21565105Seric /* SunOS 4.0.3 or 4.1.x */ 21665189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21765830Seric # ifndef HASFLOCK 21865830Seric # define HASFLOCK 1 /* has flock(2) call */ 21965830Seric # endif 22065749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 22160564Seric # include <vfork.h> 22263787Seric 22365105Seric # ifdef SUNOS403 22465105Seric /* special tweaking for SunOS 4.0.3 */ 22565105Seric # include <malloc.h> 22665105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 22765105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 22865105Seric # undef WIFEXITED 22965105Seric # undef WEXITSTATUS 23065105Seric # undef HASUNAME 23165105Seric # define setpgid setpgrp 23265105Seric typedef int pid_t; 23365105Seric extern char *getenv(); 23465105Seric 23566732Seric # else 23666732Seric /* 4.1.x specifics */ 23766732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 23866732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 23966732Seric 24065105Seric # endif 24160564Seric # endif 24259023Seric #endif 24359023Seric 24464718Seric /* 24564813Seric ** DG/UX 24664813Seric ** 24767427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 24867427Seric ** older support. 24967427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 25064718Seric */ 25164314Seric 25267427Seric #ifdef DGUX_5_4_2 25367427Seric # define DGUX 1 25467427Seric #endif 25567427Seric 25664718Seric #ifdef DGUX 25764718Seric # define SYSTEM5 1 25864718Seric # define LA_TYPE LA_SUBR 25964718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 26064718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 26164718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 26264718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 26366036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 26465167Seric # ifndef IDENTPROTO 26565167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 26665167Seric # endif 26764718Seric # undef SETPROCTITLE 26865749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 26964813Seric 27064813Seric /* these include files must be included early on DG/UX */ 27164813Seric # include <netinet/in.h> 27264813Seric # include <arpa/inet.h> 27364813Seric 27467427Seric # ifdef DGUX_5_4_2 27567427Seric # define inet_addr dgux_inet_addr 27664718Seric extern long dgux_inet_addr(); 27767427Seric # endif 27864718Seric #endif 27964718Seric 28064718Seric 28163902Seric /* 28263902Seric ** Digital Ultrix 4.2A or 4.3 28364264Seric ** 28464264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 28564264Seric ** not dropped when the process exits. This causes major problems, 28664264Seric ** so flock is the only alternative. 28763902Seric */ 28863902Seric 28960564Seric #ifdef ultrix 29064035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 29163962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 29264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 29366242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 29465830Seric # ifndef HASFLOCK 29565830Seric # define HASFLOCK 1 /* has flock(2) call */ 29665830Seric # endif 29765211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 29866318Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 29965135Seric # ifdef vax 30065135Seric # define LA_TYPE LA_FLOAT 30165135Seric # else 30265135Seric # define LA_TYPE LA_INT 30365135Seric # define LA_AVENRUN "avenrun" 30465135Seric # endif 30565749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 30665167Seric # ifndef IDENTPROTO 30765167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 30865167Seric # endif 30960564Seric #endif 31060564Seric 31164314Seric 31263902Seric /* 31363902Seric ** OSF/1 (tested on Alpha) 31463902Seric */ 31563902Seric 31663787Seric #ifdef __osf__ 31763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 31864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 31964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 32066226Seric # ifndef HASFLOCK 32165830Seric # define HASFLOCK 1 /* has flock(2) call */ 32265830Seric # endif 32363962Seric # define LA_TYPE LA_INT 32465749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 32564813Seric # ifndef _PATH_SENDMAILPID 32665504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 32764813Seric # endif 32859287Seric #endif 32959287Seric 33064314Seric 33163902Seric /* 33263902Seric ** NeXTstep 33363902Seric */ 33463902Seric 33564076Seric #ifdef NeXT 33664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 33765830Seric # ifndef HASFLOCK 33865830Seric # define HASFLOCK 1 /* has flock(2) call */ 33965830Seric # endif 34064125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 34164563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 34263753Seric # define sleep sleepX 34364155Seric # define setpgid setpgrp 34464295Seric # ifndef LA_TYPE 34564295Seric # define LA_TYPE LA_MACH 34664295Seric # endif 34765749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 34864500Seric # ifndef _POSIX_SOURCE 34964035Seric typedef int pid_t; 35064500Seric # undef WEXITSTATUS 35164500Seric # undef WIFEXITED 35264500Seric # endif 35364072Seric # ifndef _PATH_SENDMAILCF 35464072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 35564072Seric # endif 35664072Seric # ifndef _PATH_SENDMAILPID 35764072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 35864072Seric # endif 35959288Seric #endif 36059288Seric 36164314Seric 36263902Seric /* 36363962Seric ** 4.4 BSD 36464831Seric ** 36564831Seric ** See also BSD defines. 36663902Seric */ 36763902Seric 36860568Seric #ifdef BSD4_4 36964072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 37060568Seric # include <sys/cdefs.h> 37163838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 37264072Seric # ifndef LA_TYPE 37364072Seric # define LA_TYPE LA_SUBR 37464072Seric # endif 37565749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 37660568Seric #endif 37760568Seric 37864314Seric 37963902Seric /* 38065982Seric ** BSD/386 (all versions) 38165982Seric ** From Tony Sanders, BSDI 38265982Seric */ 38365982Seric 38465982Seric #ifdef __bsdi__ 38565982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 38665982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 38766843Seric # include <sys/cdefs.h> 38866843Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 38966030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 39066843Seric # ifndef LA_TYPE 39166843Seric # define LA_TYPE LA_SUBR 39266843Seric # endif 39365982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 39466843Seric /* version 1.1 or later */ 39565982Seric # define HASSETPROCTITLE 1 /* setproctitle is in libc */ 39666732Seric # undef SETPROCTITLE /* so don't redefine it in conf.c */ 39766843Seric # else 39866843Seric /* version 1.0 or earlier */ 39966843Seric # ifndef OLD_NEWDB 40066843Seric # define OLD_NEWDB 1 /* old version of newdb library */ 40166843Seric # endif 40265982Seric # endif 40365982Seric #endif 40465982Seric 40565982Seric 40665982Seric 40765982Seric /* 40865049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 40964733Seric ** 41064733Seric ** 4.3BSD clone, closer to 4.4BSD 41164831Seric ** 41264831Seric ** See also BSD defines. 41364733Seric */ 41464733Seric 41565049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 41664733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 41764733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 41866754Seric # ifdef __NetBSD__ 41966754Seric # define HASUNAME 1 /* has uname(2) syscall */ 42066754Seric # endif 42164733Seric # include <sys/cdefs.h> 42264733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 42364733Seric # ifndef LA_TYPE 42464733Seric # define LA_TYPE LA_SUBR 42564733Seric # endif 42665749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 42764733Seric #endif 42864733Seric 42964733Seric 43064733Seric /* 43164813Seric ** Mach386 43264813Seric ** 43364813Seric ** For mt Xinu's Mach386 system. 43464813Seric */ 43564813Seric 43664813Seric #if defined(MACH) && defined(i386) 43764813Seric # define MACH386 1 43864813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 43964813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 44066226Seric # ifndef HASFLOCK 44165830Seric # define HASFLOCK 1 /* has flock(2) call */ 44265830Seric # endif 44364813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 44464813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 44564813Seric # define setpgid setpgrp 44664813Seric # ifndef LA_TYPE 44764813Seric # define LA_TYPE LA_FLOAT 44864813Seric # endif 44965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 45064962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 45164813Seric # undef WEXITSTATUS 45264813Seric # undef WIFEXITED 45364813Seric # ifndef _PATH_SENDMAILCF 45464813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 45564813Seric # endif 45664813Seric # ifndef _PATH_SENDMAILPID 45764813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 45864813Seric # endif 45964813Seric #endif 46064813Seric 46164813Seric 46264813Seric /* 46363969Seric ** 4.3 BSD -- this is for very old systems 46463969Seric ** 46565949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 46665949Seric ** 46763969Seric ** You'll also have to install a new resolver library. 46863969Seric ** I don't guarantee that support for this environment is complete. 46963969Seric */ 47063969Seric 47165949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 47263969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 47363969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 47463970Seric # define ARBPTR_T char * 47564155Seric # define setpgid setpgrp 47663969Seric # ifndef LA_TYPE 47763969Seric # define LA_TYPE LA_FLOAT 47863969Seric # endif 47963969Seric # ifndef _PATH_SENDMAILCF 48063969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 48163969Seric # endif 48265167Seric # ifndef IDENTPROTO 48365167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 48465167Seric # endif 48564834Seric # undef WEXITSTATUS 48664834Seric # undef WIFEXITED 48764834Seric typedef short pid_t; 48864834Seric extern int errno; 48963969Seric #endif 49063969Seric 49164314Seric 49263969Seric /* 49363902Seric ** SCO Unix 49465087Seric ** 49565087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 49665087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 49765087Seric ** The second is, I believe, for an older version. 49863902Seric */ 49963902Seric 50065087Seric #ifdef _SCO_unix_4_2 50165087Seric # define _SCO_unix_ 50265087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 50366757Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 50465087Seric # define _PATH_UNIX "/unix" 50565087Seric # ifndef _PATH_SENDMAILCF 50665087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 50765087Seric # endif 50865087Seric # ifndef _PATH_SENDMAILPID 50965087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 51065087Seric # endif 51165087Seric #endif 51265087Seric 51363838Seric #ifdef _SCO_unix_ 51463838Seric # define SYSTEM5 1 /* include all the System V defines */ 51564035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 51665212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 51763838Seric # define FORK fork 51863838Seric # define MAXPATHLEN PATHSIZE 51964718Seric # define LA_TYPE LA_SHORT 52065749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 52167608Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 52264813Seric # undef NETUNIX /* no unix domain socket support */ 52363838Seric #endif 52463838Seric 52564314Seric 52663962Seric /* 52763962Seric ** ConvexOS 11.0 and later 52865949Seric ** 52965949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 53065949Seric ** works on 9.1 as well. 53163962Seric */ 53263962Seric 53363962Seric #ifdef _CONVEX_SOURCE 53463977Seric # define BSD 1 /* include all the BSD defines */ 53563977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 53663962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 53763977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 53863962Seric # define LA_TYPE LA_FLOAT 53965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 54065949Seric # ifndef _PATH_SENDMAILCF 54165949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 54265949Seric # endif 54365949Seric # ifndef S_IREAD 54465949Seric # define S_IREAD _S_IREAD 54565949Seric # define S_IWRITE _S_IWRITE 54665949Seric # define S_IEXEC _S_IEXEC 54765949Seric # define S_IFMT _S_IFMT 54865949Seric # define S_IFCHR _S_IFCHR 54965949Seric # define S_IFBLK _S_IFBLK 55065949Seric # endif 55165167Seric # ifndef IDENTPROTO 55265167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 55365167Seric # endif 55463962Seric #endif 55563962Seric 55664314Seric 55763962Seric /* 55864999Seric ** RISC/os 4.52 55963962Seric ** 56064999Seric ** Gives a ton of warning messages, but otherwise compiles. 56163962Seric */ 56263962Seric 56363965Seric #ifdef RISCOS 56464999Seric 56563962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 56666226Seric # ifndef HASFLOCK 56765830Seric # define HASFLOCK 1 /* has flock(2) call */ 56865830Seric # endif 56964999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 57064999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 57163962Seric # define LA_TYPE LA_INT 57263962Seric # define LA_AVENRUN "avenrun" 57363962Seric # define _PATH_UNIX "/unix" 57464999Seric # undef WIFEXITED 57564999Seric 57664999Seric # define setpgid setpgrp 57764999Seric 57864999Seric extern int errno; 57964999Seric typedef int pid_t; 58064999Seric #define SIGFUNC_DEFINED 58164999Seric typedef int (*sigfunc_t)(); 58264999Seric extern char *getenv(); 58364999Seric extern void *malloc(); 58464999Seric 58563962Seric #endif 58663962Seric 58764314Seric 58864155Seric /* 58964155Seric ** Linux 0.99pl10 and above... 59066300Seric ** 59166300Seric ** Thanks to, in reverse order of contact: 59266300Seric ** 59366300Seric ** John Kennedy <warlock@csuchico.edu> 59466300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 59566300Seric ** Karl London <karl@borg.demon.co.uk> 59666300Seric ** 59766300Seric ** Last compiled against: [03/02/94 @ 05:34 PM (Wednesday)] 59866300Seric ** sendmail 8.6.6.b9 named 4.9.2-931205-p1 db-1.73 59966300Seric ** gcc 2.5.8 libc.so.4.5.19 60066300Seric ** slackware 1.1.2 linux 0.99.15 60164155Seric */ 60264155Seric 60364770Seric #ifdef __linux__ 60466298Seric # define BSD 1 /* include BSD defines */ 60564155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 60666298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 60764380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 60866298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 60966300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 61064155Seric # ifndef LA_TYPE 61166301Seric # define LA_TYPE LA_PROCSTR 61264155Seric # endif 61366300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 61464763Seric # include <sys/sysmacros.h> 61566300Seric # undef atol /* wounded in <stdlib.h> */ 61664155Seric #endif 61764155Seric 61864155Seric 61964345Seric /* 62064345Seric ** DELL SVR4 Issue 2.2, and others 62164345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 62264345Seric ** 62364345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 62464345Seric ** defined, and the definitions conflict. 62564924Seric ** 62664924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 62764924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 62864924Seric ** (SVR4.0/386 version 3.0). 62964345Seric */ 63064345Seric 63164345Seric #ifdef DELL_SVR4 63265189Seric /* no changes necessary */ 63365189Seric /* see general __svr4__ defines below */ 63464345Seric #endif 63564345Seric 63664345Seric 63764380Seric /* 63864380Seric ** Apple A/UX 3.0 63964380Seric */ 64064345Seric 64164380Seric #ifdef _AUX_SOURCE 64264729Seric # include <sys/sysmacros.h> 64364380Seric # define BSD /* has BSD routines */ 64464380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 64564380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 64664561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 64765167Seric # ifndef IDENTPROTO 64865167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 64965167Seric # endif 65064380Seric # define FORK fork 65164380Seric # ifndef _PATH_SENDMAILCF 65264380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 65364380Seric # endif 65464380Seric # ifndef LA_TYPE 65564380Seric # define LA_TYPE LA_ZERO 65664380Seric # endif 65765749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 65864560Seric # undef WIFEXITED 65964560Seric # undef WEXITSTATUS 66064380Seric #endif 66164380Seric 66264380Seric 66364705Seric /* 66464705Seric ** Encore UMAX V 66564705Seric ** 66664705Seric ** Not extensively tested. 66764705Seric */ 66864380Seric 66964705Seric #ifdef UMAXV 67064705Seric # include <limits.h> 67164705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 67264705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 67364705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 67465211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 67564705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 67664705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 67764705Seric # define FORK fork /* no vfork(2) primitive available */ 67865749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 67964705Seric # define MAXPATHLEN PATH_MAX 68064705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 68164705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 68264705Seric # undef WIFEXITED 68364705Seric # undef WEXITSTATUS 68464705Seric #endif 68564705Seric 68664705Seric 68764939Seric /* 68864939Seric ** Stardent Titan 3000 running TitanOS 4.2. 68964939Seric ** 69064939Seric ** Must be compiled in "cc -43" mode. 69164939Seric ** 69264944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 69364939Seric ** 69464939Seric ** Note the tweaking below after the BSD defines are set. 69564939Seric */ 69664705Seric 69764939Seric #ifdef titan 69864939Seric # define setpgid setpgrp 69964939Seric typedef int pid_t; 70064939Seric # undef WIFEXITED 70164939Seric # undef WEXITSTATUS 70264939Seric #endif 70364939Seric 70464939Seric 70564962Seric /* 70664962Seric ** Sequent DYNIX 3.2.0 70764962Seric ** 70864962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 70964962Seric */ 71064939Seric 71164962Seric #ifdef sequent 71266038Seric 71364962Seric # define BSD 1 71464962Seric # define HASUNSETENV 1 71564962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 71664962Seric # define WAITUNION 1 71764962Seric # define LA_TYPE LA_FLOAT 71864962Seric # ifdef _POSIX_VERSION 71964962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 72064962Seric # endif 72164962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 72264962Seric # define setpgid setpgrp 72364962Seric 72464962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 72564962Seric # undef WIFEXITED 72664962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 72764962Seric ((union wait*)&(s))->w_termsig == 0) 72864962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 72964962Seric typedef int pid_t; 73064962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 73164962Seric 73266144Seric # ifndef IDENTPROTO 73366144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 73466144Seric # endif 73566144Seric 73664962Seric # ifndef _PATH_UNIX 73764962Seric # define _PATH_UNIX "/dynix" 73864962Seric # endif 73964962Seric # ifndef _PATH_SENDMAILCF 74064962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 74164962Seric # endif 74264962Seric 74364962Seric #endif 74464962Seric 74564962Seric 74665748Seric /* 74766038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 74866038Seric ** 74966038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 75066038Seric ** 75166038Seric ** From Tim Wright <timw@sequent.com>. 75266038Seric */ 75366038Seric 75466038Seric #ifdef _SEQUENT_ 75566038Seric # define SYSTEM5 1 /* include all the System V defines */ 75666038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 75766038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 75866038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 75966038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 76066038Seric # define GIDSET_T gid_t 76166038Seric # define LA_TYPE LA_INT 76266038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 76366038Seric # undef SETPROCTITLE 76466144Seric # ifndef IDENTPROTO 76566144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 76666144Seric # endif 76766038Seric # ifndef _PATH_SENDMAILCF 76866038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 76966038Seric # endif 77066038Seric # ifndef _PATH_SENDMAILPID 77166038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 77266038Seric # endif 77366038Seric #endif 77466038Seric 77566038Seric 77666038Seric /* 77765748Seric ** Cray Unicos 77865748Seric ** 77965748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 78065748Seric */ 78164962Seric 78265748Seric #ifdef UNICOS 78365748Seric # define SYSTEM5 1 /* include all the System V defines */ 78465748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 78565748Seric # define MAXPATHLEN PATHSIZE 78665748Seric # define LA_TYPE LA_ZERO 78765749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 78865748Seric #endif 78964962Seric 79065748Seric 79165820Seric /* 79265820Seric ** Apollo DomainOS 79365820Seric ** 79465820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 79565982Seric ** 79665820Seric ** 15 Jan 1994 79765820Seric ** 79865820Seric */ 79965748Seric 80065820Seric #ifdef apollo 80165820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 80265820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 80365820Seric # undef SETPROCTITLE 80465820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 80566044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 80665820Seric # ifndef _PATH_SENDMAILCF 80765820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 80865820Seric # endif 80965820Seric # ifndef _PATH_SENDMAILPID 81065820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 81165820Seric # endif 81265820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 81365820Seric # undef S_IFIFO 81465820Seric # define S_IFIFO 0010000 81565820Seric # ifndef IDENTPROTO 81665820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 81765820Seric # endif 81865982Seric #endif 81965820Seric 82065820Seric 82166748Seric /* 82266752Seric ** UnixWare 82366752Seric ** 82466752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 82566752Seric */ 82666752Seric 82766752Seric #ifdef UNIXWARE 82866752Seric # define SYSTEM5 1 82966752Seric # ifndef HASGETUSERSHELL 83066752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 83166752Seric # endif 83266752Seric # define GIDSET_T int 83366752Seric # define SLEEP_T int 83466752Seric # define SFS_TYPE SFS_STATVFS 83566752Seric # define LA_TYPE LA_ZERO 83666752Seric # undef WIFEXITED 83766752Seric # undef WEXITSTATUS 83866752Seric # define _PATH_UNIX "/unix" 83966752Seric # ifndef _PATH_SENDMAILCF 84066752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 84166752Seric # endif 84266752Seric # ifndef _PATH_SENDMAILPID 84366752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 84466752Seric # endif 84566752Seric # define SYSLOG_BUFSIZE 128 84666752Seric #endif 84766752Seric 84866752Seric 84966752Seric /* 85066748Seric ** Intergraph CLIX 3.1 85166748Seric ** 85266748Seric ** From Paul Southworth <pauls@locust.cic.net> 85366748Seric */ 85465820Seric 85566748Seric #ifdef CLIX 85666748Seric # define SYSTEM5 1 /* looks like System V */ 85766752Seric # ifndef HASGETUSERSHELL 85866752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 85966752Seric # endif 86066748Seric # define DEV_BSIZE 512 /* device block size not defined */ 86166748Seric # define GIDSET_T gid_t 86266748Seric # undef LOG /* syslog not available */ 86366748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 86466748Seric # define GETSHORT _getshort 86566748Seric #endif 86665820Seric 86766748Seric 86866776Seric /* 86966776Seric ** NCR 3000 Series (SysVr4) 87066776Seric ** 87167434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 87266776Seric */ 87366748Seric 87466776Seric #ifdef NCR3000 87566776Seric # define __svr4__ 87666776Seric # undef BSD 87766776Seric # define LA_AVENRUN "avenrun" 87866776Seric #endif 87966748Seric 88066776Seric 88167434Seric /* 88267434Seric ** Tandem NonStop-UX SVR4 88367434Seric ** 88467434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 88567434Seric */ 88666776Seric 88767434Seric #ifdef NonStop_UX_BXX 88867434Seric # define __svr4__ 88967434Seric #endif 89066776Seric 89167434Seric 89267488Seric /* 89367488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 89467488Seric ** 89567488Seric ** Tested for 1.04 and 1.03 89667488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 89767488Seric */ 89867434Seric 89967488Seric #ifdef __H3050R 90067488Seric # define SYSTEM5 1 /* include all the System V defines */ 90167488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 90267488Seric # define setreuid(r, e) setresuid(r, e, -1) 90367488Seric # define LA_TYPE LA_FLOAT 90467488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 90567488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 90667488Seric # ifndef GIDSET_T 90767488Seric # define GIDSET_T gid_t 90867488Seric # endif 90967488Seric # ifndef _PATH_UNIX 91067488Seric # define _PATH_UNIX "/HI-UX" 91167488Seric # endif 91267488Seric # ifndef _PATH_SENDMAILCF 91367488Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 91467488Seric # endif 91567488Seric # ifndef IDENTPROTO 91667488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 91767488Seric # endif 91867488Seric # ifndef HASGETUSERSHELL 91967488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 92067488Seric # endif 92167488Seric 92267488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 92367488Seric # undef m_flags 92467488Seric 92567488Seric # ifdef __STDC__ 92667488Seric extern int syslog(int, char *, ...); 92767488Seric # endif 92867488Seric 92967488Seric #endif 93067488Seric 93167488Seric 93267488Seric 93363902Seric /********************************************************************** 93463787Seric ** End of Per-Operating System defines 93563902Seric **********************************************************************/ 93663787Seric 93763949Seric /********************************************************************** 93863949Seric ** More general defines 93963949Seric **********************************************************************/ 94063949Seric 94163962Seric /* general BSD defines */ 94263962Seric #ifdef BSD 94364035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 94464035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 94564035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 94667430Seric # ifndef HASSETRLIMIT 94767430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 94867430Seric # endif 94965830Seric # ifndef HASFLOCK 95065830Seric # define HASFLOCK 1 /* has flock(2) call */ 95165830Seric # endif 95267602Seric # ifndef TZ_TYPE 95367608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 95467602Seric # endif 95563962Seric #endif 95663962Seric 95765189Seric /* general System V Release 4 defines */ 95865189Seric #ifdef __svr4__ 95965189Seric # define SYSTEM5 1 96065189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 96165211Seric # ifndef HASGETUSERSHELL 96265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 96365210Seric # endif 96465189Seric # define setreuid(r, e) seteuid(e) 96565189Seric 96665189Seric # ifndef _PATH_UNIX 96765189Seric # define _PATH_UNIX "/unix" 96865189Seric # endif 96965189Seric # ifndef _PATH_SENDMAILCF 97065189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 97165189Seric # endif 97265189Seric # ifndef _PATH_SENDMAILPID 97365189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 97465189Seric # endif 97565189Seric # ifndef SYSLOG_BUFSIZE 97665189Seric # define SYSLOG_BUFSIZE 128 97765189Seric # endif 97867159Seric # ifndef SFS_TYPE 97967159Seric # define SFS_TYPE SFS_STATVFS 98067159Seric # endif 98165189Seric #endif 98265189Seric 98363787Seric /* general System V defines */ 98466298Seric #ifdef SYSTEM5 98564813Seric # include <sys/sysmacros.h> 98663949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 98764705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 98864962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 98967430Seric # ifndef HASULIMIT 99067430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 99167430Seric # endif 99263962Seric # ifndef LA_TYPE 99365749Seric # define LA_TYPE LA_INT /* assume integer load average */ 99463962Seric # endif 99565749Seric # ifndef SFS_TYPE 99665749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 99765749Seric # endif 99867602Seric # ifndef TZ_TYPE 99967608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 100067602Seric # endif 100163949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 100263949Seric # define bzero(d, l) (memset((d), '\0', (l))) 100363949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 100466298Seric #endif 100563787Seric 100663949Seric /* general POSIX defines */ 100763949Seric #ifdef _POSIX_VERSION 100864718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 100964718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 101063949Seric #endif 101163949Seric 101263787Seric /* 101363937Seric ** If no type for argument two of getgroups call is defined, assume 101463937Seric ** it's an integer -- unfortunately, there seem to be several choices 101563937Seric ** here. 101663937Seric */ 101763937Seric 101863937Seric #ifndef GIDSET_T 101963937Seric # define GIDSET_T int 102063937Seric #endif 102163937Seric 102264939Seric /* 102364939Seric ** Tweaking for systems that (for example) claim to be BSD but 102464939Seric ** don't have all the standard BSD routines (boo hiss). 102564939Seric */ 102664439Seric 102764939Seric #ifdef titan 102864939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 102964939Seric #endif 103064939Seric 103165830Seric 103265167Seric /* 103365167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 103465167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 103565167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 103665167Seric ** are closed. Some firewalls return this error if you try to connect 103765167Seric ** to the IDENT port (113), so you can't receive email from these hosts 103865167Seric ** on these systems. The firewall really should use a more specific 103965167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 104065167Seric ** not explicitly set to zero above, default it on. 104165167Seric */ 104264939Seric 104365167Seric #ifndef IDENTPROTO 104465167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 104565167Seric #endif 104665167Seric 104765211Seric #ifndef HASGETUSERSHELL 104865211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 104965210Seric #endif 105065167Seric 105165830Seric #ifndef HASFLOCK 105265830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 105365830Seric #endif 105465210Seric 105567430Seric #ifndef HASSETRLIMIT 105667430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 105767430Seric #endif 105867430Seric 105967430Seric #ifndef HASULIMIT 106067430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 106167430Seric #endif 106267430Seric 106366843Seric #ifndef OLD_NEWDB 106466843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 106566843Seric #endif 106665830Seric 106766843Seric 106864439Seric /********************************************************************** 106959023Seric ** Remaining definitions should never have to be changed. They are 107059023Seric ** primarily to provide back compatibility for older systems -- for 107159287Seric ** example, it includes some POSIX compatibility definitions 107264439Seric **********************************************************************/ 107359023Seric 107459388Seric /* System 5 compatibility */ 107559388Seric #ifndef S_ISREG 107664944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 107759388Seric #endif 107864944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 107964944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 108064944Seric #endif 108159388Seric #ifndef S_IWGRP 108259388Seric #define S_IWGRP 020 108359388Seric #endif 108459388Seric #ifndef S_IWOTH 108559388Seric #define S_IWOTH 002 108659388Seric #endif 108759388Seric 108859023Seric /* 108950537Seric ** Older systems don't have this error code -- it should be in 109050537Seric ** /usr/include/sysexits.h. 109150537Seric */ 109250537Seric 109350537Seric # ifndef EX_CONFIG 109450537Seric # define EX_CONFIG 78 /* configuration error */ 109550537Seric # endif 109656852Seric 109764718Seric /* pseudo-code used in server SMTP */ 109864718Seric # define EX_QUIT 22 /* drop out of server immediately */ 109964718Seric 110064718Seric 110163993Seric /* 110263993Seric ** These are used in a few cases where we need some special 110363993Seric ** error codes, but where the system doesn't provide something 110463993Seric ** reasonable. They are printed in errstring. 110563993Seric */ 110663993Seric 110763993Seric #ifndef E_PSEUDOBASE 110863993Seric # define E_PSEUDOBASE 256 110963993Seric #endif 111063993Seric 111163993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 111263993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 111363993Seric 111463970Seric /* type of arbitrary pointer */ 111563970Seric #ifndef ARBPTR_T 111663970Seric # define ARBPTR_T void * 111763970Seric #endif 111863970Seric 111960568Seric #ifndef __P 112060568Seric # include "cdefs.h" 112160568Seric #endif 112260568Seric 112367421Seric #if NAMED_BIND 112467421Seric # include <arpa/nameser.h> 112567434Seric # ifdef __svr4__ 112667434Seric # ifdef NOERROR 112767434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 112867434Seric # endif 112967434Seric # endif 113067421Seric #endif 113167421Seric 113256852Seric /* 113367419Seric ** The size of an IP address -- can't use sizeof because of problems 113467419Seric ** on Crays, where everything is 64 bits. This will break if/when 113567419Seric ** IP addresses are expanded to eight bytes. 113667419Seric */ 113767419Seric 113867421Seric #ifndef INADDRSZ 113967421Seric # define INADDRSZ 4 114067421Seric #endif 114167419Seric 114267419Seric /* 114367421Seric ** The size of various known types -- for reading network protocols. 114467421Seric ** Again, we can't use sizeof because of compiler randomness. 114567421Seric */ 114667421Seric 114767421Seric #ifndef INT16SZ 114867421Seric # define INT16SZ 2 114967421Seric #endif 115067421Seric #ifndef INT32SZ 115167421Seric # define INT32SZ 4 115267421Seric #endif 115367421Seric 115467421Seric /* 115558778Seric ** Do some required dependencies 115658778Seric */ 115758778Seric 115858778Seric #if defined(NETINET) || defined(NETISO) 115959107Seric # define SMTP 1 /* enable user and server SMTP */ 116059107Seric # define QUEUE 1 /* enable queueing */ 116159107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 116258778Seric #endif 116358778Seric 116458778Seric 116558778Seric /* 116656852Seric ** Arrange to use either varargs or stdargs 116756852Seric */ 116856852Seric 116956852Seric # ifdef __STDC__ 117056852Seric 117156852Seric # include <stdarg.h> 117256852Seric 117356852Seric # define VA_LOCAL_DECL va_list ap; 117456852Seric # define VA_START(f) va_start(ap, f) 117556852Seric # define VA_END va_end(ap) 117656852Seric 117756852Seric # else 117856852Seric 117956852Seric # include <varargs.h> 118056852Seric 118156852Seric # define VA_LOCAL_DECL va_list ap; 118256852Seric # define VA_START(f) va_start(ap) 118356852Seric # define VA_END va_end(ap) 118456852Seric 118556852Seric # endif 118657631Seric 118757943Seric #ifdef HASUNAME 118857631Seric # include <sys/utsname.h> 118957631Seric # ifdef newstr 119057631Seric # undef newstr 119157631Seric # endif 119257943Seric #else /* ! HASUNAME */ 119357631Seric # define NODE_LENGTH 32 119457631Seric struct utsname 119557631Seric { 119657631Seric char nodename[NODE_LENGTH+1]; 119757631Seric }; 119857943Seric #endif /* HASUNAME */ 119957642Seric 120067434Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) 120163838Seric # define MAXHOSTNAMELEN 256 120257735Seric #endif 120358153Seric 120458153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 120558153Seric # define SIGCHLD SIGCLD 120658153Seric #endif 120758153Seric 120858153Seric #ifndef STDIN_FILENO 120958153Seric #define STDIN_FILENO 0 121058153Seric #endif 121158153Seric 121258153Seric #ifndef STDOUT_FILENO 121358153Seric #define STDOUT_FILENO 1 121458153Seric #endif 121558153Seric 121658153Seric #ifndef STDERR_FILENO 121758153Seric #define STDERR_FILENO 2 121858153Seric #endif 121958689Seric 122064072Seric #ifndef LOCK_SH 122164035Seric # define LOCK_SH 0x01 /* shared lock */ 122264035Seric # define LOCK_EX 0x02 /* exclusive lock */ 122364035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 122464035Seric # define LOCK_UN 0x08 /* unlock */ 122564035Seric #endif 122658692Seric 122764035Seric #ifndef SIG_ERR 122864035Seric # define SIG_ERR ((void (*)()) -1) 122958689Seric #endif 123058702Seric 123164500Seric #ifndef WEXITSTATUS 123264500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 123364500Seric #endif 123464500Seric #ifndef WIFEXITED 123564500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 123664500Seric #endif 123764500Seric 123864561Seric #ifndef SIGFUNC_DEFINED 123964561Seric typedef void (*sigfunc_t) __P((int)); 124064561Seric #endif 124164561Seric 124265053Seric /* size of syslog buffer */ 124365053Seric #ifndef SYSLOG_BUFSIZE 124465053Seric # define SYSLOG_BUFSIZE 1024 124565053Seric #endif 124665053Seric 124758702Seric /* 124858702Seric ** Size of tobuf (deliver.c) 124958702Seric ** Tweak this to match your syslog implementation. It will have to 125058702Seric ** allow for the extra information printed. 125158702Seric */ 125258702Seric 125358702Seric #ifndef TOBUFSIZE 125465053Seric # if (SYSLOG_BUFSIZE) > 512 125565053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 125665053Seric # else 125765053Seric # define TOBUFSIZE 256 125865053Seric # endif 125958702Seric #endif 126060219Seric 126165015Seric /* 126265015Seric ** Size of prescan buffer. 126365015Seric ** Despite comments in the _sendmail_ book, this probably should 126465015Seric ** not be changed; there are some hard-to-define dependencies. 126565015Seric */ 126665015Seric 126765015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 126860219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 126960219Seric # ifndef FORK 127060219Seric # define FORK vfork /* function to call to fork mailer */ 127160219Seric # endif 127265955Seric 127365955Seric /* 127465955Seric ** If we are going to link scanf anyway, use it in readcf 127565955Seric */ 127665955Seric 127765955Seric #if !defined(HASUNAME) && !defined(SCANF) 127865955Seric # define SCANF 1 127965955Seric #endif 1280