conf.h revision 102533
1129198Scognet/*
2129198Scognet * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
3129198Scognet *	All rights reserved.
4129198Scognet * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
5129198Scognet * Copyright (c) 1988, 1993
6129198Scognet *	The Regents of the University of California.  All rights reserved.
7129198Scognet *
8129198Scognet * By using this file, you agree to the terms and conditions set
9129198Scognet * forth in the LICENSE file which can be found at the top level of
10129198Scognet * the sendmail distribution.
11129198Scognet *
12129198Scognet *
13129198Scognet *	$Id: conf.h,v 8.563 2002/06/04 02:13:50 geir Exp $
14129198Scognet */
15129198Scognet
16129198Scognet/*
17129198Scognet**  CONF.H -- All user-configurable parameters for sendmail
18129198Scognet**
19129198Scognet**	Send updates to sendmail@Sendmail.ORG so they will be
20129198Scognet**	included in the next release.
21129198Scognet*/
22129198Scognet
23129198Scognet/* $FreeBSD: head/contrib/sendmail/src/conf.h 102533 2002-08-28 18:12:33Z gshapiro $ */
24129198Scognet
25129198Scognet#ifndef CONF_H
26129198Scognet#define CONF_H 1
27129198Scognet
28129198Scognet#ifdef __GNUC__
29129198Scognetstruct rusage;	/* forward declaration to get gcc to shut up in wait.h */
30129198Scognet#endif /* __GNUC__ */
31129198Scognet
32129198Scognet# include <sys/param.h>
33129198Scognet# include <sys/types.h>
34129198Scognet# include <sys/stat.h>
35129198Scognet# ifndef __QNX__
36129198Scognet/* in QNX this grabs bogus LOCK_* manifests */
37129198Scognet#  include <sys/file.h>
38129198Scognet# endif /* ! __QNX__ */
39129198Scognet# include <sys/wait.h>
40129198Scognet# include <limits.h>
41129198Scognet# include <fcntl.h>
42129198Scognet# 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**  Default database permissions (alias, maps, etc.)
140**	Used by sendmail and libsmdb
141*/
142
143#ifndef DBMMODE
144# define DBMMODE	0640
145#endif /* ! DBMMODE */
146
147
148/**********************************************************************
149**  Compilation options.
150**	#define these to 1 if they are available;
151**	#define them to 0 otherwise.
152**  All can be overridden from Makefile.
153**********************************************************************/
154
155#ifndef NETINET
156# define NETINET	1	/* include internet support */
157#endif /* ! NETINET */
158
159#ifndef NETINET6
160# define NETINET6	0	/* do not include IPv6 support */
161#endif /* ! NETINET6 */
162
163#ifndef NETISO
164# define NETISO	0		/* do not include ISO socket support */
165#endif /* ! NETISO */
166
167#ifndef NAMED_BIND
168# define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
169#endif /* ! NAMED_BIND */
170
171#ifndef XDEBUG
172# define XDEBUG		1	/* enable extended debugging */
173#endif /* ! XDEBUG */
174
175#ifndef MATCHGECOS
176# define MATCHGECOS	1	/* match user names from gecos field */
177#endif /* ! MATCHGECOS */
178
179#ifndef DSN
180# define DSN		1	/* include delivery status notification code */
181#endif /* ! DSN */
182
183#if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD))
184# define USERDB		1	/* look in user database */
185#endif /* !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) */
186
187#ifndef MIME8TO7
188# define MIME8TO7	1	/* 8->7 bit MIME conversions */
189#endif /* ! MIME8TO7 */
190
191#ifndef MIME7TO8
192# define MIME7TO8	1	/* 7->8 bit MIME conversions */
193#endif /* ! MIME7TO8 */
194
195#if NAMED_BIND
196# ifndef DNSMAP
197#  define DNSMAP	1	/* DNS map type */
198# endif /* ! DNSMAP */
199#endif /* NAMED_BIND */
200
201#ifndef PIPELINING
202# define PIPELINING	1	/* SMTP PIPELINING */
203#endif /* PIPELINING */
204
205/**********************************************************************
206**  End of site-specific configuration.
207**********************************************************************/
208
209#include <sm/conf.h>
210
211#endif /* ! CONF_H */
212