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*64813Seric * @(#)conf.h 8.45 (Berkeley) 11/07/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 */ 55*64813Seric # 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 7764032Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 7864032Seric 7963902Seric /********************************************************************** 8059023Seric ** Operating system configuration. 8159023Seric ** 8259023Seric ** Unless you are porting to a new OS, you shouldn't have to 8359023Seric ** change these. 8463902Seric **********************************************************************/ 8556823Seric 8663787Seric /* 8763787Seric ** Per-Operating System defines 8863787Seric */ 8963787Seric 9064314Seric 9163902Seric /* 9263902Seric ** HP-UX -- tested for 8.07 9363902Seric */ 9463902Seric 9559348Seric # ifdef __hpux 9664727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 9764727Seric # undef m_flags 9863787Seric # define SYSTEM5 1 /* include all the System V defines */ 9964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 10064314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 10164035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 10263902Seric # define setreuid(r, e) setresuid(r, e, -1) 10363962Seric # define LA_TYPE LA_FLOAT 10463962Seric # define _PATH_UNIX "/hp-ux" 10564358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 10656823Seric # endif 10756823Seric 10864314Seric 10963902Seric /* 11063902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 11163902Seric */ 11263902Seric 11360224Seric # ifdef _AIX3 11464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 11560219Seric # define FORK fork /* no vfork primitive available */ 11664494Seric # undef SETPROCTITLE /* setproctitle confuses AIX */ 11760219Seric # endif 11860219Seric 11964314Seric 12063902Seric /* 12163902Seric ** Silicon Graphics IRIX 12263902Seric ** 12363965Seric ** Compiles on 4.0.1. 12463902Seric */ 12563902Seric 12663753Seric # ifdef IRIX 12764727Seric # include <sys/sysmacros.h> 12864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 12964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 13064314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 13163753Seric # define FORK fork /* no vfork primitive available */ 13264562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 13364155Seric # define setpgid BSDsetpgrp 13463937Seric # define GIDSET_T gid_t 13563753Seric # endif 13663753Seric 13763902Seric 13863902Seric /* 139*64813Seric ** SunOS and Solaris 140*64813Seric ** 141*64813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 142*64813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 14363902Seric */ 14463902Seric 14563787Seric #if defined(sun) && !defined(BSD) 14659074Seric 14763962Seric # define LA_TYPE LA_INT 14864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 14964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 150*64813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 15160564Seric 15260602Seric # ifdef SOLARIS 15363902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 15463949Seric # define SYSTEM5 1 /* use System V definitions */ 15563977Seric # define setreuid(r, e) seteuid(e) 15663787Seric # include <sys/time.h> 15764125Seric # define gethostbyname __switch_gethostbyname /* get working version */ 15864125Seric # define gethostbyaddr __switch_gethostbyaddr /* get working version */ 15963962Seric # define _PATH_UNIX "/kernel/unix" 16063962Seric # ifndef _PATH_SENDMAILCF 16163962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 16264072Seric # endif 16364072Seric # ifndef _PATH_SENDMAILPID 16463962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 16563962Seric # endif 16663787Seric 16760602Seric # else 16863787Seric /* SunOS 4.1.x */ 16960602Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 17064035Seric /* # define HASFLOCK 1 /* has flock(2) call */ 17160564Seric # include <vfork.h> 17263787Seric 17360564Seric # endif 17459023Seric #endif 17559023Seric 17664718Seric /* 177*64813Seric ** DG/UX 178*64813Seric ** 179*64813Seric ** Tested on 5.4.2 18064718Seric */ 18164314Seric 18264718Seric #ifdef DGUX 18364718Seric # define SYSTEM5 1 18464718Seric # define LA_TYPE LA_SUBR 18564718Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 18664718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 18764718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 18864718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 18964718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 19064718Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 19164718Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 19264718Seric # undef SETPROCTITLE 193*64813Seric 194*64813Seric /* these include files must be included early on DG/UX */ 195*64813Seric # include <netinet/in.h> 196*64813Seric # include <arpa/inet.h> 197*64813Seric 19864718Seric # define inet_addr dgux_inet_addr 19964718Seric extern long dgux_inet_addr(); 20064718Seric #endif 20164718Seric 20264718Seric 20363902Seric /* 20463902Seric ** Digital Ultrix 4.2A or 4.3 20564264Seric ** 20664264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 20764264Seric ** not dropped when the process exits. This causes major problems, 20864264Seric ** so flock is the only alternative. 20963902Seric */ 21063902Seric 21160564Seric #ifdef ultrix 21260564Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 21364035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21463962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 21564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 21664264Seric # define HASFLOCK 1 /* has flock(2) call */ 21763962Seric # define LA_TYPE LA_INT 21863962Seric # define LA_AVENRUN "avenrun" 21964358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 22060564Seric #endif 22160564Seric 22264314Seric 22363902Seric /* 22463902Seric ** OSF/1 (tested on Alpha) 22563902Seric */ 22663902Seric 22763787Seric #ifdef __osf__ 22864314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 22963962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 23064035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 23164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 23264035Seric /* # define HASFLOCK 1 /* has flock(2) call */ 23363962Seric # define LA_TYPE LA_INT 234*64813Seric # ifndef _PATH_SENDMAILPID 235*64813Seric # define _PATH_SENDMAILPID "/var/run/sendmial.pid" 236*64813Seric # endif 23759287Seric #endif 23859287Seric 23964314Seric 24063902Seric /* 24163902Seric ** NeXTstep 24263902Seric */ 24363902Seric 24464076Seric #ifdef NeXT 24564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 24664035Seric # define HASFLOCK 1 /* has flock(2) call */ 24764125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 24864314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 24964563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 25063753Seric # define sleep sleepX 25164155Seric # define setpgid setpgrp 25264295Seric # ifndef LA_TYPE 25364295Seric # define LA_TYPE LA_MACH 25464295Seric # endif 25564500Seric # ifndef _POSIX_SOURCE 25664035Seric typedef int pid_t; 25764500Seric # undef WEXITSTATUS 25864500Seric # undef WIFEXITED 25964500Seric # endif 26064072Seric # ifndef _PATH_SENDMAILCF 26164072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 26264072Seric # endif 26364072Seric # ifndef _PATH_SENDMAILPID 26464072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 26564072Seric # endif 26659288Seric #endif 26759288Seric 26864314Seric 26963902Seric /* 27063962Seric ** 4.4 BSD 27163902Seric */ 27263902Seric 27360568Seric #ifdef BSD4_4 27464072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 27564314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 27660568Seric # include <sys/cdefs.h> 27763838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 27864072Seric # ifndef LA_TYPE 27964072Seric # define LA_TYPE LA_SUBR 28064072Seric # endif 28160568Seric #endif 28260568Seric 28364314Seric 28463902Seric /* 28564733Seric ** 386BSD / FreeBSD 1.0E (works) / NetBSD (not tested) 28664733Seric ** 28764733Seric ** 4.3BSD clone, closer to 4.4BSD 28864733Seric */ 28964733Seric 29064733Seric #ifdef __386BSD__ 29164733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 29264733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 29364733Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 29464733Seric # include <sys/cdefs.h> 29564733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 29664733Seric # ifndef LA_TYPE 29764733Seric # define LA_TYPE LA_SUBR 29864733Seric # endif 29964733Seric #endif 30064733Seric 30164733Seric 30264733Seric /* 303*64813Seric ** Mach386 304*64813Seric ** 305*64813Seric ** For mt Xinu's Mach386 system. 306*64813Seric */ 307*64813Seric 308*64813Seric #if defined(MACH) && defined(i386) 309*64813Seric # define MACH386 1 310*64813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 311*64813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 312*64813Seric # define HASFLOCK 1 /* has flock(2) call */ 313*64813Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 314*64813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 315*64813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 316*64813Seric # define setpgid setpgrp 317*64813Seric # ifndef LA_TYPE 318*64813Seric # define LA_TYPE LA_FLOAT 319*64813Seric # endif 320*64813Seric # undef WEXITSTATUS 321*64813Seric # undef WIFEXITED 322*64813Seric # ifndef _PATH_SENDMAILCF 323*64813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 324*64813Seric # endif 325*64813Seric # ifndef _PATH_SENDMAILPID 326*64813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 327*64813Seric # endif 328*64813Seric #endif 329*64813Seric 330*64813Seric 331*64813Seric /* 33263969Seric ** 4.3 BSD -- this is for very old systems 33363969Seric ** 33463969Seric ** You'll also have to install a new resolver library. 33563969Seric ** I don't guarantee that support for this environment is complete. 33663969Seric */ 33763969Seric 33863969Seric #ifdef oldBSD43 33963969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 34063969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 34163970Seric # define ARBPTR_T char * 34264155Seric # define setpgid setpgrp 34363969Seric # ifndef LA_TYPE 34463969Seric # define LA_TYPE LA_FLOAT 34563969Seric # endif 34663969Seric # ifndef _PATH_SENDMAILCF 34763969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 34863969Seric # endif 34964358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 35063969Seric #endif 35163969Seric 35264314Seric 35363969Seric /* 35463902Seric ** SCO Unix 35563902Seric */ 35663902Seric 35763838Seric #ifdef _SCO_unix_ 35863838Seric # define SYSTEM5 1 /* include all the System V defines */ 35964035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 36063987Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 36163838Seric # define FORK fork 36263838Seric # define MAXPATHLEN PATHSIZE 36364718Seric # define LA_TYPE LA_SHORT 364*64813Seric # undef NETUNIX /* no unix domain socket support */ 36563838Seric #endif 36663838Seric 36764314Seric 36863962Seric /* 36963962Seric ** ConvexOS 11.0 and later 37063962Seric */ 37163962Seric 37263962Seric #ifdef _CONVEX_SOURCE 37363977Seric # define BSD 1 /* include all the BSD defines */ 37463977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 37563962Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 37663962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 37763977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 37863962Seric # define LA_TYPE LA_FLOAT 37964032Seric # undef IDENTPROTO 38063962Seric #endif 38163962Seric 38264314Seric 38363962Seric /* 38463962Seric ** RISC/os 4.51 38563962Seric ** 38663962Seric ** Untested... 38763962Seric */ 38863962Seric 38963965Seric #ifdef RISCOS 39063962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 39164035Seric /* # define HASFLOCK 1 /* has flock(2) call */ 39263962Seric # define LA_TYPE LA_INT 39363962Seric # define LA_AVENRUN "avenrun" 39463962Seric # define _PATH_UNIX "/unix" 39563962Seric #endif 39663962Seric 39764314Seric 39864155Seric /* 39964155Seric ** Linux 0.99pl10 and above... 40064155Seric ** From Karl London <karl@borg.demon.co.uk>. 40164155Seric */ 40264155Seric 40364770Seric #ifdef __linux__ 40464155Seric # define BSD 1 /* pretend to be BSD based today */ 40564155Seric # undef NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 40664155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 40764380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 40864155Seric # ifndef LA_TYPE 40964155Seric # define LA_TYPE LA_FLOAT 41064155Seric # endif 41164763Seric # include <sys/sysmacros.h> 41264155Seric #endif 41364155Seric 41464155Seric 41564345Seric /* 41664345Seric ** DELL SVR4 Issue 2.2, and others 41764345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 41864345Seric ** 41964345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 42064345Seric ** defined, and the definitions conflict. 42164345Seric */ 42264345Seric 42364345Seric #ifdef DELL_SVR4 42464345Seric # define SYSTEM5 1 42564345Seric /* # define setreuid(r, e) seteuid(e) */ 42664345Seric /* # include <sys/time.h> */ 42764345Seric # define _PATH_UNIX "/unix" 42864345Seric # ifndef _PATH_SENDMAILCF 42964345Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 43064345Seric # endif 43164345Seric # ifndef _PATH_SENDMAILPID 43264345Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 43364345Seric # endif 43464345Seric #endif 43564345Seric 43664345Seric 43764380Seric /* 43864380Seric ** Apple A/UX 3.0 43964380Seric */ 44064345Seric 44164380Seric #ifdef _AUX_SOURCE 44264729Seric # include <sys/sysmacros.h> 44364380Seric # define BSD /* has BSD routines */ 44464380Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 44564380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 44664380Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 44764380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 44864561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 44964718Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 45064380Seric # define FORK fork 45164380Seric # ifndef _PATH_SENDMAILCF 45264380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 45364380Seric # endif 45464380Seric # ifndef LA_TYPE 45564380Seric # define LA_TYPE LA_ZERO 45664380Seric # endif 45764560Seric # undef WIFEXITED 45864560Seric # undef WEXITSTATUS 45964380Seric #endif 46064380Seric 46164380Seric 46264705Seric /* 46364705Seric ** Encore UMAX V 46464705Seric ** 46564705Seric ** Not extensively tested. 46664705Seric */ 46764380Seric 46864705Seric #ifdef UMAXV 46964705Seric # include <limits.h> 47064705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 47164705Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 47264705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 47364705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 47464705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 47564705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 47664705Seric # define FORK fork /* no vfork(2) primitive available */ 47764705Seric # define MAXPATHLEN PATH_MAX 47864705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 47964705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 48064705Seric # undef WIFEXITED 48164705Seric # undef WEXITSTATUS 48264705Seric #endif 48364705Seric 48464705Seric 48564705Seric 48663902Seric /********************************************************************** 48763787Seric ** End of Per-Operating System defines 48863902Seric **********************************************************************/ 48963787Seric 49063949Seric /********************************************************************** 49163949Seric ** More general defines 49263949Seric **********************************************************************/ 49363949Seric 49463962Seric /* general BSD defines */ 49563962Seric #ifdef BSD 49664035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 49764035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 49864035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 49964035Seric # define HASFLOCK 1 /* has flock(2) call */ 50063962Seric #endif 50163962Seric 50263787Seric /* general System V defines */ 50363787Seric # ifdef SYSTEM5 504*64813Seric # include <sys/sysmacros.h> 50563949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 50663949Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 50764705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 50863962Seric # ifndef LA_TYPE 50963962Seric # define LA_TYPE LA_INT 51063962Seric # endif 51163949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 51263949Seric # define bzero(d, l) (memset((d), '\0', (l))) 51363949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 51463787Seric # endif 51563787Seric 51663949Seric /* general "standard C" defines */ 517*64813Seric #if (defined(__STDC__) && !defined(MACH386)) || defined(SYSTEM5) 51863949Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 51963949Seric #endif 52063949Seric 52163949Seric /* general POSIX defines */ 52263949Seric #ifdef _POSIX_VERSION 52364718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 52464718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 52563949Seric #endif 52663949Seric 52763787Seric /* 52863937Seric ** If no type for argument two of getgroups call is defined, assume 52963937Seric ** it's an integer -- unfortunately, there seem to be several choices 53063937Seric ** here. 53163937Seric */ 53263937Seric 53363937Seric #ifndef GIDSET_T 53463937Seric # define GIDSET_T int 53563937Seric #endif 53663937Seric 53764439Seric 53864439Seric /********************************************************************** 53959023Seric ** Remaining definitions should never have to be changed. They are 54059023Seric ** primarily to provide back compatibility for older systems -- for 54159287Seric ** example, it includes some POSIX compatibility definitions 54264439Seric **********************************************************************/ 54359023Seric 54459388Seric /* System 5 compatibility */ 54559388Seric #ifndef S_ISREG 54659388Seric #define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG) 54759388Seric #endif 54859388Seric #ifndef S_IWGRP 54959388Seric #define S_IWGRP 020 55059388Seric #endif 55159388Seric #ifndef S_IWOTH 55259388Seric #define S_IWOTH 002 55359388Seric #endif 55459388Seric 55559023Seric /* 55650537Seric ** Older systems don't have this error code -- it should be in 55750537Seric ** /usr/include/sysexits.h. 55850537Seric */ 55950537Seric 56050537Seric # ifndef EX_CONFIG 56150537Seric # define EX_CONFIG 78 /* configuration error */ 56250537Seric # endif 56356852Seric 56464718Seric /* pseudo-code used in server SMTP */ 56564718Seric # define EX_QUIT 22 /* drop out of server immediately */ 56664718Seric 56764718Seric 56863993Seric /* 56963993Seric ** These are used in a few cases where we need some special 57063993Seric ** error codes, but where the system doesn't provide something 57163993Seric ** reasonable. They are printed in errstring. 57263993Seric */ 57363993Seric 57463993Seric #ifndef E_PSEUDOBASE 57563993Seric # define E_PSEUDOBASE 256 57663993Seric #endif 57763993Seric 57863993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 57963993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 58063993Seric 58163970Seric /* type of arbitrary pointer */ 58263970Seric #ifndef ARBPTR_T 58363970Seric # define ARBPTR_T void * 58463970Seric #endif 58563970Seric 58660568Seric #ifndef __P 58760568Seric # include "cdefs.h" 58860568Seric #endif 58960568Seric 59056852Seric /* 59158778Seric ** Do some required dependencies 59258778Seric */ 59358778Seric 59458778Seric #if defined(NETINET) || defined(NETISO) 59559107Seric # define SMTP 1 /* enable user and server SMTP */ 59659107Seric # define QUEUE 1 /* enable queueing */ 59759107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 59858778Seric #endif 59958778Seric 60058778Seric 60158778Seric /* 60256852Seric ** Arrange to use either varargs or stdargs 60356852Seric */ 60456852Seric 60556852Seric # ifdef __STDC__ 60656852Seric 60756852Seric # include <stdarg.h> 60856852Seric 60956852Seric # define VA_LOCAL_DECL va_list ap; 61056852Seric # define VA_START(f) va_start(ap, f) 61156852Seric # define VA_END va_end(ap) 61256852Seric 61356852Seric # else 61456852Seric 61556852Seric # include <varargs.h> 61656852Seric 61756852Seric # define VA_LOCAL_DECL va_list ap; 61856852Seric # define VA_START(f) va_start(ap) 61956852Seric # define VA_END va_end(ap) 62056852Seric 62156852Seric # endif 62257631Seric 62357943Seric #ifdef HASUNAME 62457631Seric # include <sys/utsname.h> 62557631Seric # ifdef newstr 62657631Seric # undef newstr 62757631Seric # endif 62857943Seric #else /* ! HASUNAME */ 62957631Seric # define NODE_LENGTH 32 63057631Seric struct utsname 63157631Seric { 63257631Seric char nodename[NODE_LENGTH+1]; 63357631Seric }; 63457943Seric #endif /* HASUNAME */ 63557642Seric 63663838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 63763838Seric # define MAXHOSTNAMELEN 256 63857735Seric #endif 63958153Seric 64058153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 64158153Seric # define SIGCHLD SIGCLD 64258153Seric #endif 64358153Seric 64458153Seric #ifndef STDIN_FILENO 64558153Seric #define STDIN_FILENO 0 64658153Seric #endif 64758153Seric 64858153Seric #ifndef STDOUT_FILENO 64958153Seric #define STDOUT_FILENO 1 65058153Seric #endif 65158153Seric 65258153Seric #ifndef STDERR_FILENO 65358153Seric #define STDERR_FILENO 2 65458153Seric #endif 65558689Seric 65664072Seric #ifndef LOCK_SH 65764035Seric # define LOCK_SH 0x01 /* shared lock */ 65864035Seric # define LOCK_EX 0x02 /* exclusive lock */ 65964035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 66064035Seric # define LOCK_UN 0x08 /* unlock */ 66164035Seric #endif 66258692Seric 66364035Seric #ifndef SIG_ERR 66464035Seric # define SIG_ERR ((void (*)()) -1) 66558689Seric #endif 66658702Seric 66764500Seric #ifndef WEXITSTATUS 66864500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 66964500Seric #endif 67064500Seric #ifndef WIFEXITED 67164500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 67264500Seric #endif 67364500Seric 67464561Seric #ifndef SIGFUNC_DEFINED 67564561Seric typedef void (*sigfunc_t) __P((int)); 67664561Seric #endif 67764561Seric 67858702Seric /* 67958702Seric ** Size of tobuf (deliver.c) 68058702Seric ** Tweak this to match your syslog implementation. It will have to 68158702Seric ** allow for the extra information printed. 68258702Seric */ 68358702Seric 68458702Seric #ifndef TOBUFSIZE 68558702Seric # define TOBUFSIZE (1024 - 256) 68658702Seric #endif 68760219Seric 68860219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 68960219Seric # ifndef FORK 69060219Seric # define FORK vfork /* function to call to fork mailer */ 69160219Seric # endif 692