conf.h revision 363466
1254885Sdumbbell/*
2254885Sdumbbell * Copyright (c) 1998-2002 Proofpoint, Inc. and its suppliers.
3254885Sdumbbell *	All rights reserved.
4254885Sdumbbell * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
5254885Sdumbbell * Copyright (c) 1988, 1993
6254885Sdumbbell *	The Regents of the University of California.  All rights reserved.
7254885Sdumbbell *
8254885Sdumbbell * By using this file, you agree to the terms and conditions set
9254885Sdumbbell * forth in the LICENSE file which can be found at the top level of
10254885Sdumbbell * the sendmail distribution.
11254885Sdumbbell *
12254885Sdumbbell *
13254885Sdumbbell *	$Id: conf.h,v 8.577 2013-11-22 20:51:55 ca Exp $
14254885Sdumbbell */
15254885Sdumbbell
16254885Sdumbbell/*
17254885Sdumbbell**  CONF.H -- All user-configurable parameters for sendmail
18254885Sdumbbell**
19254885Sdumbbell**	Send updates to sendmail-YYYY@support.sendmail.org
20254885Sdumbbell**	(replace YYYY with the current year)
21254885Sdumbbell**	so they will be included in the next release.
22254885Sdumbbell*/
23254885Sdumbbell
24254885Sdumbbell#ifndef CONF_H
25254885Sdumbbell#define CONF_H 1
26254885Sdumbbell
27254885Sdumbbell#ifdef __GNUC__
28254885Sdumbbellstruct rusage;	/* forward declaration to get gcc to shut up in wait.h */
29254885Sdumbbell#endif
30254885Sdumbbell
31254885Sdumbbell# include <sys/param.h>
32254885Sdumbbell# include <sys/types.h>
33254885Sdumbbell# include <sys/stat.h>
34254885Sdumbbell# ifndef __QNX__
35254885Sdumbbell/* in QNX this grabs bogus LOCK_* manifests */
36254885Sdumbbell#  include <sys/file.h>
37254885Sdumbbell# endif
38254885Sdumbbell# include <sys/wait.h>
39254885Sdumbbell# include <limits.h>
40254885Sdumbbell# include <fcntl.h>
41254885Sdumbbell# include <signal.h>
42254885Sdumbbell# include <netdb.h>
43254885Sdumbbell# include <pwd.h>
44254885Sdumbbell# include <grp.h>
45254885Sdumbbell
46254885Sdumbbell/* make sure TOBUFSIZ isn't larger than system limit for size of exec() args */
47254885Sdumbbell#ifdef ARG_MAX
48254885Sdumbbell# if ARG_MAX > 4096
49254885Sdumbbell#  define SM_ARG_MAX	4096
50254885Sdumbbell# else
51254885Sdumbbell#  define SM_ARG_MAX	ARG_MAX
52254885Sdumbbell# endif
53254885Sdumbbell#else
54254885Sdumbbell# define SM_ARG_MAX	4096
55254885Sdumbbell#endif
56254885Sdumbbell
57254885Sdumbbell/**********************************************************************
58254885Sdumbbell**  Table sizes, etc....
59254885Sdumbbell**	There shouldn't be much need to change these....
60254885Sdumbbell**	If you do, be careful, none should be set anywhere near INT_MAX
61254885Sdumbbell**********************************************************************/
62254885Sdumbbell
63254885Sdumbbell#define MAXLINE		2048	/* max line length */
64254885Sdumbbell#if SASL
65254885Sdumbbell# define MAXINPLINE	12288	/* max input line length (for AUTH) */
66254885Sdumbbell#else
67254885Sdumbbell# define MAXINPLINE	MAXLINE	/* max input line length */
68254885Sdumbbell#endif
69254885Sdumbbell#define MAXNAME		256	/* max length of a name */
70254885Sdumbbell#ifndef MAXAUTHINFO
71254885Sdumbbell# define MAXAUTHINFO	100	/* max length of authinfo token */
72254885Sdumbbell#endif
73254885Sdumbbell#define MAXPV		256	/* max # of parms to mailers */
74254885Sdumbbell#define MAXATOM		1000	/* max atoms per address */
75254885Sdumbbell#define MAXRWSETS	200	/* max # of sets of rewriting rules */
76254885Sdumbbell#define MAXPRIORITIES	25	/* max values for Precedence: field */
77254885Sdumbbell#define MAXMXHOSTS	100	/* max # of MX records for one host */
78254885Sdumbbell#define SMTPLINELIM	990	/* max SMTP line length */
79254885Sdumbbell#define MAXUDBKEY	128	/* max size of a database key (udb only) */
80254885Sdumbbell#define MAXKEY		1024	/* max size of a database key */
81254885Sdumbbell#define MEMCHUNKSIZE	1024	/* chunk size for memory allocation */
82254885Sdumbbell#define MAXUSERENVIRON	100	/* max envars saved, must be >= 3 */
83254885Sdumbbell#define MAXMAPSTACK	12	/* max # of stacked or sequenced maps */
84254885Sdumbbell#if MILTER
85254885Sdumbbell# define MAXFILTERS	25	/* max # of milter filters */
86254885Sdumbbell# define MAXFILTERMACROS 50	/* max # of macros per milter cmd */
87254885Sdumbbell#endif
88254885Sdumbbell#define MAXSMTPARGS	20	/* max # of ESMTP args for MAIL/RCPT */
89254885Sdumbbell#define MAXTOCLASS	8	/* max # of message timeout classes */
90254885Sdumbbell#define MAXRESTOTYPES	3	/* max # of resolver timeout types */
91254885Sdumbbell#define MAXMIMEARGS	20	/* max args in Content-Type: */
92254885Sdumbbell#define MAXMIMENESTING	20	/* max MIME multipart nesting */
93254885Sdumbbell#define QUEUESEGSIZE	1000	/* increment for queue size */
94254885Sdumbbell
95254885Sdumbbell#ifndef MAXNOOPCOMMANDS
96254885Sdumbbell# define MAXNOOPCOMMANDS 20	/* max "noise" commands before slowdown */
97254885Sdumbbell#endif
98254885Sdumbbell
99254885Sdumbbell/*
100254885Sdumbbell**  MAXQFNAME == 2 (size of "qf", "df" prefix)
101254885Sdumbbell**	+ 8 (base 60 encoded date, time & sequence number)
102254885Sdumbbell**	+ 10 (base 10 encoded 32 bit process id)
103254885Sdumbbell**	+ 1 (terminating NUL character).
104254885Sdumbbell*/
105254885Sdumbbell
106254885Sdumbbell#define MAXQFNAME	21		/* max qf file name length + 1 */
107254885Sdumbbell#define MACBUFSIZE	4096		/* max expanded macro buffer size */
108254885Sdumbbell#define TOBUFSIZE	SM_ARG_MAX	/* max buffer to hold address list */
109254885Sdumbbell#define MAXSHORTSTR	203		/* max short string length */
110254885Sdumbbell#define MAXMACNAMELEN	25		/* max macro name length */
111254885Sdumbbell#define MAXMACROID	0377		/* max macro id number */
112254885Sdumbbell					/* Must match (BITMAPBITS - 1) */
113254885Sdumbbell#ifndef MAXHDRSLEN
114254885Sdumbbell# define MAXHDRSLEN	(32 * 1024)	/* max size of message headers */
115254885Sdumbbell#endif
116254885Sdumbbell#ifndef MAXDAEMONS
117254885Sdumbbell# define MAXDAEMONS	10		/* max number of ports to listen to */
118254885Sdumbbell	/* XREF: conf.c: MAXDAEMONS != 10 */
119254885Sdumbbell#endif
120254885Sdumbbell#ifndef MAXINTERFACES
121254885Sdumbbell# define MAXINTERFACES	512		/* number of interfaces to probe */
122254885Sdumbbell#endif
123254885Sdumbbell#ifndef MAXSYMLINKS
124254885Sdumbbell# define MAXSYMLINKS	32		/* max number of symlinks in a path */
125254885Sdumbbell#endif
126254885Sdumbbell#define MAXLINKPATHLEN	(MAXPATHLEN * MAXSYMLINKS) /* max link-expanded file */
127254885Sdumbbell#define DATA_PROGRESS_TIMEOUT	300	/* how often to check DATA progress */
128254885Sdumbbell#define ENHSCLEN	10		/* max len of enhanced status code */
129254885Sdumbbell#define DEFAULT_MAX_RCPT	100	/* max number of RCPTs per envelope */
130254885Sdumbbell#ifndef MAXQUEUEGROUPS
131254885Sdumbbell# define MAXQUEUEGROUPS	50		/* max # of queue groups */
132254885Sdumbbell	/* must be less than BITMAPBITS for DoQueueRun */
133254885Sdumbbell#endif
134254885Sdumbbell#if MAXQUEUEGROUPS >= BITMAPBITS
135254885Sdumbbell  ERROR _MAXQUEUEGROUPS must be less than _BITMAPBITS
136254885Sdumbbell#endif
137254885Sdumbbell
138254885Sdumbbell#ifndef MAXWORKGROUPS
139254885Sdumbbell# define MAXWORKGROUPS	50		/* max # of work groups */
140254885Sdumbbell#endif
141254885Sdumbbell
142254885Sdumbbell#define MAXFILESYS	BITMAPBITS	/* max # of queue file systems
143254885Sdumbbell					 * must be <= BITMAPBITS */
144254885Sdumbbell#ifndef FILESYS_UPDATE_INTERVAL
145254885Sdumbbell# define FILESYS_UPDATE_INTERVAL 300	/* how often to update FileSys table */
146254885Sdumbbell#endif
147254885Sdumbbell
148254885Sdumbbell#ifndef SM_DEFAULT_TTL
149254885Sdumbbell# define SM_DEFAULT_TTL 3600 /* default TTL for services that don't have one */
150254885Sdumbbell#endif
151254885Sdumbbell
152254885Sdumbbell#if SASL
153254885Sdumbbell# ifndef AUTH_MECHANISMS
154254885Sdumbbell#  if STARTTLS
155254885Sdumbbell#   define AUTH_MECHANISMS	"EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
156254885Sdumbbell#  else
157254885Sdumbbell#   define AUTH_MECHANISMS	"GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
158254885Sdumbbell#  endif
159254885Sdumbbell# endif /* ! AUTH_MECHANISMS */
160254885Sdumbbell#endif /* SASL */
161254885Sdumbbell
162254885Sdumbbell/*
163254885Sdumbbell**  Default database permissions (alias, maps, etc.)
164254885Sdumbbell**	Used by sendmail and libsmdb
165254885Sdumbbell*/
166254885Sdumbbell
167254885Sdumbbell#ifndef DBMMODE
168254885Sdumbbell# define DBMMODE	0640
169254885Sdumbbell#endif
170254885Sdumbbell
171254885Sdumbbell/*
172254885Sdumbbell**  Value which means a uid or gid value should not change
173254885Sdumbbell*/
174254885Sdumbbell
175254885Sdumbbell#ifndef NO_UID
176254885Sdumbbell# define NO_UID		-1
177254885Sdumbbell#endif
178254885Sdumbbell#ifndef NO_GID
179254885Sdumbbell# define NO_GID		-1
180254885Sdumbbell#endif
181254885Sdumbbell
182254885Sdumbbell/**********************************************************************
183254885Sdumbbell**  Compilation options.
184254885Sdumbbell**	#define these to 1 if they are available;
185254885Sdumbbell**	#define them to 0 otherwise.
186254885Sdumbbell**  All can be overridden from Makefile.
187254885Sdumbbell**********************************************************************/
188254885Sdumbbell
189254885Sdumbbell#ifndef NETINET
190254885Sdumbbell# define NETINET	1	/* include internet support */
191254885Sdumbbell#endif
192254885Sdumbbell
193254885Sdumbbell#ifndef NETINET6
194254885Sdumbbell# define NETINET6	0	/* do not include IPv6 support */
195254885Sdumbbell#endif
196254885Sdumbbell
197254885Sdumbbell#ifndef NETISO
198254885Sdumbbell# define NETISO	0		/* do not include ISO socket support */
199254885Sdumbbell#endif
200254885Sdumbbell
201254885Sdumbbell#ifndef NAMED_BIND
202254885Sdumbbell# define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
203254885Sdumbbell#endif
204254885Sdumbbell
205254885Sdumbbell#ifndef XDEBUG
206254885Sdumbbell# define XDEBUG		1	/* enable extended debugging */
207254885Sdumbbell#endif
208254885Sdumbbell
209254885Sdumbbell#ifndef MATCHGECOS
210254885Sdumbbell# define MATCHGECOS	1	/* match user names from gecos field */
211254885Sdumbbell#endif
212254885Sdumbbell
213254885Sdumbbell#ifndef DSN
214254885Sdumbbell# define DSN		1	/* include delivery status notification code */
215254885Sdumbbell#endif
216254885Sdumbbell
217254885Sdumbbell#if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD))
218254885Sdumbbell# define USERDB		1	/* look in user database */
219254885Sdumbbell#endif
220254885Sdumbbell
221254885Sdumbbell#ifndef MIME8TO7
222254885Sdumbbell# define MIME8TO7	1	/* 8->7 bit MIME conversions */
223254885Sdumbbell#endif
224254885Sdumbbell
225254885Sdumbbell#ifndef MIME7TO8
226254885Sdumbbell# define MIME7TO8	1	/* 7->8 bit MIME conversions */
227254885Sdumbbell#endif
228254885Sdumbbell
229254885Sdumbbell#if NAMED_BIND
230254885Sdumbbell# ifndef DNSMAP
231254885Sdumbbell#  define DNSMAP	1	/* DNS map type */
232254885Sdumbbell# endif
233254885Sdumbbell#endif
234254885Sdumbbell
235254885Sdumbbell#ifndef PIPELINING
236254885Sdumbbell# define PIPELINING	1	/* SMTP PIPELINING */
237254885Sdumbbell#endif
238254885Sdumbbell
239254885Sdumbbell/**********************************************************************
240254885Sdumbbell**  End of site-specific configuration.
241254885Sdumbbell**********************************************************************/
242254885Sdumbbell
243254885Sdumbbell#if CDB >= 2
244254885Sdumbbell# define CDBEXT ".db"
245254885Sdumbbell# define CDBext "db"
246254885Sdumbbell#else
247254885Sdumbbell# define CDBEXT ".cdb"
248254885Sdumbbell# define CDBext "cdb"
249254885Sdumbbell#endif
250254885Sdumbbell
251254885Sdumbbell#include <sm/conf.h>
252254885Sdumbbell
253254885Sdumbbell#endif /* ! CONF_H */
254254885Sdumbbell