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