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