Commit | Line | Data |
---|---|---|
5a739feb | 1 | /* |
dc45ba8c | 2 | * Copyright (c) 1983 Eric P. Allman |
31de980b KB |
3 | * Copyright (c) 1988, 1993 |
4 | * The Regents of the University of California. All rights reserved. | |
bee79b64 | 5 | * |
417f7a11 | 6 | * %sccs.include.redist.c% |
bee79b64 | 7 | * |
fd57f063 | 8 | * @(#)conf.h 8.3 (Berkeley) %G% |
bee79b64 | 9 | */ |
aeb2545d DF |
10 | |
11 | /* | |
12 | ** CONF.H -- All user-configurable parameters for sendmail | |
5a739feb EA |
13 | */ |
14 | ||
f43b04ce | 15 | # include <sys/param.h> |
46300693 | 16 | # include <sys/stat.h> |
f8a31c8e | 17 | # include <fcntl.h> |
f43b04ce | 18 | |
5a739feb EA |
19 | /* |
20 | ** Table sizes, etc.... | |
21 | ** There shouldn't be much need to change these.... | |
22 | */ | |
23 | ||
d36f8e5c | 24 | # define MAXLINE 2048 /* max line length */ |
f0a960f1 | 25 | # define MAXNAME 256 /* max length of a name */ |
5a739feb | 26 | # define MAXPV 40 /* max # of parms to mailers */ |
d36f8e5c | 27 | # define MAXATOM 200 /* max atoms per address */ |
5a739feb | 28 | # define MAXMAILERS 25 /* maximum mailers known to system */ |
8583ab39 | 29 | # define MAXRWSETS 100 /* max # of sets of rewriting rules */ |
5a739feb | 30 | # define MAXPRIORITIES 25 /* max values for Precedence: field */ |
8583ab39 | 31 | # define MAXMXHOSTS 20 /* max # of MX records */ |
8657d05f | 32 | # define SMTPLINELIM 990 /* maximum SMTP line length */ |
f43b04ce EA |
33 | # define MAXKEY 128 /* maximum size of a database key */ |
34 | # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ | |
b0b636d1 | 35 | # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ |
8e571338 | 36 | # define MAXIPADDR 16 /* max # of IP addrs for this host */ |
9f7134c8 | 37 | # define MAXALIASDB 12 /* max # of alias databases */ |
d36f8e5c | 38 | # define PSBUFSIZE (MAXLINE + MAXATOM) /* size of prescan buffer */ |
8583ab39 EA |
39 | |
40 | # ifndef QUEUESIZE | |
41 | # define QUEUESIZE 1000 /* max # of jobs per queue run */ | |
42 | # endif | |
43 | ||
5a739feb EA |
44 | /* |
45 | ** Compilation options. | |
9bcdff70 EA |
46 | ** |
47 | ** #define these if they are available; comment them out otherwise. | |
5a739feb EA |
48 | */ |
49 | ||
9bcdff70 | 50 | # define LOG 1 /* enable logging */ |
9bcdff70 | 51 | # define UGLYUUCP 1 /* output ugly UUCP From lines */ |
3356c77c | 52 | # define NETINET 1 /* include internet support */ |
9bcdff70 | 53 | # define SETPROCTITLE 1 /* munge argv to display current status */ |
35af2f06 | 54 | # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ |
7f0fd60b | 55 | # define MATCHGECOS 1 /* match user names from gecos field */ |
8e5c6745 | 56 | # define XDEBUG 1 /* enable extended debugging */ |
d25bb424 | 57 | |
273562d8 EA |
58 | # ifdef NEWDB |
59 | # define USERDB 1 /* look in user database (requires NEWDB) */ | |
5a4c03c6 EA |
60 | # endif |
61 | ||
62 | /* | |
e6245c7e EA |
63 | ** Operating system configuration. |
64 | ** | |
65 | ** Unless you are porting to a new OS, you shouldn't have to | |
66 | ** change these. | |
5a4c03c6 EA |
67 | */ |
68 | ||
fd57f063 | 69 | /* general "standard C" defines */ |
8e5c6745 EA |
70 | #ifdef __STDC__ |
71 | # define HASSETVBUF 1 /* yes, we have setvbuf in libc */ | |
72 | #endif | |
73 | ||
fd57f063 EA |
74 | /* general POSIX defines */ |
75 | #ifdef _POSIX_VERSION | |
76 | # define HASSETSID 1 /* has setsid(2) call */ | |
77 | #endif | |
78 | ||
79 | /* | |
80 | ** Per-Operating System defines | |
81 | */ | |
82 | ||
a419d027 | 83 | /* HP-UX -- tested for 8.07 */ |
8a47b280 | 84 | # ifdef __hpux |
fd57f063 | 85 | # define SYSTEM5 1 /* include all the System V defines */ |
45f49b73 | 86 | # define UNSETENV 1 /* need unsetenv(3) support */ |
fd57f063 EA |
87 | # define HASSETEUID 1 /* we have seteuid call */ |
88 | # define seteuid(uid) setresuid(-1, uid, -1) | |
89 | # ifndef __STDC__ | |
90 | # define HASSETVBUF 1 /* we have setvbuf in libc (but not __STDC__) */ | |
91 | # endif | |
273562d8 EA |
92 | # endif |
93 | ||
a419d027 EA |
94 | /* IBM AIX 3.x -- actually tested for 3.2.3 */ |
95 | # ifdef _AIX3 | |
9114f86c EA |
96 | # define LOCKF 1 /* use System V lockf instead of flock */ |
97 | # define FORK fork /* no vfork primitive available */ | |
45f49b73 | 98 | # define UNSETENV 1 /* need unsetenv(3) support */ |
8e5c6745 EA |
99 | # define SYS5TZ 1 /* use System V style timezones */ |
100 | # endif | |
101 | ||
102 | /* Silicon Graphics IRIX */ | |
103 | # ifdef IRIX | |
104 | # define FORK fork /* no vfork primitive available */ | |
105 | # define UNSETENV 1 /* need unsetenv(3) support */ | |
106 | # define setpgrp BSDsetpgrp | |
9114f86c EA |
107 | # endif |
108 | ||
fd57f063 | 109 | /* various systems from Sun Microsystems */ |
45f49b73 | 110 | #if defined(sun) && !defined(BSD) |
fd57f063 | 111 | |
45f49b73 | 112 | # define UNSETENV 1 /* need unsetenv(3) support */ |
45f49b73 | 113 | |
7b3820ed | 114 | # ifdef SOLARIS |
fd57f063 | 115 | /* Solaris 2.x */ |
7b3820ed | 116 | # define LOCKF 1 /* use System V lockf instead of flock */ |
7b3820ed | 117 | # define HASUSTAT 1 /* has the ustat(2) syscall */ |
fd57f063 EA |
118 | # define bcopy(s, d, l) (memmove((d), (s), (l))) |
119 | # define bzero(d, l) (memset((d), '\0', (l))) | |
120 | # define bcmp(s, d, l) (memcmp((s), (d), (l))) | |
121 | # include <sys/time.h> | |
122 | ||
7b3820ed | 123 | # else |
fd57f063 | 124 | /* SunOS 4.1.x */ |
7b3820ed | 125 | # define HASSTATFS 1 /* has the statfs(2) syscall */ |
fd57f063 | 126 | # define HASSETEUID 1 /* we have seteuid call */ |
45f49b73 | 127 | # include <vfork.h> |
45f49b73 | 128 | |
fd57f063 | 129 | # endif |
45f49b73 EA |
130 | #endif |
131 | ||
fd57f063 | 132 | /* Digital Ultrix 4.2A or 4.3 */ |
45f49b73 EA |
133 | #ifdef ultrix |
134 | # define HASSTATFS 1 /* has the statfs(2) syscall */ | |
fd57f063 | 135 | # define HASSETEUID 1 /* we have seteuid call */ |
e6245c7e EA |
136 | #endif |
137 | ||
fd57f063 EA |
138 | /* OSF/1 (tested on Alpha) */ |
139 | #ifdef __osf__ | |
140 | # define HASSETEUID 1 /* we have seteuid call */ | |
141 | # define seteuid(uid) setreuid(-1, uid) | |
6070681d EA |
142 | #endif |
143 | ||
fd57f063 | 144 | /* NeXTstep */ |
8e5c6745 EA |
145 | #ifdef __NeXT__ |
146 | # define sleep sleepX | |
147 | # define UNSETENV 1 /* need unsetenv(3) support */ | |
8c5949d2 EA |
148 | #endif |
149 | ||
fd57f063 EA |
150 | /* various flavors of BSD */ |
151 | #ifdef BSD | |
152 | # define HASGETDTABLESIZE 1 /* we have getdtablesize(2) call */ | |
153 | #endif | |
154 | ||
155 | /* 4.4BSD */ | |
ed0b2c1b EA |
156 | #ifdef BSD4_4 |
157 | # include <sys/cdefs.h> | |
fd57f063 | 158 | # define HASSETEUID 1 /* we have seteuid(2) call */ |
ed0b2c1b EA |
159 | #endif |
160 | ||
fd57f063 EA |
161 | /* |
162 | ** End of Per-Operating System defines | |
163 | */ | |
164 | ||
165 | /* general System V defines */ | |
166 | # ifdef SYSTEM5 | |
167 | # define LOCKF 1 /* use System V lockf instead of flock */ | |
168 | # define SYS5TZ 1 /* use System V style timezones */ | |
169 | # define HASUNAME 1 /* use System V uname system call */ | |
170 | # define NEEDGETDTABLESIZE 1 /* needs a replacement getdtablesize */ | |
171 | # endif | |
172 | ||
df39ad0d | 173 | /* |
38966fa4 EA |
174 | ** Due to a "feature" in some operating systems such as Ultrix 4.3 and |
175 | ** HPUX 8.0, if you receive a "No route to host" message (ICMP message | |
176 | ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host | |
177 | ** are closed. Some firewalls return this error if you try to connect | |
178 | ** to the IDENT port (113), so you can't receive email from these hosts | |
179 | ** on these systems. The firewall really should use a more specific | |
180 | ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. | |
df39ad0d EA |
181 | */ |
182 | ||
8a47b280 | 183 | #if !defined(ultrix) && !defined(__hpux) |
df39ad0d EA |
184 | # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ |
185 | #endif | |
19c9e482 | 186 | |
e6245c7e EA |
187 | /* |
188 | ** Remaining definitions should never have to be changed. They are | |
189 | ** primarily to provide back compatibility for older systems -- for | |
6070681d EA |
190 | ** example, it includes some POSIX compatibility definitions |
191 | */ | |
e6245c7e | 192 | |
bd3dddbf EA |
193 | /* System 5 compatibility */ |
194 | #ifndef S_ISREG | |
195 | #define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG) | |
196 | #endif | |
197 | #ifndef S_IWGRP | |
198 | #define S_IWGRP 020 | |
199 | #endif | |
200 | #ifndef S_IWOTH | |
201 | #define S_IWOTH 002 | |
202 | #endif | |
203 | ||
030ae776 EA |
204 | /* |
205 | ** Older systems don't have this error code -- it should be in | |
206 | ** /usr/include/sysexits.h. | |
207 | */ | |
208 | ||
209 | # ifndef EX_CONFIG | |
210 | # define EX_CONFIG 78 /* configuration error */ | |
211 | # endif | |
5229f34d | 212 | |
ed0b2c1b EA |
213 | #ifndef __P |
214 | # include "cdefs.h" | |
215 | #endif | |
216 | ||
3356c77c EA |
217 | /* |
218 | ** Do some required dependencies | |
219 | */ | |
220 | ||
221 | #if defined(NETINET) || defined(NETISO) | |
e9aa7870 EA |
222 | # define SMTP 1 /* enable user and server SMTP */ |
223 | # define QUEUE 1 /* enable queueing */ | |
224 | # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ | |
3356c77c EA |
225 | #endif |
226 | ||
227 | ||
5229f34d EA |
228 | /* |
229 | ** Arrange to use either varargs or stdargs | |
230 | */ | |
231 | ||
232 | # ifdef __STDC__ | |
233 | ||
234 | # include <stdarg.h> | |
235 | ||
5229f34d EA |
236 | # define VA_LOCAL_DECL va_list ap; |
237 | # define VA_START(f) va_start(ap, f) | |
238 | # define VA_END va_end(ap) | |
239 | ||
240 | # else | |
241 | ||
242 | # include <varargs.h> | |
243 | ||
5229f34d EA |
244 | # define VA_LOCAL_DECL va_list ap; |
245 | # define VA_START(f) va_start(ap) | |
246 | # define VA_END va_end(ap) | |
247 | ||
248 | # endif | |
422bed79 | 249 | |
322eceee | 250 | #ifdef HASUNAME |
422bed79 EA |
251 | # include <sys/utsname.h> |
252 | # ifdef newstr | |
253 | # undef newstr | |
254 | # endif | |
322eceee | 255 | #else /* ! HASUNAME */ |
422bed79 EA |
256 | # define NODE_LENGTH 32 |
257 | struct utsname | |
258 | { | |
259 | char nodename[NODE_LENGTH+1]; | |
260 | }; | |
322eceee | 261 | #endif /* HASUNAME */ |
6e99f903 | 262 | |
8d3fd325 EA |
263 | #ifndef MAXHOSTNAMELEN |
264 | #define MAXHOSTNAMELEN 256 | |
265 | #endif | |
49c069a9 EA |
266 | |
267 | #if !defined(SIGCHLD) && defined(SIGCLD) | |
268 | # define SIGCHLD SIGCLD | |
269 | #endif | |
270 | ||
271 | #ifndef STDIN_FILENO | |
272 | #define STDIN_FILENO 0 | |
273 | #endif | |
274 | ||
275 | #ifndef STDOUT_FILENO | |
276 | #define STDOUT_FILENO 1 | |
277 | #endif | |
278 | ||
279 | #ifndef STDERR_FILENO | |
280 | #define STDERR_FILENO 2 | |
281 | #endif | |
f8a31c8e EA |
282 | |
283 | #ifdef LOCKF | |
284 | #define LOCK_SH 0x01 /* shared lock */ | |
285 | #define LOCK_EX 0x02 /* exclusive lock */ | |
286 | #define LOCK_NB 0x04 /* non-blocking lock */ | |
d8c2a697 | 287 | #define LOCK_UN 0x08 /* unlock */ |
64247676 EA |
288 | |
289 | #else | |
290 | ||
291 | # include <sys/file.h> | |
292 | ||
f8a31c8e | 293 | #endif |
a3685d83 EA |
294 | |
295 | /* | |
296 | ** Size of tobuf (deliver.c) | |
297 | ** Tweak this to match your syslog implementation. It will have to | |
298 | ** allow for the extra information printed. | |
299 | */ | |
300 | ||
301 | #ifndef TOBUFSIZE | |
302 | # define TOBUFSIZE (1024 - 256) | |
303 | #endif | |
9114f86c EA |
304 | |
305 | /* fork routine -- set above using #ifdef _osname_ or in Makefile */ | |
306 | # ifndef FORK | |
307 | # define FORK vfork /* function to call to fork mailer */ | |
308 | # endif |