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