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*445f2479Sjbeck * $Id: conf.h,v 8.570 2005/12/09 18:37:27 ca Exp $ 147c478bd9Sstevel@tonic-gate */ 157c478bd9Sstevel@tonic-gate 167c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 177c478bd9Sstevel@tonic-gate 187c478bd9Sstevel@tonic-gate /* 197c478bd9Sstevel@tonic-gate ** CONF.H -- All user-configurable parameters for sendmail 207c478bd9Sstevel@tonic-gate ** 217c478bd9Sstevel@tonic-gate ** Send updates to sendmail@Sendmail.ORG so they will be 227c478bd9Sstevel@tonic-gate ** included in the next release. 237c478bd9Sstevel@tonic-gate */ 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gate #ifndef CONF_H 267c478bd9Sstevel@tonic-gate #define CONF_H 1 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate #ifdef __GNUC__ 297c478bd9Sstevel@tonic-gate struct rusage; /* forward declaration to get gcc to shut up in wait.h */ 307c478bd9Sstevel@tonic-gate #endif /* __GNUC__ */ 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate # include <sys/param.h> 337c478bd9Sstevel@tonic-gate # include <sys/types.h> 347c478bd9Sstevel@tonic-gate # include <sys/stat.h> 357c478bd9Sstevel@tonic-gate # ifndef __QNX__ 367c478bd9Sstevel@tonic-gate /* in QNX this grabs bogus LOCK_* manifests */ 377c478bd9Sstevel@tonic-gate # include <sys/file.h> 387c478bd9Sstevel@tonic-gate # endif /* ! __QNX__ */ 397c478bd9Sstevel@tonic-gate # include <sys/wait.h> 407c478bd9Sstevel@tonic-gate # include <limits.h> 417c478bd9Sstevel@tonic-gate # include <fcntl.h> 427c478bd9Sstevel@tonic-gate # include <signal.h> 437c478bd9Sstevel@tonic-gate # include <netdb.h> 447c478bd9Sstevel@tonic-gate # include <pwd.h> 457c478bd9Sstevel@tonic-gate # include <grp.h> 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gate /* make sure TOBUFSIZ isn't larger than system limit for size of exec() args */ 487c478bd9Sstevel@tonic-gate #ifdef ARG_MAX 497c478bd9Sstevel@tonic-gate # if ARG_MAX > 4096 507c478bd9Sstevel@tonic-gate # define SM_ARG_MAX 4096 517c478bd9Sstevel@tonic-gate # else /* ARG_MAX > 4096 */ 527c478bd9Sstevel@tonic-gate # define SM_ARG_MAX ARG_MAX 537c478bd9Sstevel@tonic-gate # endif /* ARG_MAX > 4096 */ 547c478bd9Sstevel@tonic-gate #else /* ARG_MAX */ 557c478bd9Sstevel@tonic-gate # define SM_ARG_MAX 4096 567c478bd9Sstevel@tonic-gate #endif /* ARG_MAX */ 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gate /********************************************************************** 597c478bd9Sstevel@tonic-gate ** Table sizes, etc.... 607c478bd9Sstevel@tonic-gate ** There shouldn't be much need to change these.... 617c478bd9Sstevel@tonic-gate ** If you do, be careful, none should be set anywhere near INT_MAX 627c478bd9Sstevel@tonic-gate **********************************************************************/ 637c478bd9Sstevel@tonic-gate 6449218d4fSjbeck #define MAXLINE 2048 /* max line length */ 6549218d4fSjbeck #define MAXNAME 256 /* max length of a name */ 667c478bd9Sstevel@tonic-gate #ifndef MAXAUTHINFO 6749218d4fSjbeck # define MAXAUTHINFO 100 /* max length of authinfo token */ 687c478bd9Sstevel@tonic-gate #endif /* ! MAXAUTHINFO */ 6949218d4fSjbeck #define MAXPV 256 /* max # of parms to mailers */ 7049218d4fSjbeck #define MAXATOM 1000 /* max atoms per address */ 7149218d4fSjbeck #define MAXRWSETS 200 /* max # of sets of rewriting rules */ 7249218d4fSjbeck #define MAXPRIORITIES 25 /* max values for Precedence: field */ 7349218d4fSjbeck #define MAXMXHOSTS 100 /* max # of MX records for one host */ 7449218d4fSjbeck #define SMTPLINELIM 990 /* max SMTP line length */ 7549218d4fSjbeck #define MAXUDBKEY 128 /* max size of a database key (udb only) */ 76*445f2479Sjbeck #if _FFR_MAXKEY 77*445f2479Sjbeck # define MAXKEY 1024 /* max size of a database key */ 78*445f2479Sjbeck #else /* _FFR_MAXKEY */ 79*445f2479Sjbeck # define MAXKEY (MAXNAME + 1) /* max size of a database key */ 80*445f2479Sjbeck #endif /* _FFR_MAXKEY */ 8149218d4fSjbeck #define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 8249218d4fSjbeck #define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 8349218d4fSjbeck #define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 847c478bd9Sstevel@tonic-gate #if MILTER 8549218d4fSjbeck # define MAXFILTERS 25 /* max # of milter filters */ 8649218d4fSjbeck # define MAXFILTERMACROS 50 /* max # of macros per milter cmd */ 877c478bd9Sstevel@tonic-gate #endif /* MILTER */ 8849218d4fSjbeck #define MAXSMTPARGS 20 /* max # of ESMTP args for MAIL/RCPT */ 8949218d4fSjbeck #define MAXTOCLASS 8 /* max # of message timeout classes */ 9049218d4fSjbeck #define MAXRESTOTYPES 3 /* max # of resolver timeout types */ 9149218d4fSjbeck #define MAXMIMEARGS 20 /* max args in Content-Type: */ 9249218d4fSjbeck #define MAXMIMENESTING 20 /* max MIME multipart nesting */ 9349218d4fSjbeck #define QUEUESEGSIZE 1000 /* increment for queue size */ 947c478bd9Sstevel@tonic-gate 95*445f2479Sjbeck #ifndef MAXNOOPCOMMANDS 96*445f2479Sjbeck # define MAXNOOPCOMMANDS 20 /* max "noise" commands before slowdown */ 97*445f2479Sjbeck #endif /* ! MAXNOOPCOMMANDS */ 98*445f2479Sjbeck 997c478bd9Sstevel@tonic-gate /* 1007c478bd9Sstevel@tonic-gate ** MAXQFNAME == 2 (size of "qf", "df" prefix) 1017c478bd9Sstevel@tonic-gate ** + 8 (base 60 encoded date, time & sequence number) 1027c478bd9Sstevel@tonic-gate ** + 10 (base 10 encoded 32 bit process id) 1037c478bd9Sstevel@tonic-gate ** + 1 (terminating NUL character). 1047c478bd9Sstevel@tonic-gate */ 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate #define MAXQFNAME 21 /* max qf file name length + 1 */ 1077c478bd9Sstevel@tonic-gate #define MACBUFSIZE 4096 /* max expanded macro buffer size */ 1087c478bd9Sstevel@tonic-gate #define TOBUFSIZE SM_ARG_MAX /* max buffer to hold address list */ 1097c478bd9Sstevel@tonic-gate #define MAXSHORTSTR 203 /* max short string length */ 1107c478bd9Sstevel@tonic-gate #define MAXMACNAMELEN 25 /* max macro name length */ 1117c478bd9Sstevel@tonic-gate #define MAXMACROID 0377 /* max macro id number */ 1127c478bd9Sstevel@tonic-gate /* Must match (BITMAPBITS - 1) */ 1137c478bd9Sstevel@tonic-gate #ifndef MAXHDRSLEN 1147c478bd9Sstevel@tonic-gate # define MAXHDRSLEN (32 * 1024) /* max size of message headers */ 1157c478bd9Sstevel@tonic-gate #endif /* ! MAXHDRSLEN */ 1167c478bd9Sstevel@tonic-gate #define MAXDAEMONS 10 /* max number of ports to listen to */ 1177c478bd9Sstevel@tonic-gate #ifndef MAXINTERFACES 1187c478bd9Sstevel@tonic-gate # define MAXINTERFACES 512 /* number of interfaces to probe */ 1197c478bd9Sstevel@tonic-gate #endif /* MAXINTERFACES */ 1207c478bd9Sstevel@tonic-gate #ifndef MAXSYMLINKS 1217c478bd9Sstevel@tonic-gate # define MAXSYMLINKS 32 /* max number of symlinks in a path */ 1227c478bd9Sstevel@tonic-gate #endif /* ! MAXSYMLINKS */ 1237c478bd9Sstevel@tonic-gate #define MAXLINKPATHLEN (MAXPATHLEN * MAXSYMLINKS) /* max link-expanded file */ 1247c478bd9Sstevel@tonic-gate #define DATA_PROGRESS_TIMEOUT 300 /* how often to check DATA progress */ 1257c478bd9Sstevel@tonic-gate #define ENHSCLEN 10 /* max len of enhanced status code */ 1267c478bd9Sstevel@tonic-gate #define DEFAULT_MAX_RCPT 100 /* max number of RCPTs per envelope */ 1277c478bd9Sstevel@tonic-gate #define MAXQUEUEGROUPS 50 /* max # of queue groups */ 1287c478bd9Sstevel@tonic-gate /* must be less than BITMAPBITS for DoQueueRun */ 1297c478bd9Sstevel@tonic-gate #define MAXWORKGROUPS 50 /* max # of work groups */ 1307c478bd9Sstevel@tonic-gate #define MAXFILESYS BITMAPBITS /* max # of queue file systems 1317c478bd9Sstevel@tonic-gate * must be <= BITMAPBITS */ 1327c478bd9Sstevel@tonic-gate #ifndef FILESYS_UPDATE_INTERVAL 1337c478bd9Sstevel@tonic-gate # define FILESYS_UPDATE_INTERVAL 300 /* how often to update FileSys table */ 1347c478bd9Sstevel@tonic-gate #endif /* FILESYS_UPDATE_INTERVAL */ 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate #ifndef SM_DEFAULT_TTL 1377c478bd9Sstevel@tonic-gate # define SM_DEFAULT_TTL 3600 /* default TTL for services that don't have one */ 1387c478bd9Sstevel@tonic-gate #endif /* SM_DEFAULT_TTL */ 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gate #if SASL 1417c478bd9Sstevel@tonic-gate # ifndef AUTH_MECHANISMS 1427c478bd9Sstevel@tonic-gate # if STARTTLS 1437c478bd9Sstevel@tonic-gate # define AUTH_MECHANISMS "EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5" 1447c478bd9Sstevel@tonic-gate # else /* STARTTLS */ 1457c478bd9Sstevel@tonic-gate # define AUTH_MECHANISMS "GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5" 1467c478bd9Sstevel@tonic-gate # endif /* STARTTLS */ 1477c478bd9Sstevel@tonic-gate # endif /* ! AUTH_MECHANISMS */ 1487c478bd9Sstevel@tonic-gate #endif /* SASL */ 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate /* 1517c478bd9Sstevel@tonic-gate ** Default database permissions (alias, maps, etc.) 1527c478bd9Sstevel@tonic-gate ** Used by sendmail and libsmdb 1537c478bd9Sstevel@tonic-gate */ 1547c478bd9Sstevel@tonic-gate 1557c478bd9Sstevel@tonic-gate #ifndef DBMMODE 1567c478bd9Sstevel@tonic-gate # define DBMMODE 0640 1577c478bd9Sstevel@tonic-gate #endif /* ! DBMMODE */ 1587c478bd9Sstevel@tonic-gate 1597c478bd9Sstevel@tonic-gate /* 1607c478bd9Sstevel@tonic-gate ** Value which means a uid or gid value should not change 1617c478bd9Sstevel@tonic-gate */ 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate #ifndef NO_UID 1647c478bd9Sstevel@tonic-gate # define NO_UID -1 1657c478bd9Sstevel@tonic-gate #endif /* ! NO_UID */ 1667c478bd9Sstevel@tonic-gate #ifndef NO_GID 1677c478bd9Sstevel@tonic-gate # define NO_GID -1 1687c478bd9Sstevel@tonic-gate #endif /* ! NO_GID */ 1697c478bd9Sstevel@tonic-gate 1707c478bd9Sstevel@tonic-gate /********************************************************************** 1717c478bd9Sstevel@tonic-gate ** Compilation options. 1727c478bd9Sstevel@tonic-gate ** #define these to 1 if they are available; 1737c478bd9Sstevel@tonic-gate ** #define them to 0 otherwise. 1747c478bd9Sstevel@tonic-gate ** All can be overridden from Makefile. 1757c478bd9Sstevel@tonic-gate **********************************************************************/ 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gate #ifndef NETINET 1787c478bd9Sstevel@tonic-gate # define NETINET 1 /* include internet support */ 1797c478bd9Sstevel@tonic-gate #endif /* ! NETINET */ 1807c478bd9Sstevel@tonic-gate 1817c478bd9Sstevel@tonic-gate #ifndef NETINET6 1827c478bd9Sstevel@tonic-gate # define NETINET6 0 /* do not include IPv6 support */ 1837c478bd9Sstevel@tonic-gate #endif /* ! NETINET6 */ 1847c478bd9Sstevel@tonic-gate 1857c478bd9Sstevel@tonic-gate #ifndef NETISO 1867c478bd9Sstevel@tonic-gate # define NETISO 0 /* do not include ISO socket support */ 1877c478bd9Sstevel@tonic-gate #endif /* ! NETISO */ 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate #ifndef NAMED_BIND 1907c478bd9Sstevel@tonic-gate # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 1917c478bd9Sstevel@tonic-gate #endif /* ! NAMED_BIND */ 1927c478bd9Sstevel@tonic-gate 1937c478bd9Sstevel@tonic-gate #ifndef XDEBUG 1947c478bd9Sstevel@tonic-gate # define XDEBUG 1 /* enable extended debugging */ 1957c478bd9Sstevel@tonic-gate #endif /* ! XDEBUG */ 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate #ifndef MATCHGECOS 1987c478bd9Sstevel@tonic-gate # define MATCHGECOS 1 /* match user names from gecos field */ 1997c478bd9Sstevel@tonic-gate #endif /* ! MATCHGECOS */ 2007c478bd9Sstevel@tonic-gate 2017c478bd9Sstevel@tonic-gate #ifndef DSN 2027c478bd9Sstevel@tonic-gate # define DSN 1 /* include delivery status notification code */ 2037c478bd9Sstevel@tonic-gate #endif /* ! DSN */ 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gate #if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) 2067c478bd9Sstevel@tonic-gate # define USERDB 1 /* look in user database */ 2077c478bd9Sstevel@tonic-gate #endif /* !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) */ 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate #ifndef MIME8TO7 2107c478bd9Sstevel@tonic-gate # define MIME8TO7 1 /* 8->7 bit MIME conversions */ 2117c478bd9Sstevel@tonic-gate #endif /* ! MIME8TO7 */ 2127c478bd9Sstevel@tonic-gate 2137c478bd9Sstevel@tonic-gate #ifndef MIME7TO8 2147c478bd9Sstevel@tonic-gate # define MIME7TO8 1 /* 7->8 bit MIME conversions */ 2157c478bd9Sstevel@tonic-gate #endif /* ! MIME7TO8 */ 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate #if NAMED_BIND 2187c478bd9Sstevel@tonic-gate # ifndef DNSMAP 2197c478bd9Sstevel@tonic-gate # define DNSMAP 1 /* DNS map type */ 2207c478bd9Sstevel@tonic-gate # endif /* ! DNSMAP */ 2217c478bd9Sstevel@tonic-gate #endif /* NAMED_BIND */ 2227c478bd9Sstevel@tonic-gate 2237c478bd9Sstevel@tonic-gate #ifndef PIPELINING 2247c478bd9Sstevel@tonic-gate # define PIPELINING 1 /* SMTP PIPELINING */ 2257c478bd9Sstevel@tonic-gate #endif /* PIPELINING */ 2267c478bd9Sstevel@tonic-gate 2277c478bd9Sstevel@tonic-gate /********************************************************************** 2287c478bd9Sstevel@tonic-gate ** End of site-specific configuration. 2297c478bd9Sstevel@tonic-gate **********************************************************************/ 2307c478bd9Sstevel@tonic-gate 2317c478bd9Sstevel@tonic-gate #include <sm/conf.h> 2327c478bd9Sstevel@tonic-gate 2337c478bd9Sstevel@tonic-gate #endif /* ! CONF_H */ 234