xref: /freebsd/contrib/sendmail/src/conf.h (revision d39bd2c1388b520fcba9abed1932acacead60fba)
1c2aa98e2SPeter Wemm /*
25dd76dd0SGregory Neil Shapiro  * Copyright (c) 1998-2002 Proofpoint, 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  *
134313cc83SGregory Neil Shapiro  *	$Id: conf.h,v 8.577 2013-11-22 20:51:55 ca Exp $
14c2aa98e2SPeter Wemm  */
15c2aa98e2SPeter Wemm 
16c2aa98e2SPeter Wemm /*
17c2aa98e2SPeter Wemm **  CONF.H -- All user-configurable parameters for sendmail
18c2aa98e2SPeter Wemm **
195b0945b5SGregory Neil Shapiro **	Send updates to sendmail-YYYY@support.sendmail.org
205b0945b5SGregory Neil Shapiro **	(replace YYYY with the current year)
215b0945b5SGregory Neil Shapiro **	so they will be included in the next release.
22c2aa98e2SPeter Wemm */
23c2aa98e2SPeter Wemm 
243299c2f1SGregory Neil Shapiro #ifndef CONF_H
253299c2f1SGregory Neil Shapiro #define CONF_H 1
263299c2f1SGregory Neil Shapiro 
27c2aa98e2SPeter Wemm #ifdef __GNUC__
28c2aa98e2SPeter Wemm struct rusage;	/* forward declaration to get gcc to shut up in wait.h */
295b0945b5SGregory Neil Shapiro #endif
30c2aa98e2SPeter Wemm 
31c2aa98e2SPeter Wemm # include <sys/param.h>
32c2aa98e2SPeter Wemm # include <sys/types.h>
33c2aa98e2SPeter Wemm # include <sys/stat.h>
34c2aa98e2SPeter Wemm # ifndef __QNX__
35c2aa98e2SPeter Wemm /* in QNX this grabs bogus LOCK_* manifests */
36c2aa98e2SPeter Wemm #  include <sys/file.h>
375b0945b5SGregory Neil Shapiro # endif
38c2aa98e2SPeter Wemm # include <sys/wait.h>
39c2aa98e2SPeter Wemm # include <limits.h>
40c2aa98e2SPeter Wemm # include <fcntl.h>
41c2aa98e2SPeter Wemm # include <signal.h>
42c2aa98e2SPeter Wemm # include <netdb.h>
43c2aa98e2SPeter Wemm # include <pwd.h>
443299c2f1SGregory Neil Shapiro # include <grp.h>
453299c2f1SGregory Neil Shapiro 
463299c2f1SGregory Neil Shapiro /* make sure TOBUFSIZ isn't larger than system limit for size of exec() args */
473299c2f1SGregory Neil Shapiro #ifdef ARG_MAX
483299c2f1SGregory Neil Shapiro # if ARG_MAX > 4096
493299c2f1SGregory Neil Shapiro #  define SM_ARG_MAX	4096
505b0945b5SGregory Neil Shapiro # else
513299c2f1SGregory Neil Shapiro #  define SM_ARG_MAX	ARG_MAX
525b0945b5SGregory Neil Shapiro # endif
535b0945b5SGregory Neil Shapiro #else
543299c2f1SGregory Neil Shapiro # define SM_ARG_MAX	4096
555b0945b5SGregory Neil Shapiro #endif
56c2aa98e2SPeter Wemm 
57c2aa98e2SPeter Wemm /**********************************************************************
58c2aa98e2SPeter Wemm **  Table sizes, etc....
59c2aa98e2SPeter Wemm **	There shouldn't be much need to change these....
6012ed1c7cSGregory Neil Shapiro **	If you do, be careful, none should be set anywhere near INT_MAX
61c2aa98e2SPeter Wemm **********************************************************************/
62c2aa98e2SPeter Wemm 
63c2aa98e2SPeter Wemm #define MAXLINE		2048	/* max line length */
64951742c4SGregory Neil Shapiro #if SASL
65951742c4SGregory Neil Shapiro # define MAXINPLINE	12288	/* max input line length (for AUTH) */
665b0945b5SGregory Neil Shapiro #else
67951742c4SGregory Neil Shapiro # define MAXINPLINE	MAXLINE	/* max input line length */
685b0945b5SGregory Neil Shapiro #endif
69c2aa98e2SPeter Wemm #define MAXNAME		256	/* max length of a name */
702ef40764SGregory Neil Shapiro #ifndef MAXAUTHINFO
712ef40764SGregory Neil Shapiro # define MAXAUTHINFO	100	/* max length of authinfo token */
725b0945b5SGregory Neil Shapiro #endif
733299c2f1SGregory Neil Shapiro #define MAXPV		256	/* max # of parms to mailers */
743299c2f1SGregory Neil Shapiro #define MAXATOM		1000	/* max atoms per address */
75c2aa98e2SPeter Wemm #define MAXRWSETS	200	/* max # of sets of rewriting rules */
76c2aa98e2SPeter Wemm #define MAXPRIORITIES	25	/* max values for Precedence: field */
77c2aa98e2SPeter Wemm #define MAXMXHOSTS	100	/* max # of MX records for one host */
78567a2fc9SGregory Neil Shapiro #define SMTPLINELIM	990	/* max SMTP line length */
79567a2fc9SGregory Neil Shapiro #define MAXUDBKEY	128	/* max size of a database key (udb only) */
80567a2fc9SGregory Neil Shapiro #define MAXKEY		1024	/* max size of a database key */
81*d39bd2c1SGregory Neil Shapiro #define MEMCHUNKSIZE	4096	/* chunk size for memory allocation */
82*d39bd2c1SGregory Neil Shapiro #if MEMCHUNKSIZE < MAXLINE
83*d39bd2c1SGregory Neil Shapiro /* see usage in collect.c */
84*d39bd2c1SGregory Neil Shapiro # error "MEMCHUNKSIZE must be at least MAXLINE"
85*d39bd2c1SGregory Neil Shapiro #endif
86c2aa98e2SPeter Wemm #define MAXUSERENVIRON	100	/* max envars saved, must be >= 3 */
87c2aa98e2SPeter Wemm #define MAXMAPSTACK	12	/* max # of stacked or sequenced maps */
8812ed1c7cSGregory Neil Shapiro #if MILTER
893299c2f1SGregory Neil Shapiro # define MAXFILTERS	25	/* max # of milter filters */
903299c2f1SGregory Neil Shapiro # define MAXFILTERMACROS 50	/* max # of macros per milter cmd */
915b0945b5SGregory Neil Shapiro #endif
923299c2f1SGregory Neil Shapiro #define MAXSMTPARGS	20	/* max # of ESMTP args for MAIL/RCPT */
93c2aa98e2SPeter Wemm #define MAXTOCLASS	8	/* max # of message timeout classes */
943299c2f1SGregory Neil Shapiro #define MAXRESTOTYPES	3	/* max # of resolver timeout types */
95c2aa98e2SPeter Wemm #define MAXMIMEARGS	20	/* max args in Content-Type: */
96c2aa98e2SPeter Wemm #define MAXMIMENESTING	20	/* max MIME multipart nesting */
97c2aa98e2SPeter Wemm #define QUEUESEGSIZE	1000	/* increment for queue size */
9812ed1c7cSGregory Neil Shapiro 
99567a2fc9SGregory Neil Shapiro #ifndef MAXNOOPCOMMANDS
100567a2fc9SGregory Neil Shapiro # define MAXNOOPCOMMANDS 20	/* max "noise" commands before slowdown */
1015b0945b5SGregory Neil Shapiro #endif
102567a2fc9SGregory Neil Shapiro 
10312ed1c7cSGregory Neil Shapiro /*
10412ed1c7cSGregory Neil Shapiro **  MAXQFNAME == 2 (size of "qf", "df" prefix)
10512ed1c7cSGregory Neil Shapiro **	+ 8 (base 60 encoded date, time & sequence number)
10612ed1c7cSGregory Neil Shapiro **	+ 10 (base 10 encoded 32 bit process id)
10712ed1c7cSGregory Neil Shapiro **	+ 1 (terminating NUL character).
10812ed1c7cSGregory Neil Shapiro */
10912ed1c7cSGregory Neil Shapiro 
11012ed1c7cSGregory Neil Shapiro #define MAXQFNAME	21		/* max qf file name length + 1 */
111c2aa98e2SPeter Wemm #define MACBUFSIZE	4096		/* max expanded macro buffer size */
1123299c2f1SGregory Neil Shapiro #define TOBUFSIZE	SM_ARG_MAX	/* max buffer to hold address list */
113c2aa98e2SPeter Wemm #define MAXSHORTSTR	203		/* max short string length */
11476b7bf71SPeter Wemm #define MAXMACNAMELEN	25		/* max macro name length */
1153299c2f1SGregory Neil Shapiro #define MAXMACROID	0377		/* max macro id number */
1162fb4f839SGregory Neil Shapiro 	/* Must match (BITMAPBITS - 1), checked in macro.c */
117e01d6f61SPeter Wemm #ifndef MAXHDRSLEN
118e01d6f61SPeter Wemm # define MAXHDRSLEN	(32 * 1024)	/* max size of message headers */
1195b0945b5SGregory Neil Shapiro #endif
1205dd76dd0SGregory Neil Shapiro #ifndef MAXDAEMONS
1213299c2f1SGregory Neil Shapiro # define MAXDAEMONS	10		/* max number of ports to listen to */
1225b0945b5SGregory Neil Shapiro 	/* XREF: conf.c: MAXDAEMONS != 10 */
1235b0945b5SGregory Neil Shapiro #endif
1243299c2f1SGregory Neil Shapiro #ifndef MAXINTERFACES
1253299c2f1SGregory Neil Shapiro # define MAXINTERFACES	512		/* number of interfaces to probe */
1265b0945b5SGregory Neil Shapiro #endif
1273299c2f1SGregory Neil Shapiro #ifndef MAXSYMLINKS
1283299c2f1SGregory Neil Shapiro # define MAXSYMLINKS	32		/* max number of symlinks in a path */
1295b0945b5SGregory Neil Shapiro #endif
1303299c2f1SGregory Neil Shapiro #define MAXLINKPATHLEN	(MAXPATHLEN * MAXSYMLINKS) /* max link-expanded file */
13112ed1c7cSGregory Neil Shapiro #define DATA_PROGRESS_TIMEOUT	300	/* how often to check DATA progress */
1323299c2f1SGregory Neil Shapiro #define ENHSCLEN	10		/* max len of enhanced status code */
1333299c2f1SGregory Neil Shapiro #define DEFAULT_MAX_RCPT	100	/* max number of RCPTs per envelope */
1349bd497b8SGregory Neil Shapiro #ifndef MAXQUEUEGROUPS
13512ed1c7cSGregory Neil Shapiro # define MAXQUEUEGROUPS	50		/* max # of queue groups */
13612ed1c7cSGregory Neil Shapiro 	/* must be less than BITMAPBITS for DoQueueRun */
1375b0945b5SGregory Neil Shapiro #endif
1389bd497b8SGregory Neil Shapiro #if MAXQUEUEGROUPS >= BITMAPBITS
139*d39bd2c1SGregory Neil Shapiro # error "MAXQUEUEGROUPS must be less than BITMAPBITS"
1405b0945b5SGregory Neil Shapiro #endif
1419bd497b8SGregory Neil Shapiro 
1429bd497b8SGregory Neil Shapiro #ifndef MAXWORKGROUPS
14312ed1c7cSGregory Neil Shapiro # define MAXWORKGROUPS	50		/* max # of work groups */
1445b0945b5SGregory Neil Shapiro #endif
1459bd497b8SGregory Neil Shapiro 
14612ed1c7cSGregory Neil Shapiro #define MAXFILESYS	BITMAPBITS	/* max # of queue file systems
14712ed1c7cSGregory Neil Shapiro 					 * must be <= BITMAPBITS */
14812ed1c7cSGregory Neil Shapiro #ifndef FILESYS_UPDATE_INTERVAL
14912ed1c7cSGregory Neil Shapiro # define FILESYS_UPDATE_INTERVAL 300	/* how often to update FileSys table */
1505b0945b5SGregory Neil Shapiro #endif
15112ed1c7cSGregory Neil Shapiro 
15212ed1c7cSGregory Neil Shapiro #ifndef SM_DEFAULT_TTL
15312ed1c7cSGregory Neil Shapiro # define SM_DEFAULT_TTL 3600 /* default TTL for services that don't have one */
1545b0945b5SGregory Neil Shapiro #endif
1553299c2f1SGregory Neil Shapiro 
1563299c2f1SGregory Neil Shapiro #if SASL
1573299c2f1SGregory Neil Shapiro # ifndef AUTH_MECHANISMS
15812ed1c7cSGregory Neil Shapiro #  if STARTTLS
1593299c2f1SGregory Neil Shapiro #   define AUTH_MECHANISMS	"EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
1605b0945b5SGregory Neil Shapiro #  else
1613299c2f1SGregory Neil Shapiro #   define AUTH_MECHANISMS	"GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
1625b0945b5SGregory Neil Shapiro #  endif
1633299c2f1SGregory Neil Shapiro # endif /* ! AUTH_MECHANISMS */
1643299c2f1SGregory Neil Shapiro #endif /* SASL */
1653299c2f1SGregory Neil Shapiro 
16688ad41d4SGregory Neil Shapiro /*
16788ad41d4SGregory Neil Shapiro **  Default database permissions (alias, maps, etc.)
16888ad41d4SGregory Neil Shapiro **	Used by sendmail and libsmdb
16988ad41d4SGregory Neil Shapiro */
17088ad41d4SGregory Neil Shapiro 
17188ad41d4SGregory Neil Shapiro #ifndef DBMMODE
17288ad41d4SGregory Neil Shapiro # define DBMMODE	0640
1735b0945b5SGregory Neil Shapiro #endif
17488ad41d4SGregory Neil Shapiro 
175bfb62e91SGregory Neil Shapiro /*
176bfb62e91SGregory Neil Shapiro **  Value which means a uid or gid value should not change
177bfb62e91SGregory Neil Shapiro */
178bfb62e91SGregory Neil Shapiro 
179bfb62e91SGregory Neil Shapiro #ifndef NO_UID
180bfb62e91SGregory Neil Shapiro # define NO_UID		-1
1815b0945b5SGregory Neil Shapiro #endif
182bfb62e91SGregory Neil Shapiro #ifndef NO_GID
183bfb62e91SGregory Neil Shapiro # define NO_GID		-1
1845b0945b5SGregory Neil Shapiro #endif
18588ad41d4SGregory Neil Shapiro 
186c2aa98e2SPeter Wemm /**********************************************************************
187c2aa98e2SPeter Wemm **  Compilation options.
188c2aa98e2SPeter Wemm **	#define these to 1 if they are available;
189c2aa98e2SPeter Wemm **	#define them to 0 otherwise.
190c2aa98e2SPeter Wemm **  All can be overridden from Makefile.
191c2aa98e2SPeter Wemm **********************************************************************/
192c2aa98e2SPeter Wemm 
193c2aa98e2SPeter Wemm #ifndef NETINET
194c2aa98e2SPeter Wemm # define NETINET	1	/* include internet support */
1955b0945b5SGregory Neil Shapiro #endif
1963299c2f1SGregory Neil Shapiro 
1973299c2f1SGregory Neil Shapiro #ifndef NETINET6
1983299c2f1SGregory Neil Shapiro # define NETINET6	0	/* do not include IPv6 support */
1995b0945b5SGregory Neil Shapiro #endif
200c2aa98e2SPeter Wemm 
201c2aa98e2SPeter Wemm #ifndef NETISO
202c2aa98e2SPeter Wemm # define NETISO	0		/* do not include ISO socket support */
2035b0945b5SGregory Neil Shapiro #endif
204c2aa98e2SPeter Wemm 
205c2aa98e2SPeter Wemm #ifndef NAMED_BIND
206c2aa98e2SPeter Wemm # define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
2075b0945b5SGregory Neil Shapiro #endif
208c2aa98e2SPeter Wemm 
209c2aa98e2SPeter Wemm #ifndef XDEBUG
210c2aa98e2SPeter Wemm # define XDEBUG		1	/* enable extended debugging */
2115b0945b5SGregory Neil Shapiro #endif
212c2aa98e2SPeter Wemm 
213c2aa98e2SPeter Wemm #ifndef MATCHGECOS
214c2aa98e2SPeter Wemm # define MATCHGECOS	1	/* match user names from gecos field */
2155b0945b5SGregory Neil Shapiro #endif
216c2aa98e2SPeter Wemm 
217c2aa98e2SPeter Wemm #ifndef DSN
218c2aa98e2SPeter Wemm # define DSN		1	/* include delivery status notification code */
2195b0945b5SGregory Neil Shapiro #endif
220c2aa98e2SPeter Wemm 
221c2aa98e2SPeter Wemm #if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD))
222c2aa98e2SPeter Wemm # define USERDB		1	/* look in user database */
2235b0945b5SGregory Neil Shapiro #endif
224c2aa98e2SPeter Wemm 
225c2aa98e2SPeter Wemm #ifndef MIME8TO7
226c2aa98e2SPeter Wemm # define MIME8TO7	1	/* 8->7 bit MIME conversions */
2275b0945b5SGregory Neil Shapiro #endif
228c2aa98e2SPeter Wemm 
229c2aa98e2SPeter Wemm #ifndef MIME7TO8
230c2aa98e2SPeter Wemm # define MIME7TO8	1	/* 7->8 bit MIME conversions */
2315b0945b5SGregory Neil Shapiro #endif
232c2aa98e2SPeter Wemm 
23312ed1c7cSGregory Neil Shapiro #if NAMED_BIND
23412ed1c7cSGregory Neil Shapiro # ifndef DNSMAP
23512ed1c7cSGregory Neil Shapiro #  define DNSMAP	1	/* DNS map type */
2365b0945b5SGregory Neil Shapiro # endif
2375b0945b5SGregory Neil Shapiro #endif
238c2aa98e2SPeter Wemm 
23912ed1c7cSGregory Neil Shapiro #ifndef PIPELINING
24012ed1c7cSGregory Neil Shapiro # define PIPELINING	1	/* SMTP PIPELINING */
2415b0945b5SGregory Neil Shapiro #endif
242c2aa98e2SPeter Wemm 
243c2aa98e2SPeter Wemm /**********************************************************************
244c2aa98e2SPeter Wemm **  End of site-specific configuration.
245c2aa98e2SPeter Wemm **********************************************************************/
246c2aa98e2SPeter Wemm 
2475b0945b5SGregory Neil Shapiro #if CDB >= 2
2485b0945b5SGregory Neil Shapiro # define CDBEXT ".db"
2495b0945b5SGregory Neil Shapiro # define CDBext "db"
2505b0945b5SGregory Neil Shapiro #else
2515b0945b5SGregory Neil Shapiro # define CDBEXT ".cdb"
2525b0945b5SGregory Neil Shapiro # define CDBext "cdb"
2535b0945b5SGregory Neil Shapiro #endif
2545b0945b5SGregory Neil Shapiro 
25512ed1c7cSGregory Neil Shapiro #include <sm/conf.h>
256c2aa98e2SPeter Wemm 
25712ed1c7cSGregory Neil Shapiro #endif /* ! CONF_H */
258