1 /* 2 * Copyright (c) 1983 Eric P. Allman 3 * Copyright (c) 1988 Regents of the University of California. 4 * All rights reserved. 5 * 6 * %sccs.include.redist.c% 7 * 8 * @(#)conf.h 6.26 (Berkeley) 04/28/93 9 */ 10 11 /* 12 ** CONF.H -- All user-configurable parameters for sendmail 13 */ 14 15 # include <sys/param.h> 16 # include <sys/stat.h> 17 # include <fcntl.h> 18 19 /* 20 ** Table sizes, etc.... 21 ** There shouldn't be much need to change these.... 22 */ 23 24 # define MAXLINE 2048 /* max line length */ 25 # define MAXNAME 256 /* max length of a name */ 26 # define MAXPV 40 /* max # of parms to mailers */ 27 # define MAXATOM 200 /* max atoms per address */ 28 # define MAXMAILERS 25 /* maximum mailers known to system */ 29 # define MAXRWSETS 100 /* max # of sets of rewriting rules */ 30 # define MAXPRIORITIES 25 /* max values for Precedence: field */ 31 # define MAXMXHOSTS 20 /* max # of MX records */ 32 # define SMTPLINELIM 990 /* maximum SMTP line length */ 33 # define MAXKEY 128 /* maximum size of a database key */ 34 # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 35 # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 36 # define MAXIPADDR 16 /* max # of IP addrs for this host */ 37 # define PSBUFSIZE (MAXLINE + MAXATOM) /* size of prescan buffer */ 38 39 # ifndef QUEUESIZE 40 # define QUEUESIZE 1000 /* max # of jobs per queue run */ 41 # endif 42 43 # ifndef FORK 44 # define FORK vfork /* function to call to fork mailer */ 45 # endif 46 47 /* 48 ** Compilation options. 49 ** 50 ** #define these if they are available; comment them out otherwise. 51 */ 52 53 # define LOG 1 /* enable logging */ 54 # define UGLYUUCP 1 /* output ugly UUCP From lines */ 55 # define NETINET 1 /* include internet support */ 56 # define SETPROCTITLE 1 /* munge argv to display current status */ 57 # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 58 # define MATCHGECOS 1 /* match user names from gecos field */ 59 60 # ifdef NEWDB 61 # define USERDB 1 /* look in user database (requires NEWDB) */ 62 # define BTREE_MAP 1 /* enable BTREE mapping type (requires NEWDB) */ 63 # define HASH_MAP 1 /* enable HASH mapping type (requires NEWDB) */ 64 # endif 65 66 # ifdef NDBM 67 # define DBM_MAP 1 /* enable DBM mapping type (requires NDBM) */ 68 # endif 69 70 /* 71 ** Operating system configuration. 72 ** 73 ** Unless you are porting to a new OS, you shouldn't have to 74 ** change these. 75 */ 76 77 # ifdef __hpux 78 # define SYSTEM5 1 79 # endif 80 81 # ifdef SYSTEM5 82 83 # define LOCKF 1 /* use System V lockf instead of flock */ 84 # define SYS5TZ 1 /* use System V style timezones */ 85 # define HASUNAME 1 /* use System V uname system call */ 86 87 # endif 88 89 #ifdef sun 90 # include <vfork.h> 91 #endif 92 93 #ifdef _POSIX_VERSION 94 # define HASSETSID 1 /* has setsid(2) call */ 95 #endif 96 97 #ifdef NeXT 98 # define sleep sleepX 99 #endif 100 101 /* 102 ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 103 ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 104 ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 105 ** are closed. Some firewalls return this error if you try to connect 106 ** to the IDENT port (113), so you can't receive email from these hosts 107 ** on these systems. The firewall really should use a more specific 108 ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. 109 */ 110 111 #if !defined(ultrix) && !defined(__hpux) 112 # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 113 #endif 114 115 /* 116 ** Remaining definitions should never have to be changed. They are 117 ** primarily to provide back compatibility for older systems -- for 118 ** example, it includes some POSIX compatibility definitions 119 */ 120 121 /* System 5 compatibility */ 122 #ifndef S_ISREG 123 #define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG) 124 #endif 125 #ifndef S_IWGRP 126 #define S_IWGRP 020 127 #endif 128 #ifndef S_IWOTH 129 #define S_IWOTH 002 130 #endif 131 132 /* 133 ** Older systems don't have this error code -- it should be in 134 ** /usr/include/sysexits.h. 135 */ 136 137 # ifndef EX_CONFIG 138 # define EX_CONFIG 78 /* configuration error */ 139 # endif 140 141 /* 142 ** Do some required dependencies 143 */ 144 145 #if defined(NETINET) || defined(NETISO) 146 # define SMTP 1 /* enable user and server SMTP */ 147 # define QUEUE 1 /* enable queueing */ 148 # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 149 #endif 150 151 152 /* 153 ** Arrange to use either varargs or stdargs 154 */ 155 156 # ifdef __STDC__ 157 158 # include <stdarg.h> 159 160 # define VA_LOCAL_DECL va_list ap; 161 # define VA_START(f) va_start(ap, f) 162 # define VA_END va_end(ap) 163 164 # else 165 166 # include <varargs.h> 167 168 # define VA_LOCAL_DECL va_list ap; 169 # define VA_START(f) va_start(ap) 170 # define VA_END va_end(ap) 171 172 # endif 173 174 #ifdef HASUNAME 175 # include <sys/utsname.h> 176 # ifdef newstr 177 # undef newstr 178 # endif 179 #else /* ! HASUNAME */ 180 # define NODE_LENGTH 32 181 struct utsname 182 { 183 char nodename[NODE_LENGTH+1]; 184 }; 185 #endif /* HASUNAME */ 186 187 #ifndef MAXHOSTNAMELEN 188 #define MAXHOSTNAMELEN 256 189 #endif 190 191 #if !defined(SIGCHLD) && defined(SIGCLD) 192 # define SIGCHLD SIGCLD 193 #endif 194 195 #ifndef STDIN_FILENO 196 #define STDIN_FILENO 0 197 #endif 198 199 #ifndef STDOUT_FILENO 200 #define STDOUT_FILENO 1 201 #endif 202 203 #ifndef STDERR_FILENO 204 #define STDERR_FILENO 2 205 #endif 206 207 #ifdef LOCKF 208 #define LOCK_SH 0x01 /* shared lock */ 209 #define LOCK_EX 0x02 /* exclusive lock */ 210 #define LOCK_NB 0x04 /* non-blocking lock */ 211 #define LOCK_UN 0x08 /* unlock */ 212 213 #else 214 215 # include <sys/file.h> 216 217 #endif 218 219 /* 220 ** Size of tobuf (deliver.c) 221 ** Tweak this to match your syslog implementation. It will have to 222 ** allow for the extra information printed. 223 */ 224 225 #ifndef TOBUFSIZE 226 # define TOBUFSIZE (1024 - 256) 227 #endif 228