1 /* 2 * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 * 12 * 13 * $Id: conf.h,v 8.560 2002/03/15 06:01:54 geir Exp $ 14 */ 15 16 /* 17 ** CONF.H -- All user-configurable parameters for sendmail 18 ** 19 ** Send updates to sendmail@Sendmail.ORG so they will be 20 ** included in the next release. 21 */ 22 23 #ifndef CONF_H 24 #define CONF_H 1 25 26 #ifdef __GNUC__ 27 struct rusage; /* forward declaration to get gcc to shut up in wait.h */ 28 #endif /* __GNUC__ */ 29 30 # include <sys/param.h> 31 # include <sys/types.h> 32 # include <sys/stat.h> 33 # ifndef __QNX__ 34 /* in QNX this grabs bogus LOCK_* manifests */ 35 # include <sys/file.h> 36 # endif /* ! __QNX__ */ 37 # include <sys/wait.h> 38 # include <limits.h> 39 # include <fcntl.h> 40 # include <signal.h> 41 # include <netdb.h> 42 # include <pwd.h> 43 # include <grp.h> 44 45 /* make sure TOBUFSIZ isn't larger than system limit for size of exec() args */ 46 #ifdef ARG_MAX 47 # if ARG_MAX > 4096 48 # define SM_ARG_MAX 4096 49 # else /* ARG_MAX > 4096 */ 50 # define SM_ARG_MAX ARG_MAX 51 # endif /* ARG_MAX > 4096 */ 52 #else /* ARG_MAX */ 53 # define SM_ARG_MAX 4096 54 #endif /* ARG_MAX */ 55 56 /********************************************************************** 57 ** Table sizes, etc.... 58 ** There shouldn't be much need to change these.... 59 ** If you do, be careful, none should be set anywhere near INT_MAX 60 **********************************************************************/ 61 62 #define MAXLINE 2048 /* max line length */ 63 #define MAXNAME 256 /* max length of a name */ 64 #define MAXPV 256 /* max # of parms to mailers */ 65 #define MAXATOM 1000 /* max atoms per address */ 66 #define MAXRWSETS 200 /* max # of sets of rewriting rules */ 67 #define MAXPRIORITIES 25 /* max values for Precedence: field */ 68 #define MAXMXHOSTS 100 /* max # of MX records for one host */ 69 #define SMTPLINELIM 990 /* maximum SMTP line length */ 70 #define MAXKEY 128 /* maximum size of a database key */ 71 #define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 72 #define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 73 #define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 74 #if MILTER 75 # define MAXFILTERS 25 /* max # of milter filters */ 76 # define MAXFILTERMACROS 50 /* max # of macros per milter cmd */ 77 #endif /* MILTER */ 78 #define MAXSMTPARGS 20 /* max # of ESMTP args for MAIL/RCPT */ 79 #define MAXTOCLASS 8 /* max # of message timeout classes */ 80 #define MAXRESTOTYPES 3 /* max # of resolver timeout types */ 81 #define MAXMIMEARGS 20 /* max args in Content-Type: */ 82 #define MAXMIMENESTING 20 /* max MIME multipart nesting */ 83 #define QUEUESEGSIZE 1000 /* increment for queue size */ 84 85 /* 86 ** MAXQFNAME == 2 (size of "qf", "df" prefix) 87 ** + 8 (base 60 encoded date, time & sequence number) 88 ** + 10 (base 10 encoded 32 bit process id) 89 ** + 1 (terminating NUL character). 90 */ 91 92 #define MAXQFNAME 21 /* max qf file name length + 1 */ 93 #define MACBUFSIZE 4096 /* max expanded macro buffer size */ 94 #define TOBUFSIZE SM_ARG_MAX /* max buffer to hold address list */ 95 #define MAXSHORTSTR 203 /* max short string length */ 96 #define MAXMACNAMELEN 25 /* max macro name length */ 97 #define MAXMACROID 0377 /* max macro id number */ 98 /* Must match (BITMAPBITS - 1) */ 99 #ifndef MAXHDRSLEN 100 # define MAXHDRSLEN (32 * 1024) /* max size of message headers */ 101 #endif /* ! MAXHDRSLEN */ 102 #define MAXDAEMONS 10 /* max number of ports to listen to */ 103 #ifndef MAXINTERFACES 104 # define MAXINTERFACES 512 /* number of interfaces to probe */ 105 #endif /* MAXINTERFACES */ 106 #ifndef MAXSYMLINKS 107 # define MAXSYMLINKS 32 /* max number of symlinks in a path */ 108 #endif /* ! MAXSYMLINKS */ 109 #define MAXLINKPATHLEN (MAXPATHLEN * MAXSYMLINKS) /* max link-expanded file */ 110 #define DATA_PROGRESS_TIMEOUT 300 /* how often to check DATA progress */ 111 #define ENHSCLEN 10 /* max len of enhanced status code */ 112 #define DEFAULT_MAX_RCPT 100 /* max number of RCPTs per envelope */ 113 #define MAXQUEUEGROUPS 50 /* max # of queue groups */ 114 /* must be less than BITMAPBITS for DoQueueRun */ 115 #define MAXWORKGROUPS 50 /* max # of work groups */ 116 #define MAXFILESYS BITMAPBITS /* max # of queue file systems 117 * must be <= BITMAPBITS */ 118 #ifndef FILESYS_UPDATE_INTERVAL 119 # define FILESYS_UPDATE_INTERVAL 300 /* how often to update FileSys table */ 120 #endif /* FILESYS_UPDATE_INTERVAL */ 121 122 #ifndef SM_DEFAULT_TTL 123 # define SM_DEFAULT_TTL 3600 /* default TTL for services that don't have one */ 124 #endif /* SM_DEFAULT_TTL */ 125 126 #if SASL 127 # ifndef AUTH_MECHANISMS 128 # if STARTTLS 129 # define AUTH_MECHANISMS "EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5" 130 # else /* STARTTLS */ 131 # define AUTH_MECHANISMS "GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5" 132 # endif /* STARTTLS */ 133 # endif /* ! AUTH_MECHANISMS */ 134 #endif /* SASL */ 135 136 /********************************************************************** 137 ** Compilation options. 138 ** #define these to 1 if they are available; 139 ** #define them to 0 otherwise. 140 ** All can be overridden from Makefile. 141 **********************************************************************/ 142 143 #ifndef NETINET 144 # define NETINET 1 /* include internet support */ 145 #endif /* ! NETINET */ 146 147 #ifndef NETINET6 148 # define NETINET6 0 /* do not include IPv6 support */ 149 #endif /* ! NETINET6 */ 150 151 #ifndef NETISO 152 # define NETISO 0 /* do not include ISO socket support */ 153 #endif /* ! NETISO */ 154 155 #ifndef NAMED_BIND 156 # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 157 #endif /* ! NAMED_BIND */ 158 159 #ifndef XDEBUG 160 # define XDEBUG 1 /* enable extended debugging */ 161 #endif /* ! XDEBUG */ 162 163 #ifndef MATCHGECOS 164 # define MATCHGECOS 1 /* match user names from gecos field */ 165 #endif /* ! MATCHGECOS */ 166 167 #ifndef DSN 168 # define DSN 1 /* include delivery status notification code */ 169 #endif /* ! DSN */ 170 171 #if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) 172 # define USERDB 1 /* look in user database */ 173 #endif /* !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) */ 174 175 #ifndef MIME8TO7 176 # define MIME8TO7 1 /* 8->7 bit MIME conversions */ 177 #endif /* ! MIME8TO7 */ 178 179 #ifndef MIME7TO8 180 # define MIME7TO8 1 /* 7->8 bit MIME conversions */ 181 #endif /* ! MIME7TO8 */ 182 183 #if NAMED_BIND 184 # ifndef DNSMAP 185 # define DNSMAP 1 /* DNS map type */ 186 # endif /* ! DNSMAP */ 187 #endif /* NAMED_BIND */ 188 189 #ifndef PIPELINING 190 # define PIPELINING 1 /* SMTP PIPELINING */ 191 #endif /* PIPELINING */ 192 193 /********************************************************************** 194 ** End of site-specific configuration. 195 **********************************************************************/ 196 197 #include <sm/conf.h> 198 199 #endif /* ! CONF_H */ 200