xref: /titanic_41/usr/src/cmd/sendmail/src/conf.h (revision 75eba5b6d79ed4d2ce3daf7b2806306b6b69a938)
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.575 2009/03/25 20:04:00 ca 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 #if SASL
64 # define MAXINPLINE	12288	/* max input line length (for AUTH) */
65 #else /* SASL */
66 # define MAXINPLINE	MAXLINE	/* max input line length */
67 #endif /* SASL */
68 #define MAXNAME		256	/* max length of a name */
69 #ifndef MAXAUTHINFO
70 # define MAXAUTHINFO	100	/* max length of authinfo token */
71 #endif /* ! MAXAUTHINFO */
72 #define MAXPV		256	/* max # of parms to mailers */
73 #define MAXATOM		1000	/* max atoms per address */
74 #define MAXRWSETS	200	/* max # of sets of rewriting rules */
75 #define MAXPRIORITIES	25	/* max values for Precedence: field */
76 #define MAXMXHOSTS	100	/* max # of MX records for one host */
77 #define SMTPLINELIM	990	/* max SMTP line length */
78 #define MAXUDBKEY	128	/* max size of a database key (udb only) */
79 #define MAXKEY		1024	/* max size of a database key */
80 #define MEMCHUNKSIZE	1024	/* chunk size for memory allocation */
81 #define MAXUSERENVIRON	100	/* max envars saved, must be >= 3 */
82 #define MAXMAPSTACK	12	/* max # of stacked or sequenced maps */
83 #if MILTER
84 # define MAXFILTERS	25	/* max # of milter filters */
85 # define MAXFILTERMACROS 50	/* max # of macros per milter cmd */
86 #endif /* MILTER */
87 #define MAXSMTPARGS	20	/* max # of ESMTP args for MAIL/RCPT */
88 #define MAXTOCLASS	8	/* max # of message timeout classes */
89 #define MAXRESTOTYPES	3	/* max # of resolver timeout types */
90 #define MAXMIMEARGS	20	/* max args in Content-Type: */
91 #define MAXMIMENESTING	20	/* max MIME multipart nesting */
92 #define QUEUESEGSIZE	1000	/* increment for queue size */
93 
94 #ifndef MAXNOOPCOMMANDS
95 # define MAXNOOPCOMMANDS 20	/* max "noise" commands before slowdown */
96 #endif /* ! MAXNOOPCOMMANDS */
97 
98 /*
99 **  MAXQFNAME == 2 (size of "qf", "df" prefix)
100 **	+ 8 (base 60 encoded date, time & sequence number)
101 **	+ 10 (base 10 encoded 32 bit process id)
102 **	+ 1 (terminating NUL character).
103 */
104 
105 #define MAXQFNAME	21		/* max qf file name length + 1 */
106 #define MACBUFSIZE	4096		/* max expanded macro buffer size */
107 #define TOBUFSIZE	SM_ARG_MAX	/* max buffer to hold address list */
108 #define MAXSHORTSTR	203		/* max short string length */
109 #define MAXMACNAMELEN	25		/* max macro name length */
110 #define MAXMACROID	0377		/* max macro id number */
111 					/* Must match (BITMAPBITS - 1) */
112 #ifndef MAXHDRSLEN
113 # define MAXHDRSLEN	(32 * 1024)	/* max size of message headers */
114 #endif /* ! MAXHDRSLEN */
115 #define MAXDAEMONS	10		/* max number of ports to listen to */
116 #ifndef MAXINTERFACES
117 # define MAXINTERFACES	512		/* number of interfaces to probe */
118 #endif /* MAXINTERFACES */
119 #ifndef MAXSYMLINKS
120 # define MAXSYMLINKS	32		/* max number of symlinks in a path */
121 #endif /* ! MAXSYMLINKS */
122 #define MAXLINKPATHLEN	(MAXPATHLEN * MAXSYMLINKS) /* max link-expanded file */
123 #define DATA_PROGRESS_TIMEOUT	300	/* how often to check DATA progress */
124 #define ENHSCLEN	10		/* max len of enhanced status code */
125 #define DEFAULT_MAX_RCPT	100	/* max number of RCPTs per envelope */
126 #ifndef MAXQUEUEGROUPS
127 # define MAXQUEUEGROUPS	50		/* max # of queue groups */
128 	/* must be less than BITMAPBITS for DoQueueRun */
129 #endif /* MAXQUEUEGROUPS */
130 #if MAXQUEUEGROUPS >= BITMAPBITS
131   ERROR _MAXQUEUEGROUPS must be less than _BITMAPBITS
132 #endif /* MAXQUEUEGROUPS >= BITMAPBITS */
133 
134 #ifndef MAXWORKGROUPS
135 # define MAXWORKGROUPS	50		/* max # of work groups */
136 #endif /* MAXWORKGROUPS */
137 
138 #define MAXFILESYS	BITMAPBITS	/* max # of queue file systems
139 					 * must be <= BITMAPBITS */
140 #ifndef FILESYS_UPDATE_INTERVAL
141 # define FILESYS_UPDATE_INTERVAL 300	/* how often to update FileSys table */
142 #endif /* FILESYS_UPDATE_INTERVAL */
143 
144 #ifndef SM_DEFAULT_TTL
145 # define SM_DEFAULT_TTL 3600 /* default TTL for services that don't have one */
146 #endif /* SM_DEFAULT_TTL */
147 
148 #if SASL
149 # ifndef AUTH_MECHANISMS
150 #  if STARTTLS
151 #   define AUTH_MECHANISMS	"EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
152 #  else /* STARTTLS */
153 #   define AUTH_MECHANISMS	"GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
154 #  endif /* STARTTLS */
155 # endif /* ! AUTH_MECHANISMS */
156 #endif /* SASL */
157 
158 /*
159 **  Default database permissions (alias, maps, etc.)
160 **	Used by sendmail and libsmdb
161 */
162 
163 #ifndef DBMMODE
164 # define DBMMODE	0640
165 #endif /* ! DBMMODE */
166 
167 /*
168 **  Value which means a uid or gid value should not change
169 */
170 
171 #ifndef NO_UID
172 # define NO_UID		-1
173 #endif /* ! NO_UID */
174 #ifndef NO_GID
175 # define NO_GID		-1
176 #endif /* ! NO_GID */
177 
178 /**********************************************************************
179 **  Compilation options.
180 **	#define these to 1 if they are available;
181 **	#define them to 0 otherwise.
182 **  All can be overridden from Makefile.
183 **********************************************************************/
184 
185 #ifndef NETINET
186 # define NETINET	1	/* include internet support */
187 #endif /* ! NETINET */
188 
189 #ifndef NETINET6
190 # define NETINET6	0	/* do not include IPv6 support */
191 #endif /* ! NETINET6 */
192 
193 #ifndef NETISO
194 # define NETISO	0		/* do not include ISO socket support */
195 #endif /* ! NETISO */
196 
197 #ifndef NAMED_BIND
198 # define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
199 #endif /* ! NAMED_BIND */
200 
201 #ifndef XDEBUG
202 # define XDEBUG		1	/* enable extended debugging */
203 #endif /* ! XDEBUG */
204 
205 #ifndef MATCHGECOS
206 # define MATCHGECOS	1	/* match user names from gecos field */
207 #endif /* ! MATCHGECOS */
208 
209 #ifndef DSN
210 # define DSN		1	/* include delivery status notification code */
211 #endif /* ! DSN */
212 
213 #if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD))
214 # define USERDB		1	/* look in user database */
215 #endif /* !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) */
216 
217 #ifndef MIME8TO7
218 # define MIME8TO7	1	/* 8->7 bit MIME conversions */
219 #endif /* ! MIME8TO7 */
220 
221 #ifndef MIME7TO8
222 # define MIME7TO8	1	/* 7->8 bit MIME conversions */
223 #endif /* ! MIME7TO8 */
224 
225 #if NAMED_BIND
226 # ifndef DNSMAP
227 #  define DNSMAP	1	/* DNS map type */
228 # endif /* ! DNSMAP */
229 #endif /* NAMED_BIND */
230 
231 #ifndef PIPELINING
232 # define PIPELINING	1	/* SMTP PIPELINING */
233 #endif /* PIPELINING */
234 
235 /**********************************************************************
236 **  End of site-specific configuration.
237 **********************************************************************/
238 
239 #include <sm/conf.h>
240 
241 #endif /* ! CONF_H */
242