xref: /freebsd/contrib/sendmail/src/conf.h (revision 9bd497b8354567454e075076d40c996e21bd6095)
1c2aa98e2SPeter Wemm /*
2320f00e7SGregory Neil Shapiro  * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
33299c2f1SGregory Neil Shapiro  *	All rights reserved.
4c2aa98e2SPeter Wemm  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
5c2aa98e2SPeter Wemm  * Copyright (c) 1988, 1993
6c2aa98e2SPeter Wemm  *	The Regents of the University of California.  All rights reserved.
7c2aa98e2SPeter Wemm  *
8c2aa98e2SPeter Wemm  * By using this file, you agree to the terms and conditions set
9c2aa98e2SPeter Wemm  * forth in the LICENSE file which can be found at the top level of
10c2aa98e2SPeter Wemm  * the sendmail distribution.
11c2aa98e2SPeter Wemm  *
12c2aa98e2SPeter Wemm  *
139bd497b8SGregory Neil Shapiro  *	$Id: conf.h,v 8.575 2009/03/25 20:04:00 ca Exp $
14c2aa98e2SPeter Wemm  */
15c2aa98e2SPeter Wemm 
16c2aa98e2SPeter Wemm /*
17c2aa98e2SPeter Wemm **  CONF.H -- All user-configurable parameters for sendmail
18c2aa98e2SPeter Wemm **
19c2aa98e2SPeter Wemm **	Send updates to sendmail@Sendmail.ORG so they will be
20c2aa98e2SPeter Wemm **	included in the next release.
21c2aa98e2SPeter Wemm */
22c2aa98e2SPeter Wemm 
233299c2f1SGregory Neil Shapiro #ifndef CONF_H
243299c2f1SGregory Neil Shapiro #define CONF_H 1
253299c2f1SGregory Neil Shapiro 
26c2aa98e2SPeter Wemm #ifdef __GNUC__
27c2aa98e2SPeter Wemm struct rusage;	/* forward declaration to get gcc to shut up in wait.h */
283299c2f1SGregory Neil Shapiro #endif /* __GNUC__ */
29c2aa98e2SPeter Wemm 
30c2aa98e2SPeter Wemm # include <sys/param.h>
31c2aa98e2SPeter Wemm # include <sys/types.h>
32c2aa98e2SPeter Wemm # include <sys/stat.h>
33c2aa98e2SPeter Wemm # ifndef __QNX__
34c2aa98e2SPeter Wemm /* in QNX this grabs bogus LOCK_* manifests */
35c2aa98e2SPeter Wemm #  include <sys/file.h>
363299c2f1SGregory Neil Shapiro # endif /* ! __QNX__ */
37c2aa98e2SPeter Wemm # include <sys/wait.h>
38c2aa98e2SPeter Wemm # include <limits.h>
39c2aa98e2SPeter Wemm # include <fcntl.h>
40c2aa98e2SPeter Wemm # include <signal.h>
41c2aa98e2SPeter Wemm # include <netdb.h>
42c2aa98e2SPeter Wemm # include <pwd.h>
433299c2f1SGregory Neil Shapiro # include <grp.h>
443299c2f1SGregory Neil Shapiro 
453299c2f1SGregory Neil Shapiro /* make sure TOBUFSIZ isn't larger than system limit for size of exec() args */
463299c2f1SGregory Neil Shapiro #ifdef ARG_MAX
473299c2f1SGregory Neil Shapiro # if ARG_MAX > 4096
483299c2f1SGregory Neil Shapiro #  define SM_ARG_MAX	4096
493299c2f1SGregory Neil Shapiro # else /* ARG_MAX > 4096 */
503299c2f1SGregory Neil Shapiro #  define SM_ARG_MAX	ARG_MAX
513299c2f1SGregory Neil Shapiro # endif /* ARG_MAX > 4096 */
523299c2f1SGregory Neil Shapiro #else /* ARG_MAX */
533299c2f1SGregory Neil Shapiro # define SM_ARG_MAX	4096
543299c2f1SGregory Neil Shapiro #endif /* ARG_MAX */
55c2aa98e2SPeter Wemm 
56c2aa98e2SPeter Wemm /**********************************************************************
57c2aa98e2SPeter Wemm **  Table sizes, etc....
58c2aa98e2SPeter Wemm **	There shouldn't be much need to change these....
5912ed1c7cSGregory Neil Shapiro **	If you do, be careful, none should be set anywhere near INT_MAX
60c2aa98e2SPeter Wemm **********************************************************************/
61c2aa98e2SPeter Wemm 
62c2aa98e2SPeter Wemm #define MAXLINE		2048	/* max line length */
63951742c4SGregory Neil Shapiro #if SASL
64951742c4SGregory Neil Shapiro # define MAXINPLINE	12288	/* max input line length (for AUTH) */
65951742c4SGregory Neil Shapiro #else /* SASL */
66951742c4SGregory Neil Shapiro # define MAXINPLINE	MAXLINE	/* max input line length */
67951742c4SGregory Neil Shapiro #endif /* SASL */
68c2aa98e2SPeter Wemm #define MAXNAME		256	/* max length of a name */
692ef40764SGregory Neil Shapiro #ifndef MAXAUTHINFO
702ef40764SGregory Neil Shapiro # define MAXAUTHINFO	100	/* max length of authinfo token */
712ef40764SGregory Neil Shapiro #endif /* ! MAXAUTHINFO */
723299c2f1SGregory Neil Shapiro #define MAXPV		256	/* max # of parms to mailers */
733299c2f1SGregory Neil Shapiro #define MAXATOM		1000	/* max atoms per address */
74c2aa98e2SPeter Wemm #define MAXRWSETS	200	/* max # of sets of rewriting rules */
75c2aa98e2SPeter Wemm #define MAXPRIORITIES	25	/* max values for Precedence: field */
76c2aa98e2SPeter Wemm #define MAXMXHOSTS	100	/* max # of MX records for one host */
77567a2fc9SGregory Neil Shapiro #define SMTPLINELIM	990	/* max SMTP line length */
78567a2fc9SGregory Neil Shapiro #define MAXUDBKEY	128	/* max size of a database key (udb only) */
79567a2fc9SGregory Neil Shapiro #define MAXKEY		1024	/* max size of a database key */
80c2aa98e2SPeter Wemm #define MEMCHUNKSIZE	1024	/* chunk size for memory allocation */
81c2aa98e2SPeter Wemm #define MAXUSERENVIRON	100	/* max envars saved, must be >= 3 */
82c2aa98e2SPeter Wemm #define MAXMAPSTACK	12	/* max # of stacked or sequenced maps */
8312ed1c7cSGregory Neil Shapiro #if MILTER
843299c2f1SGregory Neil Shapiro # define MAXFILTERS	25	/* max # of milter filters */
853299c2f1SGregory Neil Shapiro # define MAXFILTERMACROS 50	/* max # of macros per milter cmd */
8612ed1c7cSGregory Neil Shapiro #endif /* MILTER */
873299c2f1SGregory Neil Shapiro #define MAXSMTPARGS	20	/* max # of ESMTP args for MAIL/RCPT */
88c2aa98e2SPeter Wemm #define MAXTOCLASS	8	/* max # of message timeout classes */
893299c2f1SGregory Neil Shapiro #define MAXRESTOTYPES	3	/* max # of resolver timeout types */
90c2aa98e2SPeter Wemm #define MAXMIMEARGS	20	/* max args in Content-Type: */
91c2aa98e2SPeter Wemm #define MAXMIMENESTING	20	/* max MIME multipart nesting */
92c2aa98e2SPeter Wemm #define QUEUESEGSIZE	1000	/* increment for queue size */
9312ed1c7cSGregory Neil Shapiro 
94567a2fc9SGregory Neil Shapiro #ifndef MAXNOOPCOMMANDS
95567a2fc9SGregory Neil Shapiro # define MAXNOOPCOMMANDS 20	/* max "noise" commands before slowdown */
96567a2fc9SGregory Neil Shapiro #endif /* ! MAXNOOPCOMMANDS */
97567a2fc9SGregory Neil Shapiro 
9812ed1c7cSGregory Neil Shapiro /*
9912ed1c7cSGregory Neil Shapiro **  MAXQFNAME == 2 (size of "qf", "df" prefix)
10012ed1c7cSGregory Neil Shapiro **	+ 8 (base 60 encoded date, time & sequence number)
10112ed1c7cSGregory Neil Shapiro **	+ 10 (base 10 encoded 32 bit process id)
10212ed1c7cSGregory Neil Shapiro **	+ 1 (terminating NUL character).
10312ed1c7cSGregory Neil Shapiro */
10412ed1c7cSGregory Neil Shapiro 
10512ed1c7cSGregory Neil Shapiro #define MAXQFNAME	21		/* max qf file name length + 1 */
106c2aa98e2SPeter Wemm #define MACBUFSIZE	4096		/* max expanded macro buffer size */
1073299c2f1SGregory Neil Shapiro #define TOBUFSIZE	SM_ARG_MAX	/* max buffer to hold address list */
108c2aa98e2SPeter Wemm #define MAXSHORTSTR	203		/* max short string length */
10976b7bf71SPeter Wemm #define MAXMACNAMELEN	25		/* max macro name length */
1103299c2f1SGregory Neil Shapiro #define MAXMACROID	0377		/* max macro id number */
111c46d91b7SGregory Neil Shapiro 					/* Must match (BITMAPBITS - 1) */
112e01d6f61SPeter Wemm #ifndef MAXHDRSLEN
113e01d6f61SPeter Wemm # define MAXHDRSLEN	(32 * 1024)	/* max size of message headers */
1143299c2f1SGregory Neil Shapiro #endif /* ! MAXHDRSLEN */
1153299c2f1SGregory Neil Shapiro #define MAXDAEMONS	10		/* max number of ports to listen to */
1163299c2f1SGregory Neil Shapiro #ifndef MAXINTERFACES
1173299c2f1SGregory Neil Shapiro # define MAXINTERFACES	512		/* number of interfaces to probe */
1183299c2f1SGregory Neil Shapiro #endif /* MAXINTERFACES */
1193299c2f1SGregory Neil Shapiro #ifndef MAXSYMLINKS
1203299c2f1SGregory Neil Shapiro # define MAXSYMLINKS	32		/* max number of symlinks in a path */
1213299c2f1SGregory Neil Shapiro #endif /* ! MAXSYMLINKS */
1223299c2f1SGregory Neil Shapiro #define MAXLINKPATHLEN	(MAXPATHLEN * MAXSYMLINKS) /* max link-expanded file */
12312ed1c7cSGregory Neil Shapiro #define DATA_PROGRESS_TIMEOUT	300	/* how often to check DATA progress */
1243299c2f1SGregory Neil Shapiro #define ENHSCLEN	10		/* max len of enhanced status code */
1253299c2f1SGregory Neil Shapiro #define DEFAULT_MAX_RCPT	100	/* max number of RCPTs per envelope */
1269bd497b8SGregory Neil Shapiro #ifndef MAXQUEUEGROUPS
12712ed1c7cSGregory Neil Shapiro # define MAXQUEUEGROUPS	50		/* max # of queue groups */
12812ed1c7cSGregory Neil Shapiro 	/* must be less than BITMAPBITS for DoQueueRun */
1299bd497b8SGregory Neil Shapiro #endif /* MAXQUEUEGROUPS */
1309bd497b8SGregory Neil Shapiro #if MAXQUEUEGROUPS >= BITMAPBITS
1319bd497b8SGregory Neil Shapiro   ERROR _MAXQUEUEGROUPS must be less than _BITMAPBITS
1329bd497b8SGregory Neil Shapiro #endif /* MAXQUEUEGROUPS >= BITMAPBITS */
1339bd497b8SGregory Neil Shapiro 
1349bd497b8SGregory Neil Shapiro #ifndef MAXWORKGROUPS
13512ed1c7cSGregory Neil Shapiro # define MAXWORKGROUPS	50		/* max # of work groups */
1369bd497b8SGregory Neil Shapiro #endif /* MAXWORKGROUPS */
1379bd497b8SGregory Neil Shapiro 
13812ed1c7cSGregory Neil Shapiro #define MAXFILESYS	BITMAPBITS	/* max # of queue file systems
13912ed1c7cSGregory Neil Shapiro 					 * must be <= BITMAPBITS */
14012ed1c7cSGregory Neil Shapiro #ifndef FILESYS_UPDATE_INTERVAL
14112ed1c7cSGregory Neil Shapiro # define FILESYS_UPDATE_INTERVAL 300	/* how often to update FileSys table */
14212ed1c7cSGregory Neil Shapiro #endif /* FILESYS_UPDATE_INTERVAL */
14312ed1c7cSGregory Neil Shapiro 
14412ed1c7cSGregory Neil Shapiro #ifndef SM_DEFAULT_TTL
14512ed1c7cSGregory Neil Shapiro # define SM_DEFAULT_TTL 3600 /* default TTL for services that don't have one */
14612ed1c7cSGregory Neil Shapiro #endif /* SM_DEFAULT_TTL */
1473299c2f1SGregory Neil Shapiro 
1483299c2f1SGregory Neil Shapiro #if SASL
1493299c2f1SGregory Neil Shapiro # ifndef AUTH_MECHANISMS
15012ed1c7cSGregory Neil Shapiro #  if STARTTLS
1513299c2f1SGregory Neil Shapiro #   define AUTH_MECHANISMS	"EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
15212ed1c7cSGregory Neil Shapiro #  else /* STARTTLS */
1533299c2f1SGregory Neil Shapiro #   define AUTH_MECHANISMS	"GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
15412ed1c7cSGregory Neil Shapiro #  endif /* STARTTLS */
1553299c2f1SGregory Neil Shapiro # endif /* ! AUTH_MECHANISMS */
1563299c2f1SGregory Neil Shapiro #endif /* SASL */
1573299c2f1SGregory Neil Shapiro 
15888ad41d4SGregory Neil Shapiro /*
15988ad41d4SGregory Neil Shapiro **  Default database permissions (alias, maps, etc.)
16088ad41d4SGregory Neil Shapiro **	Used by sendmail and libsmdb
16188ad41d4SGregory Neil Shapiro */
16288ad41d4SGregory Neil Shapiro 
16388ad41d4SGregory Neil Shapiro #ifndef DBMMODE
16488ad41d4SGregory Neil Shapiro # define DBMMODE	0640
16588ad41d4SGregory Neil Shapiro #endif /* ! DBMMODE */
16688ad41d4SGregory Neil Shapiro 
167bfb62e91SGregory Neil Shapiro /*
168bfb62e91SGregory Neil Shapiro **  Value which means a uid or gid value should not change
169bfb62e91SGregory Neil Shapiro */
170bfb62e91SGregory Neil Shapiro 
171bfb62e91SGregory Neil Shapiro #ifndef NO_UID
172bfb62e91SGregory Neil Shapiro # define NO_UID		-1
173bfb62e91SGregory Neil Shapiro #endif /* ! NO_UID */
174bfb62e91SGregory Neil Shapiro #ifndef NO_GID
175bfb62e91SGregory Neil Shapiro # define NO_GID		-1
176bfb62e91SGregory Neil Shapiro #endif /* ! NO_GID */
17788ad41d4SGregory Neil Shapiro 
178c2aa98e2SPeter Wemm /**********************************************************************
179c2aa98e2SPeter Wemm **  Compilation options.
180c2aa98e2SPeter Wemm **	#define these to 1 if they are available;
181c2aa98e2SPeter Wemm **	#define them to 0 otherwise.
182c2aa98e2SPeter Wemm **  All can be overridden from Makefile.
183c2aa98e2SPeter Wemm **********************************************************************/
184c2aa98e2SPeter Wemm 
185c2aa98e2SPeter Wemm #ifndef NETINET
186c2aa98e2SPeter Wemm # define NETINET	1	/* include internet support */
1873299c2f1SGregory Neil Shapiro #endif /* ! NETINET */
1883299c2f1SGregory Neil Shapiro 
1893299c2f1SGregory Neil Shapiro #ifndef NETINET6
1903299c2f1SGregory Neil Shapiro # define NETINET6	0	/* do not include IPv6 support */
1913299c2f1SGregory Neil Shapiro #endif /* ! NETINET6 */
192c2aa98e2SPeter Wemm 
193c2aa98e2SPeter Wemm #ifndef NETISO
194c2aa98e2SPeter Wemm # define NETISO	0		/* do not include ISO socket support */
1953299c2f1SGregory Neil Shapiro #endif /* ! NETISO */
196c2aa98e2SPeter Wemm 
197c2aa98e2SPeter Wemm #ifndef NAMED_BIND
198c2aa98e2SPeter Wemm # define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
1993299c2f1SGregory Neil Shapiro #endif /* ! NAMED_BIND */
200c2aa98e2SPeter Wemm 
201c2aa98e2SPeter Wemm #ifndef XDEBUG
202c2aa98e2SPeter Wemm # define XDEBUG		1	/* enable extended debugging */
2033299c2f1SGregory Neil Shapiro #endif /* ! XDEBUG */
204c2aa98e2SPeter Wemm 
205c2aa98e2SPeter Wemm #ifndef MATCHGECOS
206c2aa98e2SPeter Wemm # define MATCHGECOS	1	/* match user names from gecos field */
2073299c2f1SGregory Neil Shapiro #endif /* ! MATCHGECOS */
208c2aa98e2SPeter Wemm 
209c2aa98e2SPeter Wemm #ifndef DSN
210c2aa98e2SPeter Wemm # define DSN		1	/* include delivery status notification code */
2113299c2f1SGregory Neil Shapiro #endif /* ! DSN */
212c2aa98e2SPeter Wemm 
213c2aa98e2SPeter Wemm #if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD))
214c2aa98e2SPeter Wemm # define USERDB		1	/* look in user database */
2153299c2f1SGregory Neil Shapiro #endif /* !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) */
216c2aa98e2SPeter Wemm 
217c2aa98e2SPeter Wemm #ifndef MIME8TO7
218c2aa98e2SPeter Wemm # define MIME8TO7	1	/* 8->7 bit MIME conversions */
2193299c2f1SGregory Neil Shapiro #endif /* ! MIME8TO7 */
220c2aa98e2SPeter Wemm 
221c2aa98e2SPeter Wemm #ifndef MIME7TO8
222c2aa98e2SPeter Wemm # define MIME7TO8	1	/* 7->8 bit MIME conversions */
2233299c2f1SGregory Neil Shapiro #endif /* ! MIME7TO8 */
224c2aa98e2SPeter Wemm 
22512ed1c7cSGregory Neil Shapiro #if NAMED_BIND
22612ed1c7cSGregory Neil Shapiro # ifndef DNSMAP
22712ed1c7cSGregory Neil Shapiro #  define DNSMAP	1	/* DNS map type */
22812ed1c7cSGregory Neil Shapiro # endif /* ! DNSMAP */
22912ed1c7cSGregory Neil Shapiro #endif /* NAMED_BIND */
230c2aa98e2SPeter Wemm 
23112ed1c7cSGregory Neil Shapiro #ifndef PIPELINING
23212ed1c7cSGregory Neil Shapiro # define PIPELINING	1	/* SMTP PIPELINING */
23312ed1c7cSGregory Neil Shapiro #endif /* PIPELINING */
234c2aa98e2SPeter Wemm 
235c2aa98e2SPeter Wemm /**********************************************************************
236c2aa98e2SPeter Wemm **  End of site-specific configuration.
237c2aa98e2SPeter Wemm **********************************************************************/
238c2aa98e2SPeter Wemm 
23912ed1c7cSGregory Neil Shapiro #include <sm/conf.h>
240c2aa98e2SPeter Wemm 
24112ed1c7cSGregory Neil Shapiro #endif /* ! CONF_H */
242