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*64727Seric * @(#)conf.h 8.39 (Berkeley) 10/17/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 */ 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 /* 6664032Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 6764032Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 6864032Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 6964032Seric ** are closed. Some firewalls return this error if you try to connect 7064032Seric ** to the IDENT port (113), so you can't receive email from these hosts 7164032Seric ** on these systems. The firewall really should use a more specific 7264032Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. This 7364032Seric ** will get #undefed below as needed. 7464032Seric */ 7564032Seric 7664032Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 7764032Seric 7863902Seric /********************************************************************** 7959023Seric ** Operating system configuration. 8059023Seric ** 8159023Seric ** Unless you are porting to a new OS, you shouldn't have to 8259023Seric ** change these. 8363902Seric **********************************************************************/ 8456823Seric 8563787Seric /* 8663787Seric ** Per-Operating System defines 8763787Seric */ 8863787Seric 8964314Seric 9063902Seric /* 9163902Seric ** HP-UX -- tested for 8.07 9263902Seric */ 9363902Seric 9459348Seric # ifdef __hpux 95*64727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 96*64727Seric # undef m_flags 9763787Seric # define SYSTEM5 1 /* include all the System V defines */ 9864035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 9964314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 10064035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 10163902Seric # define setreuid(r, e) setresuid(r, e, -1) 10263962Seric # define LA_TYPE LA_FLOAT 10363962Seric # define _PATH_UNIX "/hp-ux" 10464358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 10556823Seric # endif 10656823Seric 10764314Seric 10863902Seric /* 10963902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 11063902Seric */ 11163902Seric 11260224Seric # ifdef _AIX3 11364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 11460219Seric # define FORK fork /* no vfork primitive available */ 11564494Seric # undef SETPROCTITLE /* setproctitle confuses AIX */ 11660219Seric # endif 11760219Seric 11864314Seric 11963902Seric /* 12063902Seric ** Silicon Graphics IRIX 12163902Seric ** 12263965Seric ** Compiles on 4.0.1. 12363902Seric */ 12463902Seric 12563753Seric # ifdef IRIX 126*64727Seric # include <sys/sysmacros.h> 12764035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 12864035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 12964314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 13063753Seric # define FORK fork /* no vfork primitive available */ 13164562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 13264155Seric # define setpgid BSDsetpgrp 13363937Seric # define GIDSET_T gid_t 13463753Seric # endif 13563753Seric 13663902Seric 13763902Seric /* 13863902Seric ** SunOS 13963902Seric */ 14063902Seric 14163787Seric #if defined(sun) && !defined(BSD) 14259074Seric 14363962Seric # define LA_TYPE LA_INT 14464035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 14564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 14660564Seric 14760602Seric # ifdef SOLARIS 14863902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 14963949Seric # define SYSTEM5 1 /* use System V definitions */ 15063977Seric # define setreuid(r, e) seteuid(e) 15163787Seric # include <sys/time.h> 15264125Seric # define gethostbyname __switch_gethostbyname /* get working version */ 15364125Seric # define gethostbyaddr __switch_gethostbyaddr /* get working version */ 15463962Seric # define _PATH_UNIX "/kernel/unix" 15563962Seric # ifndef _PATH_SENDMAILCF 15663962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 15764072Seric # endif 15864072Seric # ifndef _PATH_SENDMAILPID 15963962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 16063962Seric # endif 16163787Seric 16260602Seric # else 16363787Seric /* SunOS 4.1.x */ 16460602Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 16564035Seric /* # define HASFLOCK 1 /* has flock(2) call */ 16660564Seric # include <vfork.h> 16763787Seric 16860564Seric # endif 16959023Seric #endif 17059023Seric 17164718Seric /* 17264718Seric ** DG/UX 5.4.2 17364718Seric */ 17464314Seric 17564718Seric #ifdef DGUX 17664718Seric # define SYSTEM5 1 17764718Seric # define LA_TYPE LA_SUBR 17864718Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 17964718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 18064718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 18164718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 18264718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 18364718Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 18464718Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 18564718Seric # undef SETPROCTITLE 18664718Seric # define inet_addr dgux_inet_addr 18764718Seric extern long dgux_inet_addr(); 18864718Seric #endif 18964718Seric 19064718Seric 19163902Seric /* 19263902Seric ** Digital Ultrix 4.2A or 4.3 19364264Seric ** 19464264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 19564264Seric ** not dropped when the process exits. This causes major problems, 19664264Seric ** so flock is the only alternative. 19763902Seric */ 19863902Seric 19960564Seric #ifdef ultrix 20060564Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 20164035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 20263962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 20364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 20464264Seric # define HASFLOCK 1 /* has flock(2) call */ 20563962Seric # define LA_TYPE LA_INT 20663962Seric # define LA_AVENRUN "avenrun" 20764358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 20860564Seric #endif 20960564Seric 21064314Seric 21163902Seric /* 21263902Seric ** OSF/1 (tested on Alpha) 21363902Seric */ 21463902Seric 21563787Seric #ifdef __osf__ 21664314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 21763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 21864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 22064035Seric /* # define HASFLOCK 1 /* has flock(2) call */ 22163962Seric # define LA_TYPE LA_INT 22259287Seric #endif 22359287Seric 22464314Seric 22563902Seric /* 22663902Seric ** NeXTstep 22763902Seric */ 22863902Seric 22964076Seric #ifdef NeXT 23064035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 23164035Seric # define HASFLOCK 1 /* has flock(2) call */ 23264125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 23364314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 23464563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 23563753Seric # define sleep sleepX 23664155Seric # define setpgid setpgrp 23764295Seric # ifndef LA_TYPE 23864295Seric # define LA_TYPE LA_MACH 23964295Seric # endif 24064500Seric # ifndef _POSIX_SOURCE 24164035Seric typedef int pid_t; 24264500Seric # undef WEXITSTATUS 24364500Seric # undef WIFEXITED 24464500Seric # endif 24564072Seric # ifndef _PATH_SENDMAILCF 24664072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 24764072Seric # endif 24864072Seric # ifndef _PATH_SENDMAILPID 24964072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 25064072Seric # endif 25159288Seric #endif 25259288Seric 25364314Seric 25463902Seric /* 25563962Seric ** 4.4 BSD 25663902Seric */ 25763902Seric 25860568Seric #ifdef BSD4_4 25964072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 26064314Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 26160568Seric # include <sys/cdefs.h> 26263838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 26364072Seric # ifndef LA_TYPE 26464072Seric # define LA_TYPE LA_SUBR 26564072Seric # endif 26660568Seric #endif 26760568Seric 26864314Seric 26963902Seric /* 27063969Seric ** 4.3 BSD -- this is for very old systems 27163969Seric ** 27263969Seric ** You'll also have to install a new resolver library. 27363969Seric ** I don't guarantee that support for this environment is complete. 27463969Seric */ 27563969Seric 27663969Seric #ifdef oldBSD43 27763969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 27863969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 27963970Seric # define ARBPTR_T char * 28064155Seric # define setpgid setpgrp 28163969Seric # ifndef LA_TYPE 28263969Seric # define LA_TYPE LA_FLOAT 28363969Seric # endif 28463969Seric # ifndef _PATH_SENDMAILCF 28563969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 28663969Seric # endif 28764358Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 28863969Seric #endif 28963969Seric 29064314Seric 29163969Seric /* 29263902Seric ** SCO Unix 29363902Seric */ 29463902Seric 29563838Seric #ifdef _SCO_unix_ 29663838Seric # define SYSTEM5 1 /* include all the System V defines */ 29764035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 29863987Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 29963838Seric # define FORK fork 30063838Seric # define MAXPATHLEN PATHSIZE 30164718Seric # define LA_TYPE LA_SHORT 30263838Seric #endif 30363838Seric 30464314Seric 30563962Seric /* 30663962Seric ** ConvexOS 11.0 and later 30763962Seric */ 30863962Seric 30963962Seric #ifdef _CONVEX_SOURCE 31063977Seric # define BSD 1 /* include all the BSD defines */ 31163977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 31263962Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 31363962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 31463977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 31563962Seric # define LA_TYPE LA_FLOAT 31664032Seric # undef IDENTPROTO 31763962Seric #endif 31863962Seric 31964314Seric 32063962Seric /* 32163962Seric ** RISC/os 4.51 32263962Seric ** 32363962Seric ** Untested... 32463962Seric */ 32563962Seric 32663965Seric #ifdef RISCOS 32763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 32864035Seric /* # define HASFLOCK 1 /* has flock(2) call */ 32963962Seric # define LA_TYPE LA_INT 33063962Seric # define LA_AVENRUN "avenrun" 33163962Seric # define _PATH_UNIX "/unix" 33263962Seric #endif 33363962Seric 33464314Seric 33564155Seric /* 33664155Seric ** Linux 0.99pl10 and above... 33764155Seric ** From Karl London <karl@borg.demon.co.uk>. 33864155Seric */ 33964155Seric 34064155Seric #ifdef linux 34164155Seric # define BSD 1 /* pretend to be BSD based today */ 34264155Seric # undef NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 34364155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 34464380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 34564155Seric # ifndef LA_TYPE 34664155Seric # define LA_TYPE LA_FLOAT 34764155Seric # endif 34864155Seric #endif 34964155Seric 35064155Seric 35164345Seric /* 35264345Seric ** DELL SVR4 Issue 2.2, and others 35364345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 35464345Seric ** 35564345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 35664345Seric ** defined, and the definitions conflict. 35764345Seric */ 35864345Seric 35964345Seric #ifdef DELL_SVR4 36064345Seric # define SYSTEM5 1 36164345Seric /* # define setreuid(r, e) seteuid(e) */ 36264345Seric /* # include <sys/time.h> */ 36364345Seric # define _PATH_UNIX "/unix" 36464345Seric # ifndef _PATH_SENDMAILCF 36564345Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 36664345Seric # endif 36764345Seric # ifndef _PATH_SENDMAILPID 36864345Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 36964345Seric # endif 37064345Seric #endif 37164345Seric 37264345Seric 37364380Seric /* 37464380Seric ** Apple A/UX 3.0 37564380Seric */ 37664345Seric 37764380Seric #ifdef _AUX_SOURCE 37864380Seric # define BSD /* has BSD routines */ 37964380Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 38064380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 38164380Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 38264380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 38364561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 38464718Seric # undef IDENTPROTO /* TCP/IP implementation is broken */ 38564380Seric # define FORK fork 38664380Seric # ifndef _PATH_SENDMAILCF 38764380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 38864380Seric # endif 38964380Seric # ifndef LA_TYPE 39064380Seric # define LA_TYPE LA_ZERO 39164380Seric # endif 39264560Seric # undef WIFEXITED 39364560Seric # undef WEXITSTATUS 39464380Seric #endif 39564380Seric 39664380Seric 39764705Seric /* 39864705Seric ** Encore UMAX V 39964705Seric ** 40064705Seric ** Not extensively tested. 40164705Seric */ 40264380Seric 40364705Seric #ifdef UMAXV 40464705Seric # include <limits.h> 40564705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 40664705Seric # define HASSTATFS 1 /* has the statfs(2) syscall */ 40764705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 40864705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 40964705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 41064705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 41164705Seric # define FORK fork /* no vfork(2) primitive available */ 41264705Seric # define MAXPATHLEN PATH_MAX 41364705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 41464705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 41564705Seric # undef WIFEXITED 41664705Seric # undef WEXITSTATUS 41764705Seric #endif 41864705Seric 41964705Seric 42064705Seric 42163902Seric /********************************************************************** 42263787Seric ** End of Per-Operating System defines 42363902Seric **********************************************************************/ 42463787Seric 42563949Seric /********************************************************************** 42663949Seric ** More general defines 42763949Seric **********************************************************************/ 42863949Seric 42963962Seric /* general BSD defines */ 43063962Seric #ifdef BSD 43164035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 43264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 43364035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 43464035Seric # define HASFLOCK 1 /* has flock(2) call */ 43563962Seric #endif 43663962Seric 43763787Seric /* general System V defines */ 43863787Seric # ifdef SYSTEM5 43963949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 44063949Seric # define HASUSTAT 1 /* use System V ustat(2) syscall */ 44164705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 44263962Seric # ifndef LA_TYPE 44363962Seric # define LA_TYPE LA_INT 44463962Seric # endif 44563949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 44663949Seric # define bzero(d, l) (memset((d), '\0', (l))) 44763949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 44863787Seric # endif 44963787Seric 45063949Seric /* general "standard C" defines */ 45163949Seric #if defined(__STDC__) || defined(SYSTEM5) 45263949Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 45363949Seric #endif 45463949Seric 45563949Seric /* general POSIX defines */ 45663949Seric #ifdef _POSIX_VERSION 45764718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 45864718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 45963949Seric #endif 46063949Seric 46163787Seric /* 46263937Seric ** If no type for argument two of getgroups call is defined, assume 46363937Seric ** it's an integer -- unfortunately, there seem to be several choices 46463937Seric ** here. 46563937Seric */ 46663937Seric 46763937Seric #ifndef GIDSET_T 46863937Seric # define GIDSET_T int 46963937Seric #endif 47063937Seric 47164439Seric 47264439Seric /********************************************************************** 47359023Seric ** Remaining definitions should never have to be changed. They are 47459023Seric ** primarily to provide back compatibility for older systems -- for 47559287Seric ** example, it includes some POSIX compatibility definitions 47664439Seric **********************************************************************/ 47759023Seric 47859388Seric /* System 5 compatibility */ 47959388Seric #ifndef S_ISREG 48059388Seric #define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG) 48159388Seric #endif 48259388Seric #ifndef S_IWGRP 48359388Seric #define S_IWGRP 020 48459388Seric #endif 48559388Seric #ifndef S_IWOTH 48659388Seric #define S_IWOTH 002 48759388Seric #endif 48859388Seric 48959023Seric /* 49050537Seric ** Older systems don't have this error code -- it should be in 49150537Seric ** /usr/include/sysexits.h. 49250537Seric */ 49350537Seric 49450537Seric # ifndef EX_CONFIG 49550537Seric # define EX_CONFIG 78 /* configuration error */ 49650537Seric # endif 49756852Seric 49864718Seric /* pseudo-code used in server SMTP */ 49964718Seric # define EX_QUIT 22 /* drop out of server immediately */ 50064718Seric 50164718Seric 50263993Seric /* 50363993Seric ** These are used in a few cases where we need some special 50463993Seric ** error codes, but where the system doesn't provide something 50563993Seric ** reasonable. They are printed in errstring. 50663993Seric */ 50763993Seric 50863993Seric #ifndef E_PSEUDOBASE 50963993Seric # define E_PSEUDOBASE 256 51063993Seric #endif 51163993Seric 51263993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 51363993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 51463993Seric 51563970Seric /* type of arbitrary pointer */ 51663970Seric #ifndef ARBPTR_T 51763970Seric # define ARBPTR_T void * 51863970Seric #endif 51963970Seric 52060568Seric #ifndef __P 52160568Seric # include "cdefs.h" 52260568Seric #endif 52360568Seric 52456852Seric /* 52558778Seric ** Do some required dependencies 52658778Seric */ 52758778Seric 52858778Seric #if defined(NETINET) || defined(NETISO) 52959107Seric # define SMTP 1 /* enable user and server SMTP */ 53059107Seric # define QUEUE 1 /* enable queueing */ 53159107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 53258778Seric #endif 53358778Seric 53458778Seric 53558778Seric /* 53656852Seric ** Arrange to use either varargs or stdargs 53756852Seric */ 53856852Seric 53956852Seric # ifdef __STDC__ 54056852Seric 54156852Seric # include <stdarg.h> 54256852Seric 54356852Seric # define VA_LOCAL_DECL va_list ap; 54456852Seric # define VA_START(f) va_start(ap, f) 54556852Seric # define VA_END va_end(ap) 54656852Seric 54756852Seric # else 54856852Seric 54956852Seric # include <varargs.h> 55056852Seric 55156852Seric # define VA_LOCAL_DECL va_list ap; 55256852Seric # define VA_START(f) va_start(ap) 55356852Seric # define VA_END va_end(ap) 55456852Seric 55556852Seric # endif 55657631Seric 55757943Seric #ifdef HASUNAME 55857631Seric # include <sys/utsname.h> 55957631Seric # ifdef newstr 56057631Seric # undef newstr 56157631Seric # endif 56257943Seric #else /* ! HASUNAME */ 56357631Seric # define NODE_LENGTH 32 56457631Seric struct utsname 56557631Seric { 56657631Seric char nodename[NODE_LENGTH+1]; 56757631Seric }; 56857943Seric #endif /* HASUNAME */ 56957642Seric 57063838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 57163838Seric # define MAXHOSTNAMELEN 256 57257735Seric #endif 57358153Seric 57458153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 57558153Seric # define SIGCHLD SIGCLD 57658153Seric #endif 57758153Seric 57858153Seric #ifndef STDIN_FILENO 57958153Seric #define STDIN_FILENO 0 58058153Seric #endif 58158153Seric 58258153Seric #ifndef STDOUT_FILENO 58358153Seric #define STDOUT_FILENO 1 58458153Seric #endif 58558153Seric 58658153Seric #ifndef STDERR_FILENO 58758153Seric #define STDERR_FILENO 2 58858153Seric #endif 58958689Seric 59064072Seric #ifndef LOCK_SH 59164035Seric # define LOCK_SH 0x01 /* shared lock */ 59264035Seric # define LOCK_EX 0x02 /* exclusive lock */ 59364035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 59464035Seric # define LOCK_UN 0x08 /* unlock */ 59564035Seric #endif 59658692Seric 59764035Seric #ifndef SIG_ERR 59864035Seric # define SIG_ERR ((void (*)()) -1) 59958689Seric #endif 60058702Seric 60164500Seric #ifndef WEXITSTATUS 60264500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 60364500Seric #endif 60464500Seric #ifndef WIFEXITED 60564500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 60664500Seric #endif 60764500Seric 60864561Seric #ifndef SIGFUNC_DEFINED 60964561Seric typedef void (*sigfunc_t) __P((int)); 61064561Seric #endif 61164561Seric 61258702Seric /* 61358702Seric ** Size of tobuf (deliver.c) 61458702Seric ** Tweak this to match your syslog implementation. It will have to 61558702Seric ** allow for the extra information printed. 61658702Seric */ 61758702Seric 61858702Seric #ifndef TOBUFSIZE 61958702Seric # define TOBUFSIZE (1024 - 256) 62058702Seric #endif 62160219Seric 62260219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 62360219Seric # ifndef FORK 62460219Seric # define FORK vfork /* function to call to fork mailer */ 62560219Seric # endif 626