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*65504Seric * @(#)conf.h 8.73 (Berkeley) 01/05/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 */ 5735651Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 5853735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 5963753Seric # define XDEBUG 1 /* enable extended debugging */ 6036483Sbostic 6156337Seric # ifdef NEWDB 6256337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6356337Seric # endif 6456337Seric 6564032Seric /* 6664944Seric ** Most systems have symbolic links today, so default them on. You 6764944Seric ** can turn them off by #undef'ing this below. 6864944Seric */ 6964944Seric 7064944Seric # define HASLSTAT 1 /* has lstat(2) call */ 7164944Seric 7264962Seric /* 7364962Seric ** General "standard C" defines. 7464962Seric ** 7564962Seric ** These may be undone later, to cope with systems that claim to 7664962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 7764962Seric ** doesn't realize that the library is part of the language. 7864962Seric ** 7964962Seric ** Life would be much easier if we could get rid of this sort 8064962Seric ** of bozo problems. 8164962Seric */ 8264962Seric 8364962Seric #ifdef __STDC__ 8464962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 8564962Seric #endif 8664962Seric 8763902Seric /********************************************************************** 8859023Seric ** Operating system configuration. 8959023Seric ** 9059023Seric ** Unless you are porting to a new OS, you shouldn't have to 9159023Seric ** change these. 9263902Seric **********************************************************************/ 9356823Seric 9463787Seric /* 9563787Seric ** Per-Operating System defines 9663787Seric */ 9763787Seric 9864314Seric 9963902Seric /* 10063902Seric ** HP-UX -- tested for 8.07 10163902Seric */ 10263902Seric 10359348Seric # ifdef __hpux 10464727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 10564727Seric # undef m_flags 10663787Seric # define SYSTEM5 1 /* include all the System V defines */ 10764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 10864314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 10964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 11063902Seric # define setreuid(r, e) setresuid(r, e, -1) 11163962Seric # define LA_TYPE LA_FLOAT 11265354Seric # define GIDSET_T gid_t 11363962Seric # define _PATH_UNIX "/hp-ux" 11465354Seric # ifndef _PATH_SENDMAILCF 11565354Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 11665354Seric # endif 11765167Seric # ifndef IDENTPROTO 11865167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 11956823Seric # endif 120*65504Seric # define syslog hard_syslog 12165167Seric # endif 12256823Seric 12364314Seric 12463902Seric /* 12563902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 12663902Seric */ 12763902Seric 12860224Seric # ifdef _AIX3 12964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 13064840Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 13164840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 13265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 13360219Seric # define FORK fork /* no vfork primitive available */ 13464494Seric # undef SETPROCTITLE /* setproctitle confuses AIX */ 13560219Seric # endif 13660219Seric 13764314Seric 13863902Seric /* 13963902Seric ** Silicon Graphics IRIX 14063902Seric ** 14163965Seric ** Compiles on 4.0.1. 14263902Seric */ 14363902Seric 14463753Seric # ifdef IRIX 14564727Seric # include <sys/sysmacros.h> 14664035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 14764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 14864314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 14965211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 15063753Seric # define FORK fork /* no vfork primitive available */ 15164562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 15264155Seric # define setpgid BSDsetpgrp 15363937Seric # define GIDSET_T gid_t 15463753Seric # endif 15563753Seric 15663902Seric 15763902Seric /* 15864813Seric ** SunOS and Solaris 15964813Seric ** 16064813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 16164813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 16263902Seric */ 16363902Seric 16463787Seric #if defined(sun) && !defined(BSD) 16559074Seric 16663962Seric # define LA_TYPE LA_INT 16764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 16864813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 16965211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 17060564Seric 17164842Seric # ifdef SOLARIS_2_3 17264842Seric # define SOLARIS 17364842Seric # endif 17464842Seric 17560602Seric # ifdef SOLARIS 17663902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 17765222Seric # ifndef __svr4__ 17865222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 17965222Seric # endif 18063787Seric # include <sys/time.h> 18164832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 18264832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 18365172Seric # define GIDSET_T gid_t 18465189Seric # ifndef _PATH_UNIX 18565189Seric # define _PATH_UNIX "/kernel/unix" 18665189Seric # endif 18763962Seric # ifndef _PATH_SENDMAILCF 18863962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 18964072Seric # endif 19064072Seric # ifndef _PATH_SENDMAILPID 19163962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 19263962Seric # endif 19363787Seric 19460602Seric # else 19565105Seric /* SunOS 4.0.3 or 4.1.x */ 19665189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 19760602Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 19864831Seric # define HASFLOCK 1 /* has flock(2) call */ 19960564Seric # include <vfork.h> 20063787Seric 20165105Seric # ifdef SUNOS403 20265105Seric /* special tweaking for SunOS 4.0.3 */ 20365105Seric # include <malloc.h> 20465105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 20565105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 20665105Seric # undef WIFEXITED 20765105Seric # undef WEXITSTATUS 20865105Seric # undef HASUNAME 20965105Seric # define setpgid setpgrp 21065105Seric typedef int pid_t; 21165105Seric extern char *getenv(); 21265105Seric 21365105Seric # endif 21460564Seric # endif 21559023Seric #endif 21659023Seric 21764718Seric /* 21864813Seric ** DG/UX 21964813Seric ** 22064813Seric ** Tested on 5.4.2 22164718Seric */ 22264314Seric 22364718Seric #ifdef DGUX 22464718Seric # define SYSTEM5 1 22564718Seric # define LA_TYPE LA_SUBR 22664718Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 22764718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 22864718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 22964718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 23064718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 23165167Seric # ifndef IDENTPROTO 23265167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 23365167Seric # endif 23464718Seric # undef SETPROCTITLE 23564813Seric 23664813Seric /* these include files must be included early on DG/UX */ 23764813Seric # include <netinet/in.h> 23864813Seric # include <arpa/inet.h> 23964813Seric 24064718Seric # define inet_addr dgux_inet_addr 24164718Seric extern long dgux_inet_addr(); 24264718Seric #endif 24364718Seric 24464718Seric 24563902Seric /* 24663902Seric ** Digital Ultrix 4.2A or 4.3 24764264Seric ** 24864264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 24964264Seric ** not dropped when the process exits. This causes major problems, 25064264Seric ** so flock is the only alternative. 25163902Seric */ 25263902Seric 25360564Seric #ifdef ultrix 25460564Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 25564035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 25663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 25764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 25864264Seric # define HASFLOCK 1 /* has flock(2) call */ 25965211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 26065135Seric # ifdef vax 26165135Seric # define LA_TYPE LA_FLOAT 26265135Seric # else 26365135Seric # define LA_TYPE LA_INT 26465135Seric # define LA_AVENRUN "avenrun" 26565135Seric # endif 26665167Seric # ifndef IDENTPROTO 26765167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 26865167Seric # endif 26960564Seric #endif 27060564Seric 27164314Seric 27263902Seric /* 27363902Seric ** OSF/1 (tested on Alpha) 27463902Seric */ 27563902Seric 27663787Seric #ifdef __osf__ 27764314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 27863962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 27964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 28064035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 28164831Seric # define HASFLOCK 1 /* has flock(2) call */ 28263962Seric # define LA_TYPE LA_INT 28364813Seric # ifndef _PATH_SENDMAILPID 284*65504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 28564813Seric # endif 28659287Seric #endif 28759287Seric 28864314Seric 28963902Seric /* 29063902Seric ** NeXTstep 29163902Seric */ 29263902Seric 29364076Seric #ifdef NeXT 29464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 29564035Seric # define HASFLOCK 1 /* has flock(2) call */ 29664125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 29764314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 29864563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 29963753Seric # define sleep sleepX 30064155Seric # define setpgid setpgrp 30164295Seric # ifndef LA_TYPE 30264295Seric # define LA_TYPE LA_MACH 30364295Seric # endif 30464500Seric # ifndef _POSIX_SOURCE 30564035Seric typedef int pid_t; 30664500Seric # undef WEXITSTATUS 30764500Seric # undef WIFEXITED 30864500Seric # endif 30964072Seric # ifndef _PATH_SENDMAILCF 31064072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 31164072Seric # endif 31264072Seric # ifndef _PATH_SENDMAILPID 31364072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 31464072Seric # endif 31559288Seric #endif 31659288Seric 31764314Seric 31863902Seric /* 31963962Seric ** 4.4 BSD 32064831Seric ** 32164831Seric ** See also BSD defines. 32263902Seric */ 32363902Seric 32460568Seric #ifdef BSD4_4 32564072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 32664314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 32760568Seric # include <sys/cdefs.h> 32863838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 32964072Seric # ifndef LA_TYPE 33064072Seric # define LA_TYPE LA_SUBR 33164072Seric # endif 33260568Seric #endif 33360568Seric 33464314Seric 33563902Seric /* 33665049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 33764733Seric ** 33864733Seric ** 4.3BSD clone, closer to 4.4BSD 33964831Seric ** 34064831Seric ** See also BSD defines. 34164733Seric */ 34264733Seric 34365049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 34464733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 34564733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 34664733Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 34764733Seric # include <sys/cdefs.h> 34864733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 34964733Seric # ifndef LA_TYPE 35064733Seric # define LA_TYPE LA_SUBR 35164733Seric # endif 35264733Seric #endif 35364733Seric 35464733Seric 35564733Seric /* 35664813Seric ** Mach386 35764813Seric ** 35864813Seric ** For mt Xinu's Mach386 system. 35964813Seric */ 36064813Seric 36164813Seric #if defined(MACH) && defined(i386) 36264813Seric # define MACH386 1 36364813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 36464813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 36564813Seric # define HASFLOCK 1 /* has flock(2) call */ 36664813Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 36764813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 36864813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 36964813Seric # define setpgid setpgrp 37064813Seric # ifndef LA_TYPE 37164813Seric # define LA_TYPE LA_FLOAT 37264813Seric # endif 37364962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 37464813Seric # undef WEXITSTATUS 37564813Seric # undef WIFEXITED 37664813Seric # ifndef _PATH_SENDMAILCF 37764813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 37864813Seric # endif 37964813Seric # ifndef _PATH_SENDMAILPID 38064813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 38164813Seric # endif 38264813Seric #endif 38364813Seric 38464813Seric 38564813Seric /* 38663969Seric ** 4.3 BSD -- this is for very old systems 38763969Seric ** 38863969Seric ** You'll also have to install a new resolver library. 38963969Seric ** I don't guarantee that support for this environment is complete. 39063969Seric */ 39163969Seric 39263969Seric #ifdef oldBSD43 39363969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 39463969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 39563970Seric # define ARBPTR_T char * 39664155Seric # define setpgid setpgrp 39763969Seric # ifndef LA_TYPE 39863969Seric # define LA_TYPE LA_FLOAT 39963969Seric # endif 40063969Seric # ifndef _PATH_SENDMAILCF 40163969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 40263969Seric # endif 40365167Seric # ifndef IDENTPROTO 40465167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 40565167Seric # endif 40664834Seric # undef WEXITSTATUS 40764834Seric # undef WIFEXITED 40864834Seric typedef short pid_t; 40964834Seric extern int errno; 41063969Seric #endif 41163969Seric 41264314Seric 41363969Seric /* 41463902Seric ** SCO Unix 41565087Seric ** 41665087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 41765087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 41865087Seric ** The second is, I believe, for an older version. 41963902Seric */ 42063902Seric 42165087Seric #ifdef _SCO_unix_4_2 42265087Seric # define _SCO_unix_ 42365087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 42465087Seric # define _PATH_UNIX "/unix" 42565087Seric # ifndef _PATH_SENDMAILCF 42665087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 42765087Seric # endif 42865087Seric # ifndef _PATH_SENDMAILPID 42965087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 43065087Seric # endif 43165087Seric #endif 43265087Seric 43363838Seric #ifdef _SCO_unix_ 43463838Seric # define SYSTEM5 1 /* include all the System V defines */ 43564035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 43663987Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 43765212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 43863838Seric # define FORK fork 43963838Seric # define MAXPATHLEN PATHSIZE 44064718Seric # define LA_TYPE LA_SHORT 44164813Seric # undef NETUNIX /* no unix domain socket support */ 44263838Seric #endif 44363838Seric 44464314Seric 44563962Seric /* 44663962Seric ** ConvexOS 11.0 and later 44763962Seric */ 44863962Seric 44963962Seric #ifdef _CONVEX_SOURCE 45063977Seric # define BSD 1 /* include all the BSD defines */ 45163977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 45263962Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 45363962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 45463977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 45563962Seric # define LA_TYPE LA_FLOAT 45665167Seric # ifndef IDENTPROTO 45765167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 45865167Seric # endif 45963962Seric #endif 46063962Seric 46164314Seric 46263962Seric /* 46364999Seric ** RISC/os 4.52 46463962Seric ** 46564999Seric ** Gives a ton of warning messages, but otherwise compiles. 46663962Seric */ 46763962Seric 46863965Seric #ifdef RISCOS 46964999Seric 47063962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 47164831Seric # define HASFLOCK 1 /* has flock(2) call */ 47264999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 47364999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 47463962Seric # define LA_TYPE LA_INT 47563962Seric # define LA_AVENRUN "avenrun" 47663962Seric # define _PATH_UNIX "/unix" 47764999Seric # undef WIFEXITED 47864999Seric 47964999Seric # define setpgid setpgrp 48064999Seric 48164999Seric extern int errno; 48264999Seric typedef int pid_t; 48364999Seric #define SIGFUNC_DEFINED 48464999Seric typedef int (*sigfunc_t)(); 48564999Seric extern char *getenv(); 48664999Seric extern void *malloc(); 48764999Seric 48863962Seric #endif 48963962Seric 49064314Seric 49164155Seric /* 49264155Seric ** Linux 0.99pl10 and above... 49364155Seric ** From Karl London <karl@borg.demon.co.uk>. 49464155Seric */ 49564155Seric 49664770Seric #ifdef __linux__ 49764155Seric # define BSD 1 /* pretend to be BSD based today */ 49864155Seric # undef NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 49964155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 50064380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 50164155Seric # ifndef LA_TYPE 50264155Seric # define LA_TYPE LA_FLOAT 50364155Seric # endif 50464763Seric # include <sys/sysmacros.h> 50565046Seric # define GIDSET_T gid_t 50664155Seric #endif 50764155Seric 50864155Seric 50964345Seric /* 51064345Seric ** DELL SVR4 Issue 2.2, and others 51164345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 51264345Seric ** 51364345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 51464345Seric ** defined, and the definitions conflict. 51564924Seric ** 51664924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 51764924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 51864924Seric ** (SVR4.0/386 version 3.0). 51964345Seric */ 52064345Seric 52164345Seric #ifdef DELL_SVR4 52265189Seric /* no changes necessary */ 52365189Seric /* see general __svr4__ defines below */ 52464345Seric #endif 52564345Seric 52664345Seric 52764380Seric /* 52864380Seric ** Apple A/UX 3.0 52964380Seric */ 53064345Seric 53164380Seric #ifdef _AUX_SOURCE 53264729Seric # include <sys/sysmacros.h> 53364380Seric # define BSD /* has BSD routines */ 53464380Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 53564380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 53664380Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 53764380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 53864561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 53965167Seric # ifndef IDENTPROTO 54065167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 54165167Seric # endif 54264380Seric # define FORK fork 54364380Seric # ifndef _PATH_SENDMAILCF 54464380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 54564380Seric # endif 54664380Seric # ifndef LA_TYPE 54764380Seric # define LA_TYPE LA_ZERO 54864380Seric # endif 54964560Seric # undef WIFEXITED 55064560Seric # undef WEXITSTATUS 55164380Seric #endif 55264380Seric 55364380Seric 55464705Seric /* 55564705Seric ** Encore UMAX V 55664705Seric ** 55764705Seric ** Not extensively tested. 55864705Seric */ 55964380Seric 56064705Seric #ifdef UMAXV 56164705Seric # include <limits.h> 56264705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 56364705Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 56464705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 56564705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 56665211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 56764705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 56864705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 56964705Seric # define FORK fork /* no vfork(2) primitive available */ 57064705Seric # define MAXPATHLEN PATH_MAX 57164705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 57264705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 57364705Seric # undef WIFEXITED 57464705Seric # undef WEXITSTATUS 57564705Seric #endif 57664705Seric 57764705Seric 57864939Seric /* 57964939Seric ** Stardent Titan 3000 running TitanOS 4.2. 58064939Seric ** 58164939Seric ** Must be compiled in "cc -43" mode. 58264939Seric ** 58364944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 58464939Seric ** 58564939Seric ** Note the tweaking below after the BSD defines are set. 58664939Seric */ 58764705Seric 58864939Seric #ifdef titan 58964939Seric # define setpgid setpgrp 59064939Seric typedef int pid_t; 59164939Seric # undef WIFEXITED 59264939Seric # undef WEXITSTATUS 59364939Seric #endif 59464939Seric 59564939Seric 59664962Seric /* 59764962Seric ** Sequent DYNIX 3.2.0 59864962Seric ** 59964962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 60064962Seric */ 60164939Seric 60264962Seric #ifdef sequent 60364962Seric # define BSD 1 60464962Seric # define HASUNSETENV 1 60564962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 60664962Seric # define WAITUNION 1 60764962Seric # define LA_TYPE LA_FLOAT 60864962Seric # ifdef _POSIX_VERSION 60964962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 61064962Seric # endif 61164962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 61264962Seric # define setpgid setpgrp 61364962Seric 61464962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 61564962Seric # undef WIFEXITED 61664962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 61764962Seric ((union wait*)&(s))->w_termsig == 0) 61864962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 61964962Seric typedef int pid_t; 62064962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 62164962Seric 62264962Seric # ifndef _PATH_UNIX 62364962Seric # define _PATH_UNIX "/dynix" 62464962Seric # endif 62564962Seric # ifndef _PATH_SENDMAILCF 62664962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 62764962Seric # endif 62864962Seric 62964962Seric #endif 63064962Seric 63164962Seric 63264962Seric 63364962Seric 63463902Seric /********************************************************************** 63563787Seric ** End of Per-Operating System defines 63663902Seric **********************************************************************/ 63763787Seric 63863949Seric /********************************************************************** 63963949Seric ** More general defines 64063949Seric **********************************************************************/ 64163949Seric 64263962Seric /* general BSD defines */ 64363962Seric #ifdef BSD 64464035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 64564035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 64664035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 64764035Seric # define HASFLOCK 1 /* has flock(2) call */ 64863962Seric #endif 64963962Seric 65065189Seric /* general System V Release 4 defines */ 65165189Seric #ifdef __svr4__ 65265189Seric # define SYSTEM5 1 65365189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 65465211Seric # ifndef HASGETUSERSHELL 65565211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 65665210Seric # endif 65765189Seric # define setreuid(r, e) seteuid(e) 65865189Seric 65965189Seric # ifndef _PATH_UNIX 66065189Seric # define _PATH_UNIX "/unix" 66165189Seric # endif 66265189Seric # ifndef _PATH_SENDMAILCF 66365189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 66465189Seric # endif 66565189Seric # ifndef _PATH_SENDMAILPID 66665189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 66765189Seric # endif 66865189Seric # ifndef SYSLOG_BUFSIZE 66965189Seric # define SYSLOG_BUFSIZE 128 67065189Seric # endif 67165189Seric #endif 67265189Seric 67363787Seric /* general System V defines */ 67463787Seric # ifdef SYSTEM5 67564813Seric # include <sys/sysmacros.h> 67663949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 67763949Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 67864705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 67964962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 68063962Seric # ifndef LA_TYPE 68163962Seric # define LA_TYPE LA_INT 68263962Seric # endif 68363949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 68463949Seric # define bzero(d, l) (memset((d), '\0', (l))) 68563949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 68663787Seric # endif 68763787Seric 68863949Seric /* general POSIX defines */ 68963949Seric #ifdef _POSIX_VERSION 69064718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 69164718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 69263949Seric #endif 69363949Seric 69463787Seric /* 69563937Seric ** If no type for argument two of getgroups call is defined, assume 69663937Seric ** it's an integer -- unfortunately, there seem to be several choices 69763937Seric ** here. 69863937Seric */ 69963937Seric 70063937Seric #ifndef GIDSET_T 70163937Seric # define GIDSET_T int 70263937Seric #endif 70363937Seric 70464939Seric /* 70564939Seric ** Tweaking for systems that (for example) claim to be BSD but 70664939Seric ** don't have all the standard BSD routines (boo hiss). 70764939Seric */ 70864439Seric 70964939Seric #ifdef titan 71064939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 71164939Seric #endif 71264939Seric 71365167Seric /* 71465167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 71565167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 71665167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 71765167Seric ** are closed. Some firewalls return this error if you try to connect 71865167Seric ** to the IDENT port (113), so you can't receive email from these hosts 71965167Seric ** on these systems. The firewall really should use a more specific 72065167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 72165167Seric ** not explicitly set to zero above, default it on. 72265167Seric */ 72364939Seric 72465167Seric #ifndef IDENTPROTO 72565167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 72665167Seric #endif 72765167Seric 72865211Seric #ifndef HASGETUSERSHELL 72965211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 73065210Seric #endif 73165167Seric 73265210Seric 73364439Seric /********************************************************************** 73459023Seric ** Remaining definitions should never have to be changed. They are 73559023Seric ** primarily to provide back compatibility for older systems -- for 73659287Seric ** example, it includes some POSIX compatibility definitions 73764439Seric **********************************************************************/ 73859023Seric 73959388Seric /* System 5 compatibility */ 74059388Seric #ifndef S_ISREG 74164944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 74259388Seric #endif 74364944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 74464944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 74564944Seric #endif 74659388Seric #ifndef S_IWGRP 74759388Seric #define S_IWGRP 020 74859388Seric #endif 74959388Seric #ifndef S_IWOTH 75059388Seric #define S_IWOTH 002 75159388Seric #endif 75259388Seric 75359023Seric /* 75450537Seric ** Older systems don't have this error code -- it should be in 75550537Seric ** /usr/include/sysexits.h. 75650537Seric */ 75750537Seric 75850537Seric # ifndef EX_CONFIG 75950537Seric # define EX_CONFIG 78 /* configuration error */ 76050537Seric # endif 76156852Seric 76264718Seric /* pseudo-code used in server SMTP */ 76364718Seric # define EX_QUIT 22 /* drop out of server immediately */ 76464718Seric 76564718Seric 76663993Seric /* 76763993Seric ** These are used in a few cases where we need some special 76863993Seric ** error codes, but where the system doesn't provide something 76963993Seric ** reasonable. They are printed in errstring. 77063993Seric */ 77163993Seric 77263993Seric #ifndef E_PSEUDOBASE 77363993Seric # define E_PSEUDOBASE 256 77463993Seric #endif 77563993Seric 77663993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 77763993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 77863993Seric 77963970Seric /* type of arbitrary pointer */ 78063970Seric #ifndef ARBPTR_T 78163970Seric # define ARBPTR_T void * 78263970Seric #endif 78363970Seric 78460568Seric #ifndef __P 78560568Seric # include "cdefs.h" 78660568Seric #endif 78760568Seric 78856852Seric /* 78958778Seric ** Do some required dependencies 79058778Seric */ 79158778Seric 79258778Seric #if defined(NETINET) || defined(NETISO) 79359107Seric # define SMTP 1 /* enable user and server SMTP */ 79459107Seric # define QUEUE 1 /* enable queueing */ 79559107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 79658778Seric #endif 79758778Seric 79858778Seric 79958778Seric /* 80056852Seric ** Arrange to use either varargs or stdargs 80156852Seric */ 80256852Seric 80356852Seric # ifdef __STDC__ 80456852Seric 80556852Seric # include <stdarg.h> 80656852Seric 80756852Seric # define VA_LOCAL_DECL va_list ap; 80856852Seric # define VA_START(f) va_start(ap, f) 80956852Seric # define VA_END va_end(ap) 81056852Seric 81156852Seric # else 81256852Seric 81356852Seric # include <varargs.h> 81456852Seric 81556852Seric # define VA_LOCAL_DECL va_list ap; 81656852Seric # define VA_START(f) va_start(ap) 81756852Seric # define VA_END va_end(ap) 81856852Seric 81956852Seric # endif 82057631Seric 82157943Seric #ifdef HASUNAME 82257631Seric # include <sys/utsname.h> 82357631Seric # ifdef newstr 82457631Seric # undef newstr 82557631Seric # endif 82657943Seric #else /* ! HASUNAME */ 82757631Seric # define NODE_LENGTH 32 82857631Seric struct utsname 82957631Seric { 83057631Seric char nodename[NODE_LENGTH+1]; 83157631Seric }; 83257943Seric #endif /* HASUNAME */ 83357642Seric 83463838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 83563838Seric # define MAXHOSTNAMELEN 256 83657735Seric #endif 83758153Seric 83858153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 83958153Seric # define SIGCHLD SIGCLD 84058153Seric #endif 84158153Seric 84258153Seric #ifndef STDIN_FILENO 84358153Seric #define STDIN_FILENO 0 84458153Seric #endif 84558153Seric 84658153Seric #ifndef STDOUT_FILENO 84758153Seric #define STDOUT_FILENO 1 84858153Seric #endif 84958153Seric 85058153Seric #ifndef STDERR_FILENO 85158153Seric #define STDERR_FILENO 2 85258153Seric #endif 85358689Seric 85464072Seric #ifndef LOCK_SH 85564035Seric # define LOCK_SH 0x01 /* shared lock */ 85664035Seric # define LOCK_EX 0x02 /* exclusive lock */ 85764035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 85864035Seric # define LOCK_UN 0x08 /* unlock */ 85964035Seric #endif 86058692Seric 86164035Seric #ifndef SIG_ERR 86264035Seric # define SIG_ERR ((void (*)()) -1) 86358689Seric #endif 86458702Seric 86564500Seric #ifndef WEXITSTATUS 86664500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 86764500Seric #endif 86864500Seric #ifndef WIFEXITED 86964500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 87064500Seric #endif 87164500Seric 87264561Seric #ifndef SIGFUNC_DEFINED 87364561Seric typedef void (*sigfunc_t) __P((int)); 87464561Seric #endif 87564561Seric 87665053Seric /* size of syslog buffer */ 87765053Seric #ifndef SYSLOG_BUFSIZE 87865053Seric # define SYSLOG_BUFSIZE 1024 87965053Seric #endif 88065053Seric 88158702Seric /* 88258702Seric ** Size of tobuf (deliver.c) 88358702Seric ** Tweak this to match your syslog implementation. It will have to 88458702Seric ** allow for the extra information printed. 88558702Seric */ 88658702Seric 88758702Seric #ifndef TOBUFSIZE 88865053Seric # if (SYSLOG_BUFSIZE) > 512 88965053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 89065053Seric # else 89165053Seric # define TOBUFSIZE 256 89265053Seric # endif 89358702Seric #endif 89460219Seric 89565015Seric /* 89665015Seric ** Size of prescan buffer. 89765015Seric ** Despite comments in the _sendmail_ book, this probably should 89865015Seric ** not be changed; there are some hard-to-define dependencies. 89965015Seric */ 90065015Seric 90165015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 90260219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 90360219Seric # ifndef FORK 90460219Seric # define FORK vfork /* function to call to fork mailer */ 90560219Seric # endif 906