xref: /illumos-gate/usr/src/cmd/sendmail/src/conf.h (revision e9af4bc0)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
37c478bd9Sstevel@tonic-gate  *	All rights reserved.
47c478bd9Sstevel@tonic-gate  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
57c478bd9Sstevel@tonic-gate  * Copyright (c) 1988, 1993
67c478bd9Sstevel@tonic-gate  *	The Regents of the University of California.  All rights reserved.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * By using this file, you agree to the terms and conditions set
97c478bd9Sstevel@tonic-gate  * forth in the LICENSE file which can be found at the top level of
107c478bd9Sstevel@tonic-gate  * the sendmail distribution.
117c478bd9Sstevel@tonic-gate  *
127c478bd9Sstevel@tonic-gate  *
13*e9af4bc0SJohn Beck  *	$Id: conf.h,v 8.575 2009/03/25 20:04:00 ca Exp $
147c478bd9Sstevel@tonic-gate  */
157c478bd9Sstevel@tonic-gate 
167c478bd9Sstevel@tonic-gate /*
177c478bd9Sstevel@tonic-gate **  CONF.H -- All user-configurable parameters for sendmail
187c478bd9Sstevel@tonic-gate **
197c478bd9Sstevel@tonic-gate **	Send updates to sendmail@Sendmail.ORG so they will be
207c478bd9Sstevel@tonic-gate **	included in the next release.
217c478bd9Sstevel@tonic-gate */
227c478bd9Sstevel@tonic-gate 
237c478bd9Sstevel@tonic-gate #ifndef CONF_H
247c478bd9Sstevel@tonic-gate #define CONF_H 1
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifdef __GNUC__
277c478bd9Sstevel@tonic-gate struct rusage;	/* forward declaration to get gcc to shut up in wait.h */
287c478bd9Sstevel@tonic-gate #endif /* __GNUC__ */
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate # include <sys/param.h>
317c478bd9Sstevel@tonic-gate # include <sys/types.h>
327c478bd9Sstevel@tonic-gate # include <sys/stat.h>
337c478bd9Sstevel@tonic-gate # ifndef __QNX__
347c478bd9Sstevel@tonic-gate /* in QNX this grabs bogus LOCK_* manifests */
357c478bd9Sstevel@tonic-gate #  include <sys/file.h>
367c478bd9Sstevel@tonic-gate # endif /* ! __QNX__ */
377c478bd9Sstevel@tonic-gate # include <sys/wait.h>
387c478bd9Sstevel@tonic-gate # include <limits.h>
397c478bd9Sstevel@tonic-gate # include <fcntl.h>
407c478bd9Sstevel@tonic-gate # include <signal.h>
417c478bd9Sstevel@tonic-gate # include <netdb.h>
427c478bd9Sstevel@tonic-gate # include <pwd.h>
437c478bd9Sstevel@tonic-gate # include <grp.h>
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate /* make sure TOBUFSIZ isn't larger than system limit for size of exec() args */
467c478bd9Sstevel@tonic-gate #ifdef ARG_MAX
477c478bd9Sstevel@tonic-gate # if ARG_MAX > 4096
487c478bd9Sstevel@tonic-gate #  define SM_ARG_MAX	4096
497c478bd9Sstevel@tonic-gate # else /* ARG_MAX > 4096 */
507c478bd9Sstevel@tonic-gate #  define SM_ARG_MAX	ARG_MAX
517c478bd9Sstevel@tonic-gate # endif /* ARG_MAX > 4096 */
527c478bd9Sstevel@tonic-gate #else /* ARG_MAX */
537c478bd9Sstevel@tonic-gate # define SM_ARG_MAX	4096
547c478bd9Sstevel@tonic-gate #endif /* ARG_MAX */
557c478bd9Sstevel@tonic-gate 
567c478bd9Sstevel@tonic-gate /**********************************************************************
577c478bd9Sstevel@tonic-gate **  Table sizes, etc....
587c478bd9Sstevel@tonic-gate **	There shouldn't be much need to change these....
597c478bd9Sstevel@tonic-gate **	If you do, be careful, none should be set anywhere near INT_MAX
607c478bd9Sstevel@tonic-gate **********************************************************************/
617c478bd9Sstevel@tonic-gate 
6249218d4fSjbeck #define MAXLINE		2048	/* max line length */
63058561cbSjbeck #if SASL
64058561cbSjbeck # define MAXINPLINE	12288	/* max input line length (for AUTH) */
65058561cbSjbeck #else /* SASL */
66058561cbSjbeck # define MAXINPLINE	MAXLINE	/* max input line length */
67058561cbSjbeck #endif /* SASL */
6849218d4fSjbeck #define MAXNAME		256	/* max length of a name */
697c478bd9Sstevel@tonic-gate #ifndef MAXAUTHINFO
7049218d4fSjbeck # define MAXAUTHINFO	100	/* max length of authinfo token */
717c478bd9Sstevel@tonic-gate #endif /* ! MAXAUTHINFO */
7249218d4fSjbeck #define MAXPV		256	/* max # of parms to mailers */
7349218d4fSjbeck #define MAXATOM		1000	/* max atoms per address */
7449218d4fSjbeck #define MAXRWSETS	200	/* max # of sets of rewriting rules */
7549218d4fSjbeck #define MAXPRIORITIES	25	/* max values for Precedence: field */
7649218d4fSjbeck #define MAXMXHOSTS	100	/* max # of MX records for one host */
7749218d4fSjbeck #define SMTPLINELIM	990	/* max SMTP line length */
7849218d4fSjbeck #define MAXUDBKEY	128	/* max size of a database key (udb only) */
79058561cbSjbeck #define MAXKEY		1024	/* max size of a database key */
8049218d4fSjbeck #define MEMCHUNKSIZE	1024	/* chunk size for memory allocation */
8149218d4fSjbeck #define MAXUSERENVIRON	100	/* max envars saved, must be >= 3 */
8249218d4fSjbeck #define MAXMAPSTACK	12	/* max # of stacked or sequenced maps */
837c478bd9Sstevel@tonic-gate #if MILTER
8449218d4fSjbeck # define MAXFILTERS	25	/* max # of milter filters */
8549218d4fSjbeck # define MAXFILTERMACROS 50	/* max # of macros per milter cmd */
867c478bd9Sstevel@tonic-gate #endif /* MILTER */
8749218d4fSjbeck #define MAXSMTPARGS	20	/* max # of ESMTP args for MAIL/RCPT */
8849218d4fSjbeck #define MAXTOCLASS	8	/* max # of message timeout classes */
8949218d4fSjbeck #define MAXRESTOTYPES	3	/* max # of resolver timeout types */
9049218d4fSjbeck #define MAXMIMEARGS	20	/* max args in Content-Type: */
9149218d4fSjbeck #define MAXMIMENESTING	20	/* max MIME multipart nesting */
9249218d4fSjbeck #define QUEUESEGSIZE	1000	/* increment for queue size */
937c478bd9Sstevel@tonic-gate 
94445f2479Sjbeck #ifndef MAXNOOPCOMMANDS
95445f2479Sjbeck # define MAXNOOPCOMMANDS 20	/* max "noise" commands before slowdown */
96445f2479Sjbeck #endif /* ! MAXNOOPCOMMANDS */
97445f2479Sjbeck 
987c478bd9Sstevel@tonic-gate /*
997c478bd9Sstevel@tonic-gate **  MAXQFNAME == 2 (size of "qf", "df" prefix)
1007c478bd9Sstevel@tonic-gate **	+ 8 (base 60 encoded date, time & sequence number)
1017c478bd9Sstevel@tonic-gate **	+ 10 (base 10 encoded 32 bit process id)
1027c478bd9Sstevel@tonic-gate **	+ 1 (terminating NUL character).
1037c478bd9Sstevel@tonic-gate */
1047c478bd9Sstevel@tonic-gate 
1057c478bd9Sstevel@tonic-gate #define MAXQFNAME	21		/* max qf file name length + 1 */
1067c478bd9Sstevel@tonic-gate #define MACBUFSIZE	4096		/* max expanded macro buffer size */
1077c478bd9Sstevel@tonic-gate #define TOBUFSIZE	SM_ARG_MAX	/* max buffer to hold address list */
1087c478bd9Sstevel@tonic-gate #define MAXSHORTSTR	203		/* max short string length */
1097c478bd9Sstevel@tonic-gate #define MAXMACNAMELEN	25		/* max macro name length */
1107c478bd9Sstevel@tonic-gate #define MAXMACROID	0377		/* max macro id number */
1117c478bd9Sstevel@tonic-gate 					/* Must match (BITMAPBITS - 1) */
1127c478bd9Sstevel@tonic-gate #ifndef MAXHDRSLEN
1137c478bd9Sstevel@tonic-gate # define MAXHDRSLEN	(32 * 1024)	/* max size of message headers */
1147c478bd9Sstevel@tonic-gate #endif /* ! MAXHDRSLEN */
1157c478bd9Sstevel@tonic-gate #define MAXDAEMONS	10		/* max number of ports to listen to */
1167c478bd9Sstevel@tonic-gate #ifndef MAXINTERFACES
1177c478bd9Sstevel@tonic-gate # define MAXINTERFACES	512		/* number of interfaces to probe */
1187c478bd9Sstevel@tonic-gate #endif /* MAXINTERFACES */
1197c478bd9Sstevel@tonic-gate #ifndef MAXSYMLINKS
1207c478bd9Sstevel@tonic-gate # define MAXSYMLINKS	32		/* max number of symlinks in a path */
1217c478bd9Sstevel@tonic-gate #endif /* ! MAXSYMLINKS */
1227c478bd9Sstevel@tonic-gate #define MAXLINKPATHLEN	(MAXPATHLEN * MAXSYMLINKS) /* max link-expanded file */
1237c478bd9Sstevel@tonic-gate #define DATA_PROGRESS_TIMEOUT	300	/* how often to check DATA progress */
1247c478bd9Sstevel@tonic-gate #define ENHSCLEN	10		/* max len of enhanced status code */
1257c478bd9Sstevel@tonic-gate #define DEFAULT_MAX_RCPT	100	/* max number of RCPTs per envelope */
126*e9af4bc0SJohn Beck #ifndef MAXQUEUEGROUPS
127*e9af4bc0SJohn Beck # define MAXQUEUEGROUPS	50		/* max # of queue groups */
1287c478bd9Sstevel@tonic-gate 	/* must be less than BITMAPBITS for DoQueueRun */
129*e9af4bc0SJohn Beck #endif /* MAXQUEUEGROUPS */
130*e9af4bc0SJohn Beck #if MAXQUEUEGROUPS >= BITMAPBITS
131*e9af4bc0SJohn Beck   ERROR _MAXQUEUEGROUPS must be less than _BITMAPBITS
132*e9af4bc0SJohn Beck #endif /* MAXQUEUEGROUPS >= BITMAPBITS */
133*e9af4bc0SJohn Beck 
134*e9af4bc0SJohn Beck #ifndef MAXWORKGROUPS
135*e9af4bc0SJohn Beck # define MAXWORKGROUPS	50		/* max # of work groups */
136*e9af4bc0SJohn Beck #endif /* MAXWORKGROUPS */
137*e9af4bc0SJohn Beck 
1387c478bd9Sstevel@tonic-gate #define MAXFILESYS	BITMAPBITS	/* max # of queue file systems
1397c478bd9Sstevel@tonic-gate 					 * must be <= BITMAPBITS */
1407c478bd9Sstevel@tonic-gate #ifndef FILESYS_UPDATE_INTERVAL
1417c478bd9Sstevel@tonic-gate # define FILESYS_UPDATE_INTERVAL 300	/* how often to update FileSys table */
1427c478bd9Sstevel@tonic-gate #endif /* FILESYS_UPDATE_INTERVAL */
1437c478bd9Sstevel@tonic-gate 
1447c478bd9Sstevel@tonic-gate #ifndef SM_DEFAULT_TTL
1457c478bd9Sstevel@tonic-gate # define SM_DEFAULT_TTL 3600 /* default TTL for services that don't have one */
1467c478bd9Sstevel@tonic-gate #endif /* SM_DEFAULT_TTL */
1477c478bd9Sstevel@tonic-gate 
1487c478bd9Sstevel@tonic-gate #if SASL
1497c478bd9Sstevel@tonic-gate # ifndef AUTH_MECHANISMS
1507c478bd9Sstevel@tonic-gate #  if STARTTLS
1517c478bd9Sstevel@tonic-gate #   define AUTH_MECHANISMS	"EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
1527c478bd9Sstevel@tonic-gate #  else /* STARTTLS */
1537c478bd9Sstevel@tonic-gate #   define AUTH_MECHANISMS	"GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5"
1547c478bd9Sstevel@tonic-gate #  endif /* STARTTLS */
1557c478bd9Sstevel@tonic-gate # endif /* ! AUTH_MECHANISMS */
1567c478bd9Sstevel@tonic-gate #endif /* SASL */
1577c478bd9Sstevel@tonic-gate 
1587c478bd9Sstevel@tonic-gate /*
1597c478bd9Sstevel@tonic-gate **  Default database permissions (alias, maps, etc.)
1607c478bd9Sstevel@tonic-gate **	Used by sendmail and libsmdb
1617c478bd9Sstevel@tonic-gate */
1627c478bd9Sstevel@tonic-gate 
1637c478bd9Sstevel@tonic-gate #ifndef DBMMODE
1647c478bd9Sstevel@tonic-gate # define DBMMODE	0640
1657c478bd9Sstevel@tonic-gate #endif /* ! DBMMODE */
1667c478bd9Sstevel@tonic-gate 
1677c478bd9Sstevel@tonic-gate /*
1687c478bd9Sstevel@tonic-gate **  Value which means a uid or gid value should not change
1697c478bd9Sstevel@tonic-gate */
1707c478bd9Sstevel@tonic-gate 
1717c478bd9Sstevel@tonic-gate #ifndef NO_UID
1727c478bd9Sstevel@tonic-gate # define NO_UID		-1
1737c478bd9Sstevel@tonic-gate #endif /* ! NO_UID */
1747c478bd9Sstevel@tonic-gate #ifndef NO_GID
1757c478bd9Sstevel@tonic-gate # define NO_GID		-1
1767c478bd9Sstevel@tonic-gate #endif /* ! NO_GID */
1777c478bd9Sstevel@tonic-gate 
1787c478bd9Sstevel@tonic-gate /**********************************************************************
1797c478bd9Sstevel@tonic-gate **  Compilation options.
1807c478bd9Sstevel@tonic-gate **	#define these to 1 if they are available;
1817c478bd9Sstevel@tonic-gate **	#define them to 0 otherwise.
1827c478bd9Sstevel@tonic-gate **  All can be overridden from Makefile.
1837c478bd9Sstevel@tonic-gate **********************************************************************/
1847c478bd9Sstevel@tonic-gate 
1857c478bd9Sstevel@tonic-gate #ifndef NETINET
1867c478bd9Sstevel@tonic-gate # define NETINET	1	/* include internet support */
1877c478bd9Sstevel@tonic-gate #endif /* ! NETINET */
1887c478bd9Sstevel@tonic-gate 
1897c478bd9Sstevel@tonic-gate #ifndef NETINET6
1907c478bd9Sstevel@tonic-gate # define NETINET6	0	/* do not include IPv6 support */
1917c478bd9Sstevel@tonic-gate #endif /* ! NETINET6 */
1927c478bd9Sstevel@tonic-gate 
1937c478bd9Sstevel@tonic-gate #ifndef NETISO
1947c478bd9Sstevel@tonic-gate # define NETISO	0		/* do not include ISO socket support */
1957c478bd9Sstevel@tonic-gate #endif /* ! NETISO */
1967c478bd9Sstevel@tonic-gate 
1977c478bd9Sstevel@tonic-gate #ifndef NAMED_BIND
1987c478bd9Sstevel@tonic-gate # define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
1997c478bd9Sstevel@tonic-gate #endif /* ! NAMED_BIND */
2007c478bd9Sstevel@tonic-gate 
2017c478bd9Sstevel@tonic-gate #ifndef XDEBUG
2027c478bd9Sstevel@tonic-gate # define XDEBUG		1	/* enable extended debugging */
2037c478bd9Sstevel@tonic-gate #endif /* ! XDEBUG */
2047c478bd9Sstevel@tonic-gate 
2057c478bd9Sstevel@tonic-gate #ifndef MATCHGECOS
2067c478bd9Sstevel@tonic-gate # define MATCHGECOS	1	/* match user names from gecos field */
2077c478bd9Sstevel@tonic-gate #endif /* ! MATCHGECOS */
2087c478bd9Sstevel@tonic-gate 
2097c478bd9Sstevel@tonic-gate #ifndef DSN
2107c478bd9Sstevel@tonic-gate # define DSN		1	/* include delivery status notification code */
2117c478bd9Sstevel@tonic-gate #endif /* ! DSN */
2127c478bd9Sstevel@tonic-gate 
2137c478bd9Sstevel@tonic-gate #if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD))
2147c478bd9Sstevel@tonic-gate # define USERDB		1	/* look in user database */
2157c478bd9Sstevel@tonic-gate #endif /* !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) */
2167c478bd9Sstevel@tonic-gate 
2177c478bd9Sstevel@tonic-gate #ifndef MIME8TO7
2187c478bd9Sstevel@tonic-gate # define MIME8TO7	1	/* 8->7 bit MIME conversions */
2197c478bd9Sstevel@tonic-gate #endif /* ! MIME8TO7 */
2207c478bd9Sstevel@tonic-gate 
2217c478bd9Sstevel@tonic-gate #ifndef MIME7TO8
2227c478bd9Sstevel@tonic-gate # define MIME7TO8	1	/* 7->8 bit MIME conversions */
2237c478bd9Sstevel@tonic-gate #endif /* ! MIME7TO8 */
2247c478bd9Sstevel@tonic-gate 
2257c478bd9Sstevel@tonic-gate #if NAMED_BIND
2267c478bd9Sstevel@tonic-gate # ifndef DNSMAP
2277c478bd9Sstevel@tonic-gate #  define DNSMAP	1	/* DNS map type */
2287c478bd9Sstevel@tonic-gate # endif /* ! DNSMAP */
2297c478bd9Sstevel@tonic-gate #endif /* NAMED_BIND */
2307c478bd9Sstevel@tonic-gate 
2317c478bd9Sstevel@tonic-gate #ifndef PIPELINING
2327c478bd9Sstevel@tonic-gate # define PIPELINING	1	/* SMTP PIPELINING */
2337c478bd9Sstevel@tonic-gate #endif /* PIPELINING */
2347c478bd9Sstevel@tonic-gate 
2357c478bd9Sstevel@tonic-gate /**********************************************************************
2367c478bd9Sstevel@tonic-gate **  End of site-specific configuration.
2377c478bd9Sstevel@tonic-gate **********************************************************************/
2387c478bd9Sstevel@tonic-gate 
2397c478bd9Sstevel@tonic-gate #include <sm/conf.h>
2407c478bd9Sstevel@tonic-gate 
2417c478bd9Sstevel@tonic-gate #endif /* ! CONF_H */
242