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