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*67435Seric * @(#)conf.h 8.112 (Berkeley) 06/19/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 */ 4157143Seric 4257143Seric # ifndef QUEUESIZE 4357143Seric # define QUEUESIZE 1000 /* max # of jobs per queue run */ 4457143Seric # endif 4557143Seric 4663902Seric /********************************************************************** 479147Seric ** Compilation options. 4825673Seric ** 4925673Seric ** #define these if they are available; comment them out otherwise. 5063902Seric **********************************************************************/ 519147Seric 5225673Seric # define LOG 1 /* enable logging */ 5325673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 5464813Seric # define NETUNIX 1 /* include unix domain support */ 5558778Seric # define NETINET 1 /* include internet support */ 5625673Seric # define SETPROCTITLE 1 /* munge argv to display current status */ 5753735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 5863753Seric # define XDEBUG 1 /* enable extended debugging */ 5956337Seric # ifdef NEWDB 6056337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6156337Seric # endif 6256337Seric 6366334Seric /********************************************************************** 6466334Seric ** 0/1 Compilation options. 6566334Seric ** #define these to 1 if they are available; 6666334Seric ** #define them to 0 otherwise. 6766334Seric **********************************************************************/ 6866334Seric 6966334Seric # ifndef NAMED_BIND 7066334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 7166334Seric # endif 7266334Seric 7364032Seric /* 7464944Seric ** Most systems have symbolic links today, so default them on. You 7564944Seric ** can turn them off by #undef'ing this below. 7664944Seric */ 7764944Seric 7864944Seric # define HASLSTAT 1 /* has lstat(2) call */ 7964944Seric 8064962Seric /* 8164962Seric ** General "standard C" defines. 8264962Seric ** 8364962Seric ** These may be undone later, to cope with systems that claim to 8464962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 8564962Seric ** doesn't realize that the library is part of the language. 8664962Seric ** 8764962Seric ** Life would be much easier if we could get rid of this sort 8864962Seric ** of bozo problems. 8964962Seric */ 9064962Seric 9164962Seric #ifdef __STDC__ 9264962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 9364962Seric #endif 9464962Seric 9563902Seric /********************************************************************** 9659023Seric ** Operating system configuration. 9759023Seric ** 9859023Seric ** Unless you are porting to a new OS, you shouldn't have to 9959023Seric ** change these. 10063902Seric **********************************************************************/ 10156823Seric 10263787Seric /* 10363787Seric ** Per-Operating System defines 10463787Seric */ 10563787Seric 10664314Seric 10763902Seric /* 10865565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 10963902Seric */ 11063902Seric 11159348Seric # ifdef __hpux 11264727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 11364727Seric # undef m_flags 11463787Seric # define SYSTEM5 1 /* include all the System V defines */ 11564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 11664035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 11765982Seric # define setreuid(r, e) setresuid(r, e, -1) 11863962Seric # define LA_TYPE LA_FLOAT 11965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 12065354Seric # define GIDSET_T gid_t 12163962Seric # define _PATH_UNIX "/hp-ux" 12265354Seric # ifndef _PATH_SENDMAILCF 12365354Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 12465354Seric # endif 12565167Seric # ifndef IDENTPROTO 12665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 12756823Seric # endif 12865581Seric # ifndef HASGETUSERSHELL 12965581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 13065581Seric # endif 13165504Seric # define syslog hard_syslog 13265581Seric # ifdef __STDC__ 13365581Seric extern int syslog(int, char *, ...); 13465167Seric # endif 13565581Seric # endif 13656823Seric 13764314Seric 13863902Seric /* 13963902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 14063902Seric */ 14163902Seric 14260224Seric # ifdef _AIX3 14364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 14464840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 14565211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 14660219Seric # define FORK fork /* no vfork primitive available */ 14764494Seric # undef SETPROCTITLE /* setproctitle confuses AIX */ 14865749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 14960219Seric # endif 15060219Seric 15164314Seric 15263902Seric /* 15363902Seric ** Silicon Graphics IRIX 15463902Seric ** 15563965Seric ** Compiles on 4.0.1. 15663902Seric */ 15763902Seric 15863753Seric # ifdef IRIX 15966763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 16064035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 16164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 16265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 16363753Seric # define FORK fork /* no vfork primitive available */ 16464562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 16564155Seric # define setpgid BSDsetpgrp 16663937Seric # define GIDSET_T gid_t 16765749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 16866763Seric # define LA_TYPE LA_INT 169*67435Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 17063753Seric # endif 17163753Seric 17263902Seric 17363902Seric /* 17464813Seric ** SunOS and Solaris 17564813Seric ** 17664813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 17764813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 17863902Seric */ 17963902Seric 18063787Seric #if defined(sun) && !defined(BSD) 18159074Seric 18264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 18364813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 18465211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 18565749Seric # define LA_TYPE LA_INT 18660564Seric 18764842Seric # ifdef SOLARIS_2_3 18864842Seric # define SOLARIS 18964842Seric # endif 19064842Seric 19160602Seric # ifdef SOLARIS 19263902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 19365222Seric # ifndef __svr4__ 19465222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 19565222Seric # endif 19663787Seric # include <sys/time.h> 19764832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 19864832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 19965172Seric # define GIDSET_T gid_t 20065189Seric # ifndef _PATH_UNIX 20167129Seric # define _PATH_UNIX "/dev/ksyms" 20265189Seric # endif 20363962Seric # ifndef _PATH_SENDMAILCF 20463962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 20564072Seric # endif 20664072Seric # ifndef _PATH_SENDMAILPID 20763962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 20863962Seric # endif 20966022Seric # ifndef SYSLOG_BUFSIZE 21066022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 21166022Seric # endif 21263787Seric 21360602Seric # else 21465105Seric /* SunOS 4.0.3 or 4.1.x */ 21565189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21665830Seric # ifndef HASFLOCK 21765830Seric # define HASFLOCK 1 /* has flock(2) call */ 21865830Seric # endif 21965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 22060564Seric # include <vfork.h> 22163787Seric 22265105Seric # ifdef SUNOS403 22365105Seric /* special tweaking for SunOS 4.0.3 */ 22465105Seric # include <malloc.h> 22565105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 22665105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 22765105Seric # undef WIFEXITED 22865105Seric # undef WEXITSTATUS 22965105Seric # undef HASUNAME 23065105Seric # define setpgid setpgrp 23165105Seric typedef int pid_t; 23265105Seric extern char *getenv(); 23365105Seric 23466732Seric # else 23566732Seric /* 4.1.x specifics */ 23666732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 23766732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 23866732Seric 23965105Seric # endif 24060564Seric # endif 24159023Seric #endif 24259023Seric 24364718Seric /* 24464813Seric ** DG/UX 24564813Seric ** 24667427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 24767427Seric ** older support. 24867427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 24964718Seric */ 25064314Seric 25167427Seric #ifdef DGUX_5_4_2 25267427Seric # define DGUX 1 25367427Seric #endif 25467427Seric 25564718Seric #ifdef DGUX 25664718Seric # define SYSTEM5 1 25764718Seric # define LA_TYPE LA_SUBR 25864718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 25964718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 26064718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 26164718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 26266036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 26365167Seric # ifndef IDENTPROTO 26465167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 26565167Seric # endif 26664718Seric # undef SETPROCTITLE 26765749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 26864813Seric 26964813Seric /* these include files must be included early on DG/UX */ 27064813Seric # include <netinet/in.h> 27164813Seric # include <arpa/inet.h> 27264813Seric 27367427Seric # ifdef DGUX_5_4_2 27467427Seric # define inet_addr dgux_inet_addr 27564718Seric extern long dgux_inet_addr(); 27667427Seric # endif 27764718Seric #endif 27864718Seric 27964718Seric 28063902Seric /* 28163902Seric ** Digital Ultrix 4.2A or 4.3 28264264Seric ** 28364264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 28464264Seric ** not dropped when the process exits. This causes major problems, 28564264Seric ** so flock is the only alternative. 28663902Seric */ 28763902Seric 28860564Seric #ifdef ultrix 28964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 29063962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 29164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 29266242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 29365830Seric # ifndef HASFLOCK 29465830Seric # define HASFLOCK 1 /* has flock(2) call */ 29565830Seric # endif 29665211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 29766318Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 29865135Seric # ifdef vax 29965135Seric # define LA_TYPE LA_FLOAT 30065135Seric # else 30165135Seric # define LA_TYPE LA_INT 30265135Seric # define LA_AVENRUN "avenrun" 30365135Seric # endif 30465749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 30565167Seric # ifndef IDENTPROTO 30665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 30765167Seric # endif 30860564Seric #endif 30960564Seric 31064314Seric 31163902Seric /* 31263902Seric ** OSF/1 (tested on Alpha) 31363902Seric */ 31463902Seric 31563787Seric #ifdef __osf__ 31663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 31764035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 31864035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 31966226Seric # ifndef HASFLOCK 32065830Seric # define HASFLOCK 1 /* has flock(2) call */ 32165830Seric # endif 32263962Seric # define LA_TYPE LA_INT 32365749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 32464813Seric # ifndef _PATH_SENDMAILPID 32565504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 32664813Seric # endif 32759287Seric #endif 32859287Seric 32964314Seric 33063902Seric /* 33163902Seric ** NeXTstep 33263902Seric */ 33363902Seric 33464076Seric #ifdef NeXT 33564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 33665830Seric # ifndef HASFLOCK 33765830Seric # define HASFLOCK 1 /* has flock(2) call */ 33865830Seric # endif 33964125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 34064563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 34163753Seric # define sleep sleepX 34264155Seric # define setpgid setpgrp 34364295Seric # ifndef LA_TYPE 34464295Seric # define LA_TYPE LA_MACH 34564295Seric # endif 34665749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 34764500Seric # ifndef _POSIX_SOURCE 34864035Seric typedef int pid_t; 34964500Seric # undef WEXITSTATUS 35064500Seric # undef WIFEXITED 35164500Seric # endif 35264072Seric # ifndef _PATH_SENDMAILCF 35364072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 35464072Seric # endif 35564072Seric # ifndef _PATH_SENDMAILPID 35664072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 35764072Seric # endif 35859288Seric #endif 35959288Seric 36064314Seric 36163902Seric /* 36263962Seric ** 4.4 BSD 36364831Seric ** 36464831Seric ** See also BSD defines. 36563902Seric */ 36663902Seric 36760568Seric #ifdef BSD4_4 36864072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 36960568Seric # include <sys/cdefs.h> 37063838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 37164072Seric # ifndef LA_TYPE 37264072Seric # define LA_TYPE LA_SUBR 37364072Seric # endif 37465749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 37560568Seric #endif 37660568Seric 37764314Seric 37863902Seric /* 37965982Seric ** BSD/386 (all versions) 38065982Seric ** From Tony Sanders, BSDI 38165982Seric */ 38265982Seric 38365982Seric #ifdef __bsdi__ 38465982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 38565982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 38666843Seric # include <sys/cdefs.h> 38766843Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 38866030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 38966843Seric # ifndef LA_TYPE 39066843Seric # define LA_TYPE LA_SUBR 39166843Seric # endif 39265982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 39366843Seric /* version 1.1 or later */ 39465982Seric # define HASSETPROCTITLE 1 /* setproctitle is in libc */ 39566732Seric # undef SETPROCTITLE /* so don't redefine it in conf.c */ 39666843Seric # else 39766843Seric /* version 1.0 or earlier */ 39866843Seric # ifndef OLD_NEWDB 39966843Seric # define OLD_NEWDB 1 /* old version of newdb library */ 40066843Seric # endif 40165982Seric # endif 40265982Seric #endif 40365982Seric 40465982Seric 40565982Seric 40665982Seric /* 40765049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 40864733Seric ** 40964733Seric ** 4.3BSD clone, closer to 4.4BSD 41064831Seric ** 41164831Seric ** See also BSD defines. 41264733Seric */ 41364733Seric 41465049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 41564733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 41664733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 41766754Seric # ifdef __NetBSD__ 41866754Seric # define HASUNAME 1 /* has uname(2) syscall */ 41966754Seric # endif 42064733Seric # include <sys/cdefs.h> 42164733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 42264733Seric # ifndef LA_TYPE 42364733Seric # define LA_TYPE LA_SUBR 42464733Seric # endif 42565749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 42664733Seric #endif 42764733Seric 42864733Seric 42964733Seric /* 43064813Seric ** Mach386 43164813Seric ** 43264813Seric ** For mt Xinu's Mach386 system. 43364813Seric */ 43464813Seric 43564813Seric #if defined(MACH) && defined(i386) 43664813Seric # define MACH386 1 43764813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 43864813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 43966226Seric # ifndef HASFLOCK 44065830Seric # define HASFLOCK 1 /* has flock(2) call */ 44165830Seric # endif 44264813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 44364813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 44464813Seric # define setpgid setpgrp 44564813Seric # ifndef LA_TYPE 44664813Seric # define LA_TYPE LA_FLOAT 44764813Seric # endif 44865749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 44964962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 45064813Seric # undef WEXITSTATUS 45164813Seric # undef WIFEXITED 45264813Seric # ifndef _PATH_SENDMAILCF 45364813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 45464813Seric # endif 45564813Seric # ifndef _PATH_SENDMAILPID 45664813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 45764813Seric # endif 45864813Seric #endif 45964813Seric 46064813Seric 46164813Seric /* 46263969Seric ** 4.3 BSD -- this is for very old systems 46363969Seric ** 46465949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 46565949Seric ** 46663969Seric ** You'll also have to install a new resolver library. 46763969Seric ** I don't guarantee that support for this environment is complete. 46863969Seric */ 46963969Seric 47065949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 47163969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 47263969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 47363970Seric # define ARBPTR_T char * 47464155Seric # define setpgid setpgrp 47563969Seric # ifndef LA_TYPE 47663969Seric # define LA_TYPE LA_FLOAT 47763969Seric # endif 47863969Seric # ifndef _PATH_SENDMAILCF 47963969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 48063969Seric # endif 48165167Seric # ifndef IDENTPROTO 48265167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 48365167Seric # endif 48464834Seric # undef WEXITSTATUS 48564834Seric # undef WIFEXITED 48664834Seric typedef short pid_t; 48764834Seric extern int errno; 48863969Seric #endif 48963969Seric 49064314Seric 49163969Seric /* 49263902Seric ** SCO Unix 49365087Seric ** 49465087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 49565087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 49665087Seric ** The second is, I believe, for an older version. 49763902Seric */ 49863902Seric 49965087Seric #ifdef _SCO_unix_4_2 50065087Seric # define _SCO_unix_ 50165087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 50266757Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 50365087Seric # define _PATH_UNIX "/unix" 50465087Seric # ifndef _PATH_SENDMAILCF 50565087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 50665087Seric # endif 50765087Seric # ifndef _PATH_SENDMAILPID 50865087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 50965087Seric # endif 51065087Seric #endif 51165087Seric 51263838Seric #ifdef _SCO_unix_ 51363838Seric # define SYSTEM5 1 /* include all the System V defines */ 51464035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 51565212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 51663838Seric # define FORK fork 51763838Seric # define MAXPATHLEN PATHSIZE 51864718Seric # define LA_TYPE LA_SHORT 51965749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 52064813Seric # undef NETUNIX /* no unix domain socket support */ 52163838Seric #endif 52263838Seric 52364314Seric 52463962Seric /* 52563962Seric ** ConvexOS 11.0 and later 52665949Seric ** 52765949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 52865949Seric ** works on 9.1 as well. 52963962Seric */ 53063962Seric 53163962Seric #ifdef _CONVEX_SOURCE 53263977Seric # define BSD 1 /* include all the BSD defines */ 53363977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 53463962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 53563977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 53663962Seric # define LA_TYPE LA_FLOAT 53765749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 53865949Seric # ifndef _PATH_SENDMAILCF 53965949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 54065949Seric # endif 54165949Seric # ifndef S_IREAD 54265949Seric # define S_IREAD _S_IREAD 54365949Seric # define S_IWRITE _S_IWRITE 54465949Seric # define S_IEXEC _S_IEXEC 54565949Seric # define S_IFMT _S_IFMT 54665949Seric # define S_IFCHR _S_IFCHR 54765949Seric # define S_IFBLK _S_IFBLK 54865949Seric # endif 54965167Seric # ifndef IDENTPROTO 55065167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 55165167Seric # endif 55263962Seric #endif 55363962Seric 55464314Seric 55563962Seric /* 55664999Seric ** RISC/os 4.52 55763962Seric ** 55864999Seric ** Gives a ton of warning messages, but otherwise compiles. 55963962Seric */ 56063962Seric 56163965Seric #ifdef RISCOS 56264999Seric 56363962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 56466226Seric # ifndef HASFLOCK 56565830Seric # define HASFLOCK 1 /* has flock(2) call */ 56665830Seric # endif 56764999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 56864999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 56963962Seric # define LA_TYPE LA_INT 57063962Seric # define LA_AVENRUN "avenrun" 57163962Seric # define _PATH_UNIX "/unix" 57264999Seric # undef WIFEXITED 57364999Seric 57464999Seric # define setpgid setpgrp 57564999Seric 57664999Seric extern int errno; 57764999Seric typedef int pid_t; 57864999Seric #define SIGFUNC_DEFINED 57964999Seric typedef int (*sigfunc_t)(); 58064999Seric extern char *getenv(); 58164999Seric extern void *malloc(); 58264999Seric 58363962Seric #endif 58463962Seric 58564314Seric 58664155Seric /* 58764155Seric ** Linux 0.99pl10 and above... 58866300Seric ** 58966300Seric ** Thanks to, in reverse order of contact: 59066300Seric ** 59166300Seric ** John Kennedy <warlock@csuchico.edu> 59266300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 59366300Seric ** Karl London <karl@borg.demon.co.uk> 59466300Seric ** 59566300Seric ** Last compiled against: [03/02/94 @ 05:34 PM (Wednesday)] 59666300Seric ** sendmail 8.6.6.b9 named 4.9.2-931205-p1 db-1.73 59766300Seric ** gcc 2.5.8 libc.so.4.5.19 59866300Seric ** slackware 1.1.2 linux 0.99.15 59964155Seric */ 60064155Seric 60164770Seric #ifdef __linux__ 60266298Seric # define BSD 1 /* include BSD defines */ 60364155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 60466298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 60564380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 60666298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 60766300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 60864155Seric # ifndef LA_TYPE 60966301Seric # define LA_TYPE LA_PROCSTR 61064155Seric # endif 61166300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 61264763Seric # include <sys/sysmacros.h> 61366300Seric # undef atol /* wounded in <stdlib.h> */ 61464155Seric #endif 61564155Seric 61664155Seric 61764345Seric /* 61864345Seric ** DELL SVR4 Issue 2.2, and others 61964345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 62064345Seric ** 62164345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 62264345Seric ** defined, and the definitions conflict. 62364924Seric ** 62464924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 62564924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 62664924Seric ** (SVR4.0/386 version 3.0). 62764345Seric */ 62864345Seric 62964345Seric #ifdef DELL_SVR4 63065189Seric /* no changes necessary */ 63165189Seric /* see general __svr4__ defines below */ 63264345Seric #endif 63364345Seric 63464345Seric 63564380Seric /* 63664380Seric ** Apple A/UX 3.0 63764380Seric */ 63864345Seric 63964380Seric #ifdef _AUX_SOURCE 64064729Seric # include <sys/sysmacros.h> 64164380Seric # define BSD /* has BSD routines */ 64264380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 64364380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 64464561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 64565167Seric # ifndef IDENTPROTO 64665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 64765167Seric # endif 64864380Seric # define FORK fork 64964380Seric # ifndef _PATH_SENDMAILCF 65064380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 65164380Seric # endif 65264380Seric # ifndef LA_TYPE 65364380Seric # define LA_TYPE LA_ZERO 65464380Seric # endif 65565749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 65664560Seric # undef WIFEXITED 65764560Seric # undef WEXITSTATUS 65864380Seric #endif 65964380Seric 66064380Seric 66164705Seric /* 66264705Seric ** Encore UMAX V 66364705Seric ** 66464705Seric ** Not extensively tested. 66564705Seric */ 66664380Seric 66764705Seric #ifdef UMAXV 66864705Seric # include <limits.h> 66964705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 67064705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 67164705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 67265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 67364705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 67464705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 67564705Seric # define FORK fork /* no vfork(2) primitive available */ 67665749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 67764705Seric # define MAXPATHLEN PATH_MAX 67864705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 67964705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 68064705Seric # undef WIFEXITED 68164705Seric # undef WEXITSTATUS 68264705Seric #endif 68364705Seric 68464705Seric 68564939Seric /* 68664939Seric ** Stardent Titan 3000 running TitanOS 4.2. 68764939Seric ** 68864939Seric ** Must be compiled in "cc -43" mode. 68964939Seric ** 69064944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 69164939Seric ** 69264939Seric ** Note the tweaking below after the BSD defines are set. 69364939Seric */ 69464705Seric 69564939Seric #ifdef titan 69664939Seric # define setpgid setpgrp 69764939Seric typedef int pid_t; 69864939Seric # undef WIFEXITED 69964939Seric # undef WEXITSTATUS 70064939Seric #endif 70164939Seric 70264939Seric 70364962Seric /* 70464962Seric ** Sequent DYNIX 3.2.0 70564962Seric ** 70664962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 70764962Seric */ 70864939Seric 70964962Seric #ifdef sequent 71066038Seric 71164962Seric # define BSD 1 71264962Seric # define HASUNSETENV 1 71364962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 71464962Seric # define WAITUNION 1 71564962Seric # define LA_TYPE LA_FLOAT 71664962Seric # ifdef _POSIX_VERSION 71764962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 71864962Seric # endif 71964962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 72064962Seric # define setpgid setpgrp 72164962Seric 72264962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 72364962Seric # undef WIFEXITED 72464962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 72564962Seric ((union wait*)&(s))->w_termsig == 0) 72664962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 72764962Seric typedef int pid_t; 72864962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 72964962Seric 73066144Seric # ifndef IDENTPROTO 73166144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 73266144Seric # endif 73366144Seric 73464962Seric # ifndef _PATH_UNIX 73564962Seric # define _PATH_UNIX "/dynix" 73664962Seric # endif 73764962Seric # ifndef _PATH_SENDMAILCF 73864962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 73964962Seric # endif 74064962Seric 74164962Seric #endif 74264962Seric 74364962Seric 74465748Seric /* 74566038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 74666038Seric ** 74766038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 74866038Seric ** 74966038Seric ** From Tim Wright <timw@sequent.com>. 75066038Seric */ 75166038Seric 75266038Seric #ifdef _SEQUENT_ 75366038Seric # define SYSTEM5 1 /* include all the System V defines */ 75466038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 75566038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 75666038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 75766038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 75866038Seric # define GIDSET_T gid_t 75966038Seric # define LA_TYPE LA_INT 76066038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 76166038Seric # undef SETPROCTITLE 76266144Seric # ifndef IDENTPROTO 76366144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 76466144Seric # endif 76566038Seric # ifndef _PATH_SENDMAILCF 76666038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 76766038Seric # endif 76866038Seric # ifndef _PATH_SENDMAILPID 76966038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 77066038Seric # endif 77166038Seric #endif 77266038Seric 77366038Seric 77466038Seric /* 77565748Seric ** Cray Unicos 77665748Seric ** 77765748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 77865748Seric */ 77964962Seric 78065748Seric #ifdef UNICOS 78165748Seric # define SYSTEM5 1 /* include all the System V defines */ 78265748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 78365748Seric # define MAXPATHLEN PATHSIZE 78465748Seric # define LA_TYPE LA_ZERO 78565749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 78665748Seric #endif 78764962Seric 78865748Seric 78965820Seric /* 79065820Seric ** Apollo DomainOS 79165820Seric ** 79265820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 79365982Seric ** 79465820Seric ** 15 Jan 1994 79565820Seric ** 79665820Seric */ 79765748Seric 79865820Seric #ifdef apollo 79965820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 80065820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 80165820Seric # undef SETPROCTITLE 80265820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 80366044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 80465820Seric # ifndef _PATH_SENDMAILCF 80565820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 80665820Seric # endif 80765820Seric # ifndef _PATH_SENDMAILPID 80865820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 80965820Seric # endif 81065820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 81165820Seric # undef S_IFIFO 81265820Seric # define S_IFIFO 0010000 81365820Seric # ifndef IDENTPROTO 81465820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 81565820Seric # endif 81665982Seric #endif 81765820Seric 81865820Seric 81966748Seric /* 82066752Seric ** UnixWare 82166752Seric ** 82266752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 82366752Seric */ 82466752Seric 82566752Seric #ifdef UNIXWARE 82666752Seric # define SYSTEM5 1 82766752Seric # ifndef HASGETUSERSHELL 82866752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 82966752Seric # endif 83066752Seric # define GIDSET_T int 83166752Seric # define SLEEP_T int 83266752Seric # define SFS_TYPE SFS_STATVFS 83366752Seric # define LA_TYPE LA_ZERO 83466752Seric # undef WIFEXITED 83566752Seric # undef WEXITSTATUS 83666752Seric # define _PATH_UNIX "/unix" 83766752Seric # ifndef _PATH_SENDMAILCF 83866752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 83966752Seric # endif 84066752Seric # ifndef _PATH_SENDMAILPID 84166752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 84266752Seric # endif 84366752Seric # define SYSLOG_BUFSIZE 128 84466752Seric #endif 84566752Seric 84666752Seric 84766752Seric /* 84866748Seric ** Intergraph CLIX 3.1 84966748Seric ** 85066748Seric ** From Paul Southworth <pauls@locust.cic.net> 85166748Seric */ 85265820Seric 85366748Seric #ifdef CLIX 85466748Seric # define SYSTEM5 1 /* looks like System V */ 85566752Seric # ifndef HASGETUSERSHELL 85666752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 85766752Seric # endif 85866748Seric # define DEV_BSIZE 512 /* device block size not defined */ 85966748Seric # define GIDSET_T gid_t 86066748Seric # undef LOG /* syslog not available */ 86166748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 86266748Seric # define GETSHORT _getshort 86366748Seric #endif 86465820Seric 86566748Seric 86666776Seric /* 86766776Seric ** NCR 3000 Series (SysVr4) 86866776Seric ** 86967434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 87066776Seric */ 87166748Seric 87266776Seric #ifdef NCR3000 87366776Seric # define __svr4__ 87466776Seric # undef BSD 87566776Seric # define LA_AVENRUN "avenrun" 87666776Seric #endif 87766748Seric 87866776Seric 87967434Seric /* 88067434Seric ** Tandem NonStop-UX SVR4 88167434Seric ** 88267434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 88367434Seric */ 88466776Seric 88567434Seric #ifdef NonStop_UX_BXX 88667434Seric # define __svr4__ 88767434Seric #endif 88866776Seric 88967434Seric 89067434Seric 89163902Seric /********************************************************************** 89263787Seric ** End of Per-Operating System defines 89363902Seric **********************************************************************/ 89463787Seric 89563949Seric /********************************************************************** 89663949Seric ** More general defines 89763949Seric **********************************************************************/ 89863949Seric 89963962Seric /* general BSD defines */ 90063962Seric #ifdef BSD 90164035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 90264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 90364035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 90467430Seric # ifndef HASSETRLIMIT 90567430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 90667430Seric # endif 90765830Seric # ifndef HASFLOCK 90865830Seric # define HASFLOCK 1 /* has flock(2) call */ 90965830Seric # endif 91063962Seric #endif 91163962Seric 91265189Seric /* general System V Release 4 defines */ 91365189Seric #ifdef __svr4__ 91465189Seric # define SYSTEM5 1 91565189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 91665211Seric # ifndef HASGETUSERSHELL 91765211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 91865210Seric # endif 91965189Seric # define setreuid(r, e) seteuid(e) 92065189Seric 92165189Seric # ifndef _PATH_UNIX 92265189Seric # define _PATH_UNIX "/unix" 92365189Seric # endif 92465189Seric # ifndef _PATH_SENDMAILCF 92565189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 92665189Seric # endif 92765189Seric # ifndef _PATH_SENDMAILPID 92865189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 92965189Seric # endif 93065189Seric # ifndef SYSLOG_BUFSIZE 93165189Seric # define SYSLOG_BUFSIZE 128 93265189Seric # endif 93367159Seric # ifndef SFS_TYPE 93467159Seric # define SFS_TYPE SFS_STATVFS 93567159Seric # endif 93665189Seric #endif 93765189Seric 93863787Seric /* general System V defines */ 93966298Seric #ifdef SYSTEM5 94064813Seric # include <sys/sysmacros.h> 94163949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 94264705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 94364962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 94467430Seric # ifndef HASULIMIT 94567430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 94667430Seric # endif 94763962Seric # ifndef LA_TYPE 94865749Seric # define LA_TYPE LA_INT /* assume integer load average */ 94963962Seric # endif 95065749Seric # ifndef SFS_TYPE 95165749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 95265749Seric # endif 95363949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 95463949Seric # define bzero(d, l) (memset((d), '\0', (l))) 95563949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 95666298Seric #endif 95763787Seric 95863949Seric /* general POSIX defines */ 95963949Seric #ifdef _POSIX_VERSION 96064718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 96164718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 96263949Seric #endif 96363949Seric 96463787Seric /* 96563937Seric ** If no type for argument two of getgroups call is defined, assume 96663937Seric ** it's an integer -- unfortunately, there seem to be several choices 96763937Seric ** here. 96863937Seric */ 96963937Seric 97063937Seric #ifndef GIDSET_T 97163937Seric # define GIDSET_T int 97263937Seric #endif 97363937Seric 97464939Seric /* 97564939Seric ** Tweaking for systems that (for example) claim to be BSD but 97664939Seric ** don't have all the standard BSD routines (boo hiss). 97764939Seric */ 97864439Seric 97964939Seric #ifdef titan 98064939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 98164939Seric #endif 98264939Seric 98365830Seric 98465167Seric /* 98565167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 98665167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 98765167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 98865167Seric ** are closed. Some firewalls return this error if you try to connect 98965167Seric ** to the IDENT port (113), so you can't receive email from these hosts 99065167Seric ** on these systems. The firewall really should use a more specific 99165167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 99265167Seric ** not explicitly set to zero above, default it on. 99365167Seric */ 99464939Seric 99565167Seric #ifndef IDENTPROTO 99665167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 99765167Seric #endif 99865167Seric 99965211Seric #ifndef HASGETUSERSHELL 100065211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 100165210Seric #endif 100265167Seric 100365830Seric #ifndef HASFLOCK 100465830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 100565830Seric #endif 100665210Seric 100767430Seric #ifndef HASSETRLIMIT 100867430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 100967430Seric #endif 101067430Seric 101167430Seric #ifndef HASULIMIT 101267430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 101367430Seric #endif 101467430Seric 101566843Seric #ifndef OLD_NEWDB 101666843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 101766843Seric #endif 101865830Seric 101966843Seric 102064439Seric /********************************************************************** 102159023Seric ** Remaining definitions should never have to be changed. They are 102259023Seric ** primarily to provide back compatibility for older systems -- for 102359287Seric ** example, it includes some POSIX compatibility definitions 102464439Seric **********************************************************************/ 102559023Seric 102659388Seric /* System 5 compatibility */ 102759388Seric #ifndef S_ISREG 102864944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 102959388Seric #endif 103064944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 103164944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 103264944Seric #endif 103359388Seric #ifndef S_IWGRP 103459388Seric #define S_IWGRP 020 103559388Seric #endif 103659388Seric #ifndef S_IWOTH 103759388Seric #define S_IWOTH 002 103859388Seric #endif 103959388Seric 104059023Seric /* 104150537Seric ** Older systems don't have this error code -- it should be in 104250537Seric ** /usr/include/sysexits.h. 104350537Seric */ 104450537Seric 104550537Seric # ifndef EX_CONFIG 104650537Seric # define EX_CONFIG 78 /* configuration error */ 104750537Seric # endif 104856852Seric 104964718Seric /* pseudo-code used in server SMTP */ 105064718Seric # define EX_QUIT 22 /* drop out of server immediately */ 105164718Seric 105264718Seric 105363993Seric /* 105463993Seric ** These are used in a few cases where we need some special 105563993Seric ** error codes, but where the system doesn't provide something 105663993Seric ** reasonable. They are printed in errstring. 105763993Seric */ 105863993Seric 105963993Seric #ifndef E_PSEUDOBASE 106063993Seric # define E_PSEUDOBASE 256 106163993Seric #endif 106263993Seric 106363993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 106463993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 106563993Seric 106663970Seric /* type of arbitrary pointer */ 106763970Seric #ifndef ARBPTR_T 106863970Seric # define ARBPTR_T void * 106963970Seric #endif 107063970Seric 107160568Seric #ifndef __P 107260568Seric # include "cdefs.h" 107360568Seric #endif 107460568Seric 107567421Seric #if NAMED_BIND 107667421Seric # include <arpa/nameser.h> 107767434Seric # ifdef __svr4__ 107867434Seric # ifdef NOERROR 107967434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 108067434Seric # endif 108167434Seric # endif 108267421Seric #endif 108367421Seric 108456852Seric /* 108567419Seric ** The size of an IP address -- can't use sizeof because of problems 108667419Seric ** on Crays, where everything is 64 bits. This will break if/when 108767419Seric ** IP addresses are expanded to eight bytes. 108867419Seric */ 108967419Seric 109067421Seric #ifndef INADDRSZ 109167421Seric # define INADDRSZ 4 109267421Seric #endif 109367419Seric 109467419Seric /* 109567421Seric ** The size of various known types -- for reading network protocols. 109667421Seric ** Again, we can't use sizeof because of compiler randomness. 109767421Seric */ 109867421Seric 109967421Seric #ifndef INT16SZ 110067421Seric # define INT16SZ 2 110167421Seric #endif 110267421Seric #ifndef INT32SZ 110367421Seric # define INT32SZ 4 110467421Seric #endif 110567421Seric 110667421Seric /* 110758778Seric ** Do some required dependencies 110858778Seric */ 110958778Seric 111058778Seric #if defined(NETINET) || defined(NETISO) 111159107Seric # define SMTP 1 /* enable user and server SMTP */ 111259107Seric # define QUEUE 1 /* enable queueing */ 111359107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 111458778Seric #endif 111558778Seric 111658778Seric 111758778Seric /* 111856852Seric ** Arrange to use either varargs or stdargs 111956852Seric */ 112056852Seric 112156852Seric # ifdef __STDC__ 112256852Seric 112356852Seric # include <stdarg.h> 112456852Seric 112556852Seric # define VA_LOCAL_DECL va_list ap; 112656852Seric # define VA_START(f) va_start(ap, f) 112756852Seric # define VA_END va_end(ap) 112856852Seric 112956852Seric # else 113056852Seric 113156852Seric # include <varargs.h> 113256852Seric 113356852Seric # define VA_LOCAL_DECL va_list ap; 113456852Seric # define VA_START(f) va_start(ap) 113556852Seric # define VA_END va_end(ap) 113656852Seric 113756852Seric # endif 113857631Seric 113957943Seric #ifdef HASUNAME 114057631Seric # include <sys/utsname.h> 114157631Seric # ifdef newstr 114257631Seric # undef newstr 114357631Seric # endif 114457943Seric #else /* ! HASUNAME */ 114557631Seric # define NODE_LENGTH 32 114657631Seric struct utsname 114757631Seric { 114857631Seric char nodename[NODE_LENGTH+1]; 114957631Seric }; 115057943Seric #endif /* HASUNAME */ 115157642Seric 115267434Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) 115363838Seric # define MAXHOSTNAMELEN 256 115457735Seric #endif 115558153Seric 115658153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 115758153Seric # define SIGCHLD SIGCLD 115858153Seric #endif 115958153Seric 116058153Seric #ifndef STDIN_FILENO 116158153Seric #define STDIN_FILENO 0 116258153Seric #endif 116358153Seric 116458153Seric #ifndef STDOUT_FILENO 116558153Seric #define STDOUT_FILENO 1 116658153Seric #endif 116758153Seric 116858153Seric #ifndef STDERR_FILENO 116958153Seric #define STDERR_FILENO 2 117058153Seric #endif 117158689Seric 117264072Seric #ifndef LOCK_SH 117364035Seric # define LOCK_SH 0x01 /* shared lock */ 117464035Seric # define LOCK_EX 0x02 /* exclusive lock */ 117564035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 117664035Seric # define LOCK_UN 0x08 /* unlock */ 117764035Seric #endif 117858692Seric 117964035Seric #ifndef SIG_ERR 118064035Seric # define SIG_ERR ((void (*)()) -1) 118158689Seric #endif 118258702Seric 118364500Seric #ifndef WEXITSTATUS 118464500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 118564500Seric #endif 118664500Seric #ifndef WIFEXITED 118764500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 118864500Seric #endif 118964500Seric 119064561Seric #ifndef SIGFUNC_DEFINED 119164561Seric typedef void (*sigfunc_t) __P((int)); 119264561Seric #endif 119364561Seric 119465053Seric /* size of syslog buffer */ 119565053Seric #ifndef SYSLOG_BUFSIZE 119665053Seric # define SYSLOG_BUFSIZE 1024 119765053Seric #endif 119865053Seric 119958702Seric /* 120058702Seric ** Size of tobuf (deliver.c) 120158702Seric ** Tweak this to match your syslog implementation. It will have to 120258702Seric ** allow for the extra information printed. 120358702Seric */ 120458702Seric 120558702Seric #ifndef TOBUFSIZE 120665053Seric # if (SYSLOG_BUFSIZE) > 512 120765053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 120865053Seric # else 120965053Seric # define TOBUFSIZE 256 121065053Seric # endif 121158702Seric #endif 121260219Seric 121365015Seric /* 121465015Seric ** Size of prescan buffer. 121565015Seric ** Despite comments in the _sendmail_ book, this probably should 121665015Seric ** not be changed; there are some hard-to-define dependencies. 121765015Seric */ 121865015Seric 121965015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 122060219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 122160219Seric # ifndef FORK 122260219Seric # define FORK vfork /* function to call to fork mailer */ 122360219Seric # endif 122465955Seric 122565955Seric /* 122665955Seric ** If we are going to link scanf anyway, use it in readcf 122765955Seric */ 122865955Seric 122965955Seric #if !defined(HASUNAME) && !defined(SCANF) 123065955Seric # define SCANF 1 123165955Seric #endif 1232