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