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