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*64929Seric * @(#)conf.h 8.52 (Berkeley) 11/20/93 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 */ 4159303Seric # define PSBUFSIZE (MAXLINE + MAXATOM) /* size of prescan buffer */ 4257143Seric 4357143Seric # ifndef QUEUESIZE 4457143Seric # define QUEUESIZE 1000 /* max # of jobs per queue run */ 4557143Seric # endif 4657143Seric 4763902Seric /********************************************************************** 489147Seric ** Compilation options. 4925673Seric ** 5025673Seric ** #define these if they are available; comment them out otherwise. 5163902Seric **********************************************************************/ 529147Seric 5325673Seric # define LOG 1 /* enable logging */ 5425673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 5564813Seric # define NETUNIX 1 /* include unix domain support */ 5658778Seric # define NETINET 1 /* include internet support */ 5725673Seric # define SETPROCTITLE 1 /* munge argv to display current status */ 5835651Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 5953735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 6063753Seric # define XDEBUG 1 /* enable extended debugging */ 6136483Sbostic 6256337Seric # ifdef NEWDB 6356337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6456337Seric # endif 6556337Seric 6664032Seric /* 6764032Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 6864032Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 6964032Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 7064032Seric ** are closed. Some firewalls return this error if you try to connect 7164032Seric ** to the IDENT port (113), so you can't receive email from these hosts 7264032Seric ** on these systems. The firewall really should use a more specific 7364032Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. This 7464032Seric ** will get #undefed below as needed. 7564032Seric */ 7664032Seric 77*64929Seric #ifndef IDENTPROTO 7864032Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 79*64929Seric #endif 8064032Seric 8163902Seric /********************************************************************** 8259023Seric ** Operating system configuration. 8359023Seric ** 8459023Seric ** Unless you are porting to a new OS, you shouldn't have to 8559023Seric ** change these. 8663902Seric **********************************************************************/ 8756823Seric 8863787Seric /* 8963787Seric ** Per-Operating System defines 9063787Seric */ 9163787Seric 9264314Seric 9363902Seric /* 9463902Seric ** HP-UX -- tested for 8.07 9563902Seric */ 9663902Seric 9759348Seric # ifdef __hpux 9864727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 9964727Seric # undef m_flags 10063787Seric # define SYSTEM5 1 /* include all the System V defines */ 10164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 10264314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 10364035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 10463902Seric # define setreuid(r, e) setresuid(r, e, -1) 10563962Seric # define LA_TYPE LA_FLOAT 10663962Seric # define _PATH_UNIX "/hp-ux" 10764358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 10856823Seric # endif 10956823Seric 11064314Seric 11163902Seric /* 11263902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 11363902Seric */ 11463902Seric 11560224Seric # ifdef _AIX3 11664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 11764840Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 11864840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 11960219Seric # define FORK fork /* no vfork primitive available */ 12064494Seric # undef SETPROCTITLE /* setproctitle confuses AIX */ 12160219Seric # endif 12260219Seric 12364314Seric 12463902Seric /* 12563902Seric ** Silicon Graphics IRIX 12663902Seric ** 12763965Seric ** Compiles on 4.0.1. 12863902Seric */ 12963902Seric 13063753Seric # ifdef IRIX 13164727Seric # include <sys/sysmacros.h> 13264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 13364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 13464314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 13563753Seric # define FORK fork /* no vfork primitive available */ 13664562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 13764155Seric # define setpgid BSDsetpgrp 13863937Seric # define GIDSET_T gid_t 13963753Seric # endif 14063753Seric 14163902Seric 14263902Seric /* 14364813Seric ** SunOS and Solaris 14464813Seric ** 14564813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 14664813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 14763902Seric */ 14863902Seric 14963787Seric #if defined(sun) && !defined(BSD) 15059074Seric 15163962Seric # define LA_TYPE LA_INT 15264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 15364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 15464813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 15560564Seric 15664842Seric # ifdef SOLARIS_2_3 15764842Seric # define SOLARIS 15864842Seric # endif 15964842Seric 16060602Seric # ifdef SOLARIS 16163902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 16263949Seric # define SYSTEM5 1 /* use System V definitions */ 16363977Seric # define setreuid(r, e) seteuid(e) 16463787Seric # include <sys/time.h> 16564832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 16664832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 16763962Seric # define _PATH_UNIX "/kernel/unix" 16863962Seric # ifndef _PATH_SENDMAILCF 16963962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 17064072Seric # endif 17164072Seric # ifndef _PATH_SENDMAILPID 17263962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 17363962Seric # endif 17463787Seric 17560602Seric # else 17663787Seric /* SunOS 4.1.x */ 17760602Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 17864831Seric # define HASFLOCK 1 /* has flock(2) call */ 17960564Seric # include <vfork.h> 18063787Seric 18160564Seric # endif 18259023Seric #endif 18359023Seric 18464718Seric /* 18564813Seric ** DG/UX 18664813Seric ** 18764813Seric ** Tested on 5.4.2 18864718Seric */ 18964314Seric 19064718Seric #ifdef DGUX 19164718Seric # define SYSTEM5 1 19264718Seric # define LA_TYPE LA_SUBR 19364718Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 19464718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 19564718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 19664718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 19764718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 19864718Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 19964718Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 20064718Seric # undef SETPROCTITLE 20164813Seric 20264813Seric /* these include files must be included early on DG/UX */ 20364813Seric # include <netinet/in.h> 20464813Seric # include <arpa/inet.h> 20564813Seric 20664718Seric # define inet_addr dgux_inet_addr 20764718Seric extern long dgux_inet_addr(); 20864718Seric #endif 20964718Seric 21064718Seric 21163902Seric /* 21263902Seric ** Digital Ultrix 4.2A or 4.3 21364264Seric ** 21464264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 21564264Seric ** not dropped when the process exits. This causes major problems, 21664264Seric ** so flock is the only alternative. 21763902Seric */ 21863902Seric 21960564Seric #ifdef ultrix 22060564Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 22164035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 22263962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 22364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 22464264Seric # define HASFLOCK 1 /* has flock(2) call */ 22563962Seric # define LA_TYPE LA_INT 22663962Seric # define LA_AVENRUN "avenrun" 22764358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 22860564Seric #endif 22960564Seric 23064314Seric 23163902Seric /* 23263902Seric ** OSF/1 (tested on Alpha) 23363902Seric */ 23463902Seric 23563787Seric #ifdef __osf__ 23664314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 23763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 23864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 23964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 24064831Seric # define HASFLOCK 1 /* has flock(2) call */ 24163962Seric # define LA_TYPE LA_INT 24264813Seric # ifndef _PATH_SENDMAILPID 24364813Seric # define _PATH_SENDMAILPID "/var/run/sendmial.pid" 24464813Seric # endif 24559287Seric #endif 24659287Seric 24764314Seric 24863902Seric /* 24963902Seric ** NeXTstep 25063902Seric */ 25163902Seric 25264076Seric #ifdef NeXT 25364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 25464035Seric # define HASFLOCK 1 /* has flock(2) call */ 25564125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 25664314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 25764563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 25863753Seric # define sleep sleepX 25964155Seric # define setpgid setpgrp 26064295Seric # ifndef LA_TYPE 26164295Seric # define LA_TYPE LA_MACH 26264295Seric # endif 26364500Seric # ifndef _POSIX_SOURCE 26464035Seric typedef int pid_t; 26564500Seric # undef WEXITSTATUS 26664500Seric # undef WIFEXITED 26764500Seric # endif 26864072Seric # ifndef _PATH_SENDMAILCF 26964072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 27064072Seric # endif 27164072Seric # ifndef _PATH_SENDMAILPID 27264072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 27364072Seric # endif 27459288Seric #endif 27559288Seric 27664314Seric 27763902Seric /* 27863962Seric ** 4.4 BSD 27964831Seric ** 28064831Seric ** See also BSD defines. 28163902Seric */ 28263902Seric 28360568Seric #ifdef BSD4_4 28464072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 28564314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 28660568Seric # include <sys/cdefs.h> 28763838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 28864072Seric # ifndef LA_TYPE 28964072Seric # define LA_TYPE LA_SUBR 29064072Seric # endif 29160568Seric #endif 29260568Seric 29364314Seric 29463902Seric /* 29564733Seric ** 386BSD / FreeBSD 1.0E (works) / NetBSD (not tested) 29664733Seric ** 29764733Seric ** 4.3BSD clone, closer to 4.4BSD 29864831Seric ** 29964831Seric ** See also BSD defines. 30064733Seric */ 30164733Seric 30264733Seric #ifdef __386BSD__ 30364733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 30464733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 30564733Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 30664733Seric # include <sys/cdefs.h> 30764733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 30864733Seric # ifndef LA_TYPE 30964733Seric # define LA_TYPE LA_SUBR 31064733Seric # endif 31164733Seric #endif 31264733Seric 31364733Seric 31464733Seric /* 31564813Seric ** Mach386 31664813Seric ** 31764813Seric ** For mt Xinu's Mach386 system. 31864813Seric */ 31964813Seric 32064813Seric #if defined(MACH) && defined(i386) 32164813Seric # define MACH386 1 32264813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 32364813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 32464813Seric # define HASFLOCK 1 /* has flock(2) call */ 32564813Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 32664813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 32764813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 32864813Seric # define setpgid setpgrp 32964813Seric # ifndef LA_TYPE 33064813Seric # define LA_TYPE LA_FLOAT 33164813Seric # endif 33264813Seric # undef WEXITSTATUS 33364813Seric # undef WIFEXITED 33464813Seric # ifndef _PATH_SENDMAILCF 33564813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 33664813Seric # endif 33764813Seric # ifndef _PATH_SENDMAILPID 33864813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 33964813Seric # endif 34064813Seric #endif 34164813Seric 34264813Seric 34364813Seric /* 34463969Seric ** 4.3 BSD -- this is for very old systems 34563969Seric ** 34663969Seric ** You'll also have to install a new resolver library. 34763969Seric ** I don't guarantee that support for this environment is complete. 34863969Seric */ 34963969Seric 35063969Seric #ifdef oldBSD43 35163969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 35263969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 35363970Seric # define ARBPTR_T char * 35464155Seric # define setpgid setpgrp 35563969Seric # ifndef LA_TYPE 35663969Seric # define LA_TYPE LA_FLOAT 35763969Seric # endif 35863969Seric # ifndef _PATH_SENDMAILCF 35963969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 36063969Seric # endif 36164358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 36264834Seric # undef WEXITSTATUS 36364834Seric # undef WIFEXITED 36464834Seric typedef short pid_t; 36564834Seric extern int errno; 36663969Seric #endif 36763969Seric 36864314Seric 36963969Seric /* 37063902Seric ** SCO Unix 37163902Seric */ 37263902Seric 37363838Seric #ifdef _SCO_unix_ 37463838Seric # define SYSTEM5 1 /* include all the System V defines */ 37564035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 37663987Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 37763838Seric # define FORK fork 37863838Seric # define MAXPATHLEN PATHSIZE 37964718Seric # define LA_TYPE LA_SHORT 38064813Seric # undef NETUNIX /* no unix domain socket support */ 38163838Seric #endif 38263838Seric 38364314Seric 38463962Seric /* 38563962Seric ** ConvexOS 11.0 and later 38663962Seric */ 38763962Seric 38863962Seric #ifdef _CONVEX_SOURCE 38963977Seric # define BSD 1 /* include all the BSD defines */ 39063977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 39163962Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 39263962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 39363977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 39463962Seric # define LA_TYPE LA_FLOAT 39564032Seric # undef IDENTPROTO 39663962Seric #endif 39763962Seric 39864314Seric 39963962Seric /* 40063962Seric ** RISC/os 4.51 40163962Seric ** 40263962Seric ** Untested... 40363962Seric */ 40463962Seric 40563965Seric #ifdef RISCOS 40663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 40764831Seric # define HASFLOCK 1 /* has flock(2) call */ 40863962Seric # define LA_TYPE LA_INT 40963962Seric # define LA_AVENRUN "avenrun" 41063962Seric # define _PATH_UNIX "/unix" 41163962Seric #endif 41263962Seric 41364314Seric 41464155Seric /* 41564155Seric ** Linux 0.99pl10 and above... 41664155Seric ** From Karl London <karl@borg.demon.co.uk>. 41764155Seric */ 41864155Seric 41964770Seric #ifdef __linux__ 42064155Seric # define BSD 1 /* pretend to be BSD based today */ 42164155Seric # undef NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 42264155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 42364380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 42464155Seric # ifndef LA_TYPE 42564155Seric # define LA_TYPE LA_FLOAT 42664155Seric # endif 42764763Seric # include <sys/sysmacros.h> 42864155Seric #endif 42964155Seric 43064155Seric 43164345Seric /* 43264345Seric ** DELL SVR4 Issue 2.2, and others 43364345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 43464345Seric ** 43564345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 43664345Seric ** defined, and the definitions conflict. 43764924Seric ** 43864924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 43964924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 44064924Seric ** (SVR4.0/386 version 3.0). 44164345Seric */ 44264345Seric 44364345Seric #ifdef DELL_SVR4 44464345Seric # define SYSTEM5 1 44564924Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 44664924Seric # define setreuid(r, e) seteuid(e) 44764345Seric /* # include <sys/time.h> */ 44864345Seric # define _PATH_UNIX "/unix" 44964345Seric # ifndef _PATH_SENDMAILCF 45064345Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 45164345Seric # endif 45264345Seric # ifndef _PATH_SENDMAILPID 45364345Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 45464345Seric # endif 45564345Seric #endif 45664345Seric 45764345Seric 45864380Seric /* 45964380Seric ** Apple A/UX 3.0 46064380Seric */ 46164345Seric 46264380Seric #ifdef _AUX_SOURCE 46364729Seric # include <sys/sysmacros.h> 46464380Seric # define BSD /* has BSD routines */ 46564380Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 46664380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 46764380Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 46864380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 46964561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 47064718Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 47164380Seric # define FORK fork 47264380Seric # ifndef _PATH_SENDMAILCF 47364380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 47464380Seric # endif 47564380Seric # ifndef LA_TYPE 47664380Seric # define LA_TYPE LA_ZERO 47764380Seric # endif 47864560Seric # undef WIFEXITED 47964560Seric # undef WEXITSTATUS 48064380Seric #endif 48164380Seric 48264380Seric 48364705Seric /* 48464705Seric ** Encore UMAX V 48564705Seric ** 48664705Seric ** Not extensively tested. 48764705Seric */ 48864380Seric 48964705Seric #ifdef UMAXV 49064705Seric # include <limits.h> 49164705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 49264705Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 49364705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 49464705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 49564705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 49664705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 49764705Seric # define FORK fork /* no vfork(2) primitive available */ 49864705Seric # define MAXPATHLEN PATH_MAX 49964705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 50064705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 50164705Seric # undef WIFEXITED 50264705Seric # undef WEXITSTATUS 50364705Seric #endif 50464705Seric 50564705Seric 50664705Seric 50763902Seric /********************************************************************** 50863787Seric ** End of Per-Operating System defines 50963902Seric **********************************************************************/ 51063787Seric 51163949Seric /********************************************************************** 51263949Seric ** More general defines 51363949Seric **********************************************************************/ 51463949Seric 51563962Seric /* general BSD defines */ 51663962Seric #ifdef BSD 51764035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 51864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 51964035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 52064035Seric # define HASFLOCK 1 /* has flock(2) call */ 52163962Seric #endif 52263962Seric 52363787Seric /* general System V defines */ 52463787Seric # ifdef SYSTEM5 52564813Seric # include <sys/sysmacros.h> 52663949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 52763949Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 52864705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 52963962Seric # ifndef LA_TYPE 53063962Seric # define LA_TYPE LA_INT 53163962Seric # endif 53263949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 53363949Seric # define bzero(d, l) (memset((d), '\0', (l))) 53463949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 53563787Seric # endif 53663787Seric 53763949Seric /* general "standard C" defines */ 53864813Seric #if (defined(__STDC__) && !defined(MACH386)) || defined(SYSTEM5) 53963949Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 54063949Seric #endif 54163949Seric 54263949Seric /* general POSIX defines */ 54363949Seric #ifdef _POSIX_VERSION 54464718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 54564718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 54663949Seric #endif 54763949Seric 54863787Seric /* 54963937Seric ** If no type for argument two of getgroups call is defined, assume 55063937Seric ** it's an integer -- unfortunately, there seem to be several choices 55163937Seric ** here. 55263937Seric */ 55363937Seric 55463937Seric #ifndef GIDSET_T 55563937Seric # define GIDSET_T int 55663937Seric #endif 55763937Seric 55864439Seric 55964439Seric /********************************************************************** 56059023Seric ** Remaining definitions should never have to be changed. They are 56159023Seric ** primarily to provide back compatibility for older systems -- for 56259287Seric ** example, it includes some POSIX compatibility definitions 56364439Seric **********************************************************************/ 56459023Seric 56559388Seric /* System 5 compatibility */ 56659388Seric #ifndef S_ISREG 56759388Seric #define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG) 56859388Seric #endif 56959388Seric #ifndef S_IWGRP 57059388Seric #define S_IWGRP 020 57159388Seric #endif 57259388Seric #ifndef S_IWOTH 57359388Seric #define S_IWOTH 002 57459388Seric #endif 57559388Seric 57659023Seric /* 57750537Seric ** Older systems don't have this error code -- it should be in 57850537Seric ** /usr/include/sysexits.h. 57950537Seric */ 58050537Seric 58150537Seric # ifndef EX_CONFIG 58250537Seric # define EX_CONFIG 78 /* configuration error */ 58350537Seric # endif 58456852Seric 58564718Seric /* pseudo-code used in server SMTP */ 58664718Seric # define EX_QUIT 22 /* drop out of server immediately */ 58764718Seric 58864718Seric 58963993Seric /* 59063993Seric ** These are used in a few cases where we need some special 59163993Seric ** error codes, but where the system doesn't provide something 59263993Seric ** reasonable. They are printed in errstring. 59363993Seric */ 59463993Seric 59563993Seric #ifndef E_PSEUDOBASE 59663993Seric # define E_PSEUDOBASE 256 59763993Seric #endif 59863993Seric 59963993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 60063993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 60163993Seric 60263970Seric /* type of arbitrary pointer */ 60363970Seric #ifndef ARBPTR_T 60463970Seric # define ARBPTR_T void * 60563970Seric #endif 60663970Seric 60760568Seric #ifndef __P 60860568Seric # include "cdefs.h" 60960568Seric #endif 61060568Seric 61156852Seric /* 61258778Seric ** Do some required dependencies 61358778Seric */ 61458778Seric 61558778Seric #if defined(NETINET) || defined(NETISO) 61659107Seric # define SMTP 1 /* enable user and server SMTP */ 61759107Seric # define QUEUE 1 /* enable queueing */ 61859107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 61958778Seric #endif 62058778Seric 62158778Seric 62258778Seric /* 62356852Seric ** Arrange to use either varargs or stdargs 62456852Seric */ 62556852Seric 62656852Seric # ifdef __STDC__ 62756852Seric 62856852Seric # include <stdarg.h> 62956852Seric 63056852Seric # define VA_LOCAL_DECL va_list ap; 63156852Seric # define VA_START(f) va_start(ap, f) 63256852Seric # define VA_END va_end(ap) 63356852Seric 63456852Seric # else 63556852Seric 63656852Seric # include <varargs.h> 63756852Seric 63856852Seric # define VA_LOCAL_DECL va_list ap; 63956852Seric # define VA_START(f) va_start(ap) 64056852Seric # define VA_END va_end(ap) 64156852Seric 64256852Seric # endif 64357631Seric 64457943Seric #ifdef HASUNAME 64557631Seric # include <sys/utsname.h> 64657631Seric # ifdef newstr 64757631Seric # undef newstr 64857631Seric # endif 64957943Seric #else /* ! HASUNAME */ 65057631Seric # define NODE_LENGTH 32 65157631Seric struct utsname 65257631Seric { 65357631Seric char nodename[NODE_LENGTH+1]; 65457631Seric }; 65557943Seric #endif /* HASUNAME */ 65657642Seric 65763838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 65863838Seric # define MAXHOSTNAMELEN 256 65957735Seric #endif 66058153Seric 66158153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 66258153Seric # define SIGCHLD SIGCLD 66358153Seric #endif 66458153Seric 66558153Seric #ifndef STDIN_FILENO 66658153Seric #define STDIN_FILENO 0 66758153Seric #endif 66858153Seric 66958153Seric #ifndef STDOUT_FILENO 67058153Seric #define STDOUT_FILENO 1 67158153Seric #endif 67258153Seric 67358153Seric #ifndef STDERR_FILENO 67458153Seric #define STDERR_FILENO 2 67558153Seric #endif 67658689Seric 67764072Seric #ifndef LOCK_SH 67864035Seric # define LOCK_SH 0x01 /* shared lock */ 67964035Seric # define LOCK_EX 0x02 /* exclusive lock */ 68064035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 68164035Seric # define LOCK_UN 0x08 /* unlock */ 68264035Seric #endif 68358692Seric 68464035Seric #ifndef SIG_ERR 68564035Seric # define SIG_ERR ((void (*)()) -1) 68658689Seric #endif 68758702Seric 68864500Seric #ifndef WEXITSTATUS 68964500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 69064500Seric #endif 69164500Seric #ifndef WIFEXITED 69264500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 69364500Seric #endif 69464500Seric 69564561Seric #ifndef SIGFUNC_DEFINED 69664561Seric typedef void (*sigfunc_t) __P((int)); 69764561Seric #endif 69864561Seric 69958702Seric /* 70058702Seric ** Size of tobuf (deliver.c) 70158702Seric ** Tweak this to match your syslog implementation. It will have to 70258702Seric ** allow for the extra information printed. 70358702Seric */ 70458702Seric 70558702Seric #ifndef TOBUFSIZE 70658702Seric # define TOBUFSIZE (1024 - 256) 70758702Seric #endif 70860219Seric 70960219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 71060219Seric # ifndef FORK 71160219Seric # define FORK vfork /* function to call to fork mailer */ 71260219Seric # endif 713*64929Seric 714*64929Seric #ifndef IDENTPROTO 715*64929Seric # define IDENTPROTO 0 /* don't use RFC 1413 */ 716*64929Seric #endif 717