80ef2bfd0b0eecae4267255ecc01a501d9ee5391
* Copyright (c) 1983, 1995 Eric P. Allman
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* %sccs.include.redist.c%
* @(#)conf.h 8.176 (Berkeley) %G%
** CONF.H -- All user-configurable parameters for sendmail
** Send updates to sendmail@CS.Berkeley.EDU so they will be
** included in the next release.
struct rusage
; /* forward declaration to get gcc to shut up in wait.h */
/**********************************************************************
** There shouldn't be much need to change these....
**********************************************************************/
# define MAXLINE 2048 /* max line length */
# define MAXNAME 256 /* max length of a name */
# define MAXPV 40 /* max # of parms to mailers */
# define MAXATOM 200 /* max atoms per address */
# define MAXMAILERS 25 /* maximum mailers known to system */
# define MAXRWSETS 200 /* max # of sets of rewriting rules */
# define MAXPRIORITIES 25 /* max values for Precedence: field */
# define MAXMXHOSTS 20 /* max # of MX records */
# define SMTPLINELIM 990 /* maximum SMTP line length */
# define MAXKEY 128 /* maximum size of a database key */
# define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */
# define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */
# define MAXALIASDB 12 /* max # of alias databases */
# define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */
# define MAXTOCLASS 8 /* max # of message timeout classes */
# define MAXMIMEARGS 20 /* max args in Content-Type: */
# define MAXMIMENESTING 20 /* max MIME multipart nesting */
# define QUEUESEGSIZE 1000 /* increment for queue size */
/**********************************************************************
** #define these if they are available; comment them out otherwise.
**********************************************************************/
# define LOG 1 /* enable logging */
# define UGLYUUCP 1 /* output ugly UUCP From lines */
# define NETUNIX 1 /* include unix domain support */
# define NETINET 1 /* include internet support */
# define MATCHGECOS 1 /* match user names from gecos field */
# define XDEBUG 1 /* enable extended debugging */
# if (defined(NEWDB) || defined(HESIOD)) && !defined(USERDB)
# define USERDB 1 /* look in user database */
/**********************************************************************
** 0/1 Compilation options.
** #define these to 1 if they are available;
** #define them to 0 otherwise.
**********************************************************************/
# define NAMED_BIND 1 /* use Berkeley Internet Domain Server */
# define DSN 1 /* include delivery status notification code */
# define MIME8TO7 1 /* 8->7 bit MIME conversions */
# define MIME7TO8 1 /* 7->8 bit MIME conversions */
** Most systems have symbolic links today, so default them on. You
** can turn them off by #undef'ing this below.
# define HASLSTAT 1 /* has lstat(2) call */
** General "standard C" defines.
** These may be undone later, to cope with systems that claim to
** be Standard C but aren't. Gcc is the biggest offender -- it
** doesn't realize that the library is part of the language.
** Life would be much easier if we could get rid of this sort
# define HASSETVBUF 1 /* we have setvbuf(3) in libc */
\f/**********************************************************************
** Operating system configuration.
** Unless you are porting to a new OS, you shouldn't have to
**********************************************************************/
** HP-UX -- tested for 8.07, 9.00, and 9.01.
** If V4FS is defined, compile for HP-UX 10.0.
/* common definitions for HP-UX 9.x and 10.x */
# undef m_flags /* conflict between db.h & sys/sysmacros.h on HP 300 */
# define SYSTEM5 1 /* include all the System V defines */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define USESETEUID 1 /* has useable seteuid(2) call */
# define seteuid(e) setresuid(-1, e, -1)
# define IP_SRCROUTE 1 /* can check IP source routing */
# define SPT_TYPE SPT_PSTAT
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
# define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */
# define syslog hard_syslog
extern void hard_syslog(int, char *, ...);
# define _PATH_UNIX "/stand/vmunix"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/etc/mail/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/etc/mail/sendmail.pid"
# define IDENTPROTO 1 /* TCP/IP implementation fixed in 10.0 */
# define _PATH_UNIX "/hp-ux"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
** IBM AIX 3.x -- actually tested for 3.2.3
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define IP_SRCROUTE 0 /* Something is broken with getsockopt() */
# define FORK fork /* no vfork primitive available */
# define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
# define SPT_PADCHAR '\0' /* pad process title with nulls */
** Use IRIX64 instead of IRIX for 64-bit IRIX (6.0).
** Use IRIX5 instead of IRIX for IRIX 5.x.
** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>.
** IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>.
#if defined(IRIX64) || defined(IRIX5)
# define SYSTEM5 1 /* this is a System-V derived system */
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define IP_SRCROUTE 1 /* can check IP source routing */
# define FORK fork /* no vfork primitive available */
# define setpgid BSDsetpgrp
# define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
# define SFS_BAVAIL f_bfree /* alternate field name */
# define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */
# define NAMELISTMASK 0x7fffffff /* mask for nlist() values */
# if defined(IRIX64) || defined(IRIX5)
# define ARGV_T char *const *
# define ARGV_T const char **
# define WAITUNION 1 /* use "union wait" as wait argument type */
** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
** Solaris 2.4 (a.k.a. SunOS 5.4).
#if defined(sun) && !defined(BSD)
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */
# define IP_SRCROUTE 1 /* can check IP source routing */
# define SOLARIS 203 /* for back compat only -- use -DSOLARIS=203 */
/* Solaris 2.x (a.k.a. SunOS 5.x) */
# define __svr4__ /* use all System V Releae 4 defines below */
# define BSD_COMP 1 /* get BSD ioctl calls */
# define _PATH_UNIX "/dev/ksyms"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/etc/mail/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/etc/mail/sendmail.pid"
# define _PATH_HOSTS "/etc/inet/hosts"
# define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */
/* SunOS 4.0.3 or 4.1.x */
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASFLOCK 1 /* has flock(2) call */
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
/* special tweaking for SunOS 4.0.3 */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
# define NEEDSTRSTR 1 /* need emulation of strstr(3) routine */
# define WAITUNION 1 /* use "union wait" as wait argument type */
# define HASSETSID 1 /* has Posix setsid(2) call */
# define HASSETVBUF 1 /* we have setvbuf(3) in libc */
** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the
** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>.
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASSETSID 1 /* has Posix setsid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) */
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
# define SPT_TYPE SPT_NONE /* don't use setproctitle */
# define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
/* these include files must be included early on DG/UX */
# define inet_addr dgux_inet_addr
extern long dgux_inet_addr();
** Digital Ultrix 4.2A or 4.3
** Apparently, fcntl locking is broken on 4.2A, in that locks are
** not dropped when the process exits. This causes major problems,
** so flock is the only alternative.
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASFLOCK 1 /* has flock(2) call */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# ifndef BROKEN_RES_SEARCH
# define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */
# define LA_TYPE LA_FLOAT
# define LA_AVENRUN "avenrun"
# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
# define IDENTPROTO 0 /* pre-4.4 TCP/IP implementation is broken */
** OSF/1 for Intel Paragon.
** Contributed by Jeff A. Earickson <jeff@ssd.intel.com>
** of Intel Scalable Systems Divison.
# define __osf__ 1 /* get OSF/1 defines below */
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/var/adm/sendmail/sendmail.cf"
** OSF/1 (tested on Alpha)
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define USESETEUID 1 /* has useable seteuid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define IP_SRCROUTE 1 /* can check IP source routing */
# define HASFLOCK 1 /* has flock(2) call */
# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/var/run/sendmail.pid"
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define NEEDPUTENV 2 /* need putenv(3) call; no setenv(3) call */
# define HASFLOCK 1 /* has flock(2) call */
# define NEEDGETOPT 1 /* need a replacement for getopt(3) */
# define WAITUNION 1 /* use "union wait" as wait argument type */
# define UID_T int /* compiler gripes on uid_t */
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid"
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define USESETEUID 1 /* has useable seteuid(2) call */
# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
# define BSD4_4_SOCKADDR /* has sa_len */
# define NETLINK /* supports AF_LINK */
# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
# define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */
** BSD/386 (all versions)
** From Tony Sanders, BSDI
# define HASUNSETENV 1 /* has the unsetenv(3) call */
# define HASSETSID 1 /* has the setsid(2) POSIX syscall */
# define USESETEUID 1 /* has useable seteuid(2) call */
# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
# define BSD4_4_SOCKADDR /* has sa_len */
# define NETLINK /* supports AF_LINK */
# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
# if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
/* version 1.1 or later */
# define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */
/* version 1.0 or earlier */
# define OLD_NEWDB 1 /* old version of newdb library */
# define SPT_PADCHAR '\0' /* pad process title with nulls */
** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions)
** 4.3BSD clone, closer to 4.4BSD
#if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define HASSETSID 1 /* has the setsid(2) POSIX syscall */
# define USESETEUID 1 /* has useable seteuid(2) call */
# define HASUNAME 1 /* has uname(2) syscall */
# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
# define BSD4_4_SOCKADDR /* has sa_len */
# define NETLINK /* supports AF_LINK */
# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
** For mt Xinu's Mach386 system.
#if defined(MACH) && defined(i386)
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASFLOCK 1 /* has flock(2) call */
# define NEEDGETOPT 1 /* need a replacement for getopt(3) */
# define NEEDSTRTOL 1 /* need the strtol() function */
# define LA_TYPE LA_FLOAT
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
# undef HASSETVBUF /* don't actually have setvbuf(3) */
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/etc/sendmail.pid"
** 4.3 BSD -- this is for very old systems
** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1.
** You'll also have to install a new resolver library.
** I don't guarantee that support for this environment is complete.
#if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd)
# define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */
# define NEEDGETOPT 1 /* need a replacement for getopt(3) */
# define LA_TYPE LA_FLOAT
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
** This includes two parts -- the first is for SCO Open Server 3.2v4
** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>).
** The second is, I believe, for an older version.
# define HASSETREUID 1 /* has setreuid(2) call */
# define NEEDFSYNC 1 /* needs the fsync(2) call stub */
# define _PATH_UNIX "/unix"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/etc/sendmail.pid"
# define SYSTEM5 1 /* include all the System V defines */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define MAXPATHLEN PATHSIZE
# define LA_TYPE LA_SHORT
# define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */
# define SFS_BAVAIL f_bfree /* alternate field name */
# define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */
# undef NETUNIX /* no unix domain socket support */
** Contributed by J.J. Bailey <jjb@jagware.bcc.com>
# define SYSTEM5 1 /* include all the System V defines */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define HASSETREUID 1 /* has setreuid(2) call */
# define NEEDFSYNC 1 /* needs the fsync(2) call stub */
# undef NETUNIX /* no unix domain socket support */
# define LA_TYPE LA_SHORT
# define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
# define SFS_BAVAIL f_bfree /* alternate field name */
# define _PATH_UNIX "/unix"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/etc/sendmail.pid"
** Contributed by Tim Rice <timr@crl.com>.
# define SYSTEM5 1 /* include all the System V defines */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define WAITUNION 1 /* use "union wait" as wait argument type */
# define NEEDFSYNC 1 /* no fsync(2) in system library */
# define MAXPATHLEN PATHSIZE
# define LA_TYPE LA_SHORT
# define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
# define SFS_BAVAIL f_bfree /* alternate field name */
# define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */
# undef NETUNIX /* no unix domain socket support */
# define strtoul strtol /* gcc library bogosity */
typedef unsigned short uid_t
;
typedef unsigned short gid_t
;
** ConvexOS 11.0 and later
** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this
# define BSD 1 /* include all the BSD defines */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASSETSID 1 /* has POSIX setsid(2) call */
# define NEEDGETOPT 1 /* need replacement for getopt(3) */
# define IP_SRCROUTE 0 /* Something is broken with getsockopt() */
# define LA_TYPE LA_FLOAT
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# define S_IREAD _S_IREAD
# define S_IWRITE _S_IWRITE
# define S_IEXEC _S_IEXEC
# define S_IFCHR _S_IFCHR
# define S_IFBLK _S_IFBLK
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
** Gives a ton of warning messages, but otherwise compiles.
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define HASFLOCK 1 /* has flock(2) call */
# define WAITUNION 1 /* use "union wait" as wait argument type */
# define NEEDGETOPT 1 /* need a replacement for getopt(3) */
# define LA_AVENRUN "avenrun"
# define _PATH_UNIX "/unix"
typedef int (*sigfunc_t
)();
** Linux 0.99pl10 and above...
** Thanks to, in reverse order of contact:
** John Kennedy <warlock@csuchico.edu>
** Andrew Pam <avatar@aus.xanadu.com>
** Florian La Roche <rzsfl@rz.uni-sb.de>
** Karl London <karl@borg.demon.co.uk>
** Last compiled against: [05/25/95 @ 11:39:31 AM (Thursday)]
** sendmail 8.7.b.0 named 4.9.3-beta17 db-1.85
** gcc 2.6.4-950518 libc-5.0.9 linux 1.2.8
# define BSD 1 /* include BSD defines */
# define NEEDGETOPT 1 /* need a replacement for getopt(3) */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
# define GIDSET_T gid_t /* from <linux/types.h> */
# define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */
# define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */
# define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */
# define LA_TYPE LA_PROCSTR
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/var/run/sendmail.pid"
# define TZ_TYPE TZ_TNAME
# include <sys/sysmacros.h>
# undef atol /* wounded in <stdlib.h> */
** DELL SVR4 Issue 2.2, and others
** From Kimmo Suominen <kim@grendel.lut.fi>
** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
** defined, and the definitions conflict.
** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid
** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A
** (SVR4.0/386 version 3.0).
/* no changes necessary */
/* see general __svr4__ defines below */
# include <sys/sysmacros.h>
# define BSD /* has BSD routines */
# define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASSETVBUF 1 /* we have setvbuf(3) in libc */
# define SIGFUNC_DEFINED /* sigfunc_t already defined */
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
** Not extensively tested.
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASSETVBUF 1 /* we have setvbuf(3) in libc */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
# define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */
# define FORK fork /* no vfork(2) primitive available */
# define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
# define MAXPATHLEN PATH_MAX
extern struct passwd
*getpwent(), *getpwnam(), *getpwuid();
extern struct group
*getgrent(), *getgrnam(), *getgrgid();
** Stardent Titan 3000 running TitanOS 4.2.
** Must be compiled in "cc -43" mode.
** From Kate Hedstrom <kate@ahab.rutgers.edu>.
** Note the tweaking below after the BSD defines are set.
** From Jim Davis <jdavis@cs.arizona.edu>.
# define BSD4_3 1 /* to get signal() in conf.c */
# define LA_TYPE LA_FLOAT
# undef _POSIX_VERSION /* set in <unistd.h> */
# undef HASSETVBUF /* don't actually have setvbuf(3) */
/* Have to redefine WIFEXITED to take an int, to work with waitfor() */
# define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \
((union wait*)&(s))->w_termsig == 0)
# define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode)
# define isgraph(c) (isprint(c) && (c != ' '))
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
# define _PATH_UNIX "/dynix"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
** Sequent DYNIX/ptx v2.0 (and higher)
** For DYNIX/ptx v1.x, undefine HASSETREUID.
** From Tim Wright <timw@sequent.com>.
# define SYSTEM5 1 /* include all the System V defines */
# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
# define SPT_TYPE SPT_NONE /* don't use setproctitle */
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/etc/sendmail.pid"
** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
# define SYSTEM5 1 /* include all the System V defines */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
# define MAXPATHLEN PATHSIZE
# define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
# define SFS_BAVAIL f_bfree /* alternate field name */
** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com>
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASINITGROUPS 1 /* has initgroups(2) call */
# define SPT_TYPE SPT_NONE /* don't use setproctitle */
# define LA_TYPE LA_SUBR /* use getloadavg.c */
# define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
# define SFS_BAVAIL f_bfree /* alternate field name */
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/etc/sendmail.pid"
# undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
** From Evan Champion <evanc@spatial.synapse.org>.
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define HASGETDTABLESIZE 1
# define SLEEP_T unsigned
# define SFS_TYPE SFS_STATVFS
# define _PATH_UNIX "/unix"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid"
# define SYSLOG_BUFSIZE 128
** From Paul Southworth <pauls@locust.cic.net>
# define SYSTEM5 1 /* looks like System V */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define DEV_BSIZE 512 /* device block size not defined */
# undef LOG /* syslog not available */
# define NEEDFSYNC 1 /* no fsync in system library */
# define GETSHORT _getshort
** NCR 3000 Series (SysVr4)
** From Kevin Darcy <kevin@tech.mis.cfc.com>.
# define IP_SRCROUTE 0 /* Something is broken with getsockopt() */
# define LA_AVENRUN "avenrun"
** Tandem NonStop-UX SVR4
** From Rick McCarty <mccarty@mpd.tandem.com>.
** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2.
** Tested for 1.04 and 1.03
** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>.
# define SYSTEM5 1 /* include all the System V defines */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define setreuid(r, e) setresuid(r, e, -1)
# define LA_TYPE LA_FLOAT
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
# define HASSETVBUF /* HI-UX has no setlinebuf */
# define _PATH_UNIX "/HI-UX"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
# define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */
/* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */
extern int syslog(int, char *, ...);
** Amdahl UTS System V 2.1.5 (SVr3-based)
** From: Janet Jackson <janet@dialix.oz.au>.
# include <sys/sysmacros.h>
# undef HASLSTAT /* has symlinks, but they cause problems */
# define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */
# define SYS5SIGNALS 1 /* System V signal semantics */
# define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASINITGROUPS 1 /* has initgroups(3) function */
# define HASSETVBUF 1 /* has setvbuf(3) function */
# define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) function */
# define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */
# define LA_TYPE LA_ZERO /* doesn't have load average */
# define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */
# define SFS_BAVAIL f_bfree /* alternate field name */
# define _PATH_UNIX "/unix"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
** Cray Computer Corporation's CSOS
** From Scott Bolte <scott@craycos.com>.
# define SYSTEM5 1 /* include all the System V defines */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
# define NEEDFSYNC 1 /* no fsync in system library */
# define MAXPATHLEN PATHSIZE
# define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
# define SFS_BAVAIL f_bfree /* alternate field name */
# define _POSIX_CHOWN_RESTRICTED -1
extern struct group
*getgrent(), *getgrnam(), *getgrgid();
** Sony NEWS-OS 4.2.1R and 6.0.3
** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>.
# define BSD /* has BSD routines */
# define HASUNSETENV 1 /* has unsetenv(2) call */
# undef HASSETVBUF /* don't actually have setvbuf(3) */
# define WAITUNION 1 /* use "union wait" as wait argument type */
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
# define HASFLOCK 1 /* has flock(2) call */
typedef int (*sigfunc_t
)();
/* NEWS-OS 6.0.3 with /bin/cc */
# define SYSTEM5 1 /* include all the System V defines */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define USESETEUID 1 /* has useable seteuid(2) call */
# define HASSETSID 1 /* has Posix setsid(2) call */
# define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */
# define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */
# define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statvfs() impl */
# define SPT_TYPE SPT_SYSMIPS /* use sysmips() (OS 6.0.2 or later) */
# define _PATH_UNIX "/stand/unix"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/etc/mail/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/etc/mail/sendmail.pid"
** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach
** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>.
# define IDENTPROTO 0 /* TCP/IP implementation is broken */
# define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */
# define HASUNSETENV 1 /* has unsetenv(2) call */
# define NEEDPUTENV 1 /* need putenv(3) call */
# define NEEDGETOPT 1 /* need a replacement for getopt(3) */
# define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */
# define WAITUNION 1 /* use "union wait" as wait argument type */
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
typedef int (*sigfunc_t
)();
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/lib/sendmail.cf"
** NEC EWS-UX/V 4.2 (with /usr/ucb/cc)
** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>.
# define __svr4__ /* use all System V Releae 4 defines below */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
# define HASSETSID 1 /* has Posix setsid(2) call */
# define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */
# define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */
# define NAMELISTMASK 0x7fffffff /* mask for nlist() values */
/**********************************************************************
** End of Per-Operating System defines
**********************************************************************/
\f/**********************************************************************
**********************************************************************/
/* general BSD defines */
# define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define IP_SRCROUTE 1 /* can check IP source routing */
# define HASSETRLIMIT 1 /* has setrlimit(2) call */
# define HASFLOCK 1 /* has flock(2) call */
# define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */
/* general System V Release 4 defines */
# define USESETEUID 1 /* has useable seteuid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define HASSETRLIMIT 1 /* has setrlimit(2) call */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define _PATH_UNIX "/unix"
# ifndef _PATH_SENDMAILCF
# define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf"
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid"
# define SYSLOG_BUFSIZE 128
# define SFS_TYPE SFS_STATVFS
/* general System V defines */
# include <sys/sysmacros.h>
# define HASUNAME 1 /* use System V uname(2) system call */
# define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */
# define HASSETVBUF 1 /* we have setvbuf(3) in libc */
# define HASULIMIT 1 /* has the ulimit(2) syscall */
# define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */
# define LA_TYPE LA_INT /* assume integer load average */
# define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */
# define TZ_TYPE TZ_TZNAME /* use tzname[] vector */
# define bcopy(s, d, l) (memmove((d), (s), (l)))
# define bzero(d, l) (memset((d), '\0', (l)))
# define bcmp(s, d, l) (memcmp((s), (d), (l)))
/* general POSIX defines */
# define HASSETSID 1 /* has Posix setsid(2) call */
# define HASWAITPID 1 /* has Posix waitpid(2) call */
# if _POSIX_VERSION >= 199500 && !defined(USESETEUID)
# define USESETEUID 1 /* has useable seteuid(2) call */
** Tweaking for systems that (for example) claim to be BSD or POSIX
** but don't have all the standard BSD or POSIX routines (boo hiss).
# undef HASINITGROUPS /* doesn't have initgroups(3) call */
# undef HASSETSID /* despite POSIX claim, doesn't have setsid */
# undef bcopy /* despite SystemV claim, uses BSD bcopy */
# undef bcopy /* despite SystemV claim, uses BSD bcopy */
# undef bzero /* despite SystemV claim, uses BSD bzero */
# undef bcmp /* despite SystemV claim, uses BSD bcmp */
** Due to a "feature" in some operating systems such as Ultrix 4.3 and
** HPUX 8.0, if you receive a "No route to host" message (ICMP message
** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
** are closed. Some firewalls return this error if you try to connect
** to the IDENT port (113), so you can't receive email from these hosts
** on these systems. The firewall really should use a more specific
** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If
** not explicitly set to zero above, default it on.
# define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */
# define IP_SRCROUTE 1 /* Detect IP source routing */
# define HASGETUSERSHELL 1 /* libc has getusershell(3) call */
# define HASFLOCK 0 /* assume no flock(2) support */
# define HASSETREUID 0 /* assume no setreuid(2) call */
# define USESETEUID 0 /* assume no seteuid(2) call or no saved ids */
# define HASSETRLIMIT 0 /* assume no setrlimit(2) support */
# define HASULIMIT 0 /* assume no ulimit(2) support */
# define OLD_NEWDB 0 /* assume newer version of newdb */
/* heuristic setting of HASSETSIGMASK; can override above */
** If no type for argument two of getgroups call is defined, assume
** it's an integer -- unfortunately, there seem to be several choices
\f/**********************************************************************
** Remaining definitions should never have to be changed. They are
** primarily to provide back compatibility for older systems -- for
** example, it includes some POSIX compatibility definitions
**********************************************************************/
/* System 5 compatibility */
# define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG)
#if !defined(S_ISLNK) && defined(S_IFLNK)
# define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK)
** Older systems don't have this error code -- it should be in
** /usr/include/sysexits.h.
# define EX_CONFIG 78 /* configuration error */
/* pseudo-code used in server SMTP */
# define EX_QUIT 22 /* drop out of server immediately */
** These are used in a few cases where we need some special
** error codes, but where the system doesn't provide something
** reasonable. They are printed in errstring.
# define E_PSEUDOBASE 256
#define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */
#define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */
/* type of arbitrary pointer */
# include <arpa/nameser.h>
# undef NOERROR /* avoid compiler conflict with stream.h */
** The size of an IP address -- can't use sizeof because of problems
** on Crays, where everything is 64 bits. This will break if/when
** IP addresses are expanded to eight bytes.
** The size of various known types -- for reading network protocols.
** Again, we can't use sizeof because of compiler randomness.
** Do some required dependencies
#if defined(NETINET) || defined(NETISO)
# define SMTP 1 /* enable user and server SMTP */
# define QUEUE 1 /* enable queueing */
# define DAEMON 1 /* include the daemon (requires IPC & SMTP) */
** Arrange to use either varargs or stdargs
# define VA_LOCAL_DECL va_list ap;
# define VA_START(f) va_start(ap, f)
# define VA_END va_end(ap)
# define VA_LOCAL_DECL va_list ap;
# define VA_START(f) va_start(ap)
# define VA_END va_end(ap)
# include <sys/utsname.h>
char nodename
[NODE_LENGTH
+1];
#if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V)
# define MAXHOSTNAMELEN 256
#if !defined(SIGCHLD) && defined(SIGCLD)
# define LOCK_SH 0x01 /* shared lock */
# define LOCK_EX 0x02 /* exclusive lock */
# define LOCK_NB 0x04 /* non-blocking lock */
# define LOCK_UN 0x08 /* unlock */
# define SIG_ERR ((void (*)()) -1)
# define WEXITSTATUS(st) (((st) >> 8) & 0377)
# define WIFEXITED(st) (((st) & 0377) == 0)
typedef void (*sigfunc_t
) __P((int));
/* size of syslog buffer */
# define SYSLOG_BUFSIZE 1024
** Size of tobuf (deliver.c)
** Tweak this to match your syslog implementation. It will have to
** allow for the extra information printed.
# if (SYSLOG_BUFSIZE) > 512
# define TOBUFSIZE (SYSLOG_BUFSIZE - 256)
** Size of prescan buffer.
** Despite comments in the _sendmail_ book, this probably should
** not be changed; there are some hard-to-define dependencies.
# define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */
/* fork routine -- set above using #ifdef _osname_ or in Makefile */
# define FORK vfork /* function to call to fork mailer */
** If we are going to link scanf anyway, use it in readcf
#if !defined(HASUNAME) && !defined(SCANF)