add some words on library andutilities changes
[unix-history] / usr / src / usr.sbin / sendmail / src / conf.h
CommitLineData
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 *
b4cd00ff 8 * @(#)conf.h 8.7 (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
ba6514e2 19/**********************************************************************
5a739feb
EA
20** Table sizes, etc....
21** There shouldn't be much need to change these....
ba6514e2 22**********************************************************************/
5a739feb 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
ba6514e2 44/**********************************************************************
5a739feb 45** Compilation options.
9bcdff70
EA
46**
47** #define these if they are available; comment them out otherwise.
ba6514e2 48**********************************************************************/
5a739feb 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
ba6514e2 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.
ba6514e2 67**********************************************************************/
5a4c03c6 68
fd57f063
EA
69/*
70** Per-Operating System defines
71*/
72
ba6514e2
EA
73/*
74** HP-UX -- tested for 8.07
75*/
76
8a47b280 77# ifdef __hpux
fd57f063 78# define SYSTEM5 1 /* include all the System V defines */
45f49b73 79# define UNSETENV 1 /* need unsetenv(3) support */
ba6514e2
EA
80# define HASSETREUID 1 /* have setreuid(2) call */
81# define setreuid(r, e) setresuid(r, e, -1)
273562d8
EA
82# endif
83
ba6514e2
EA
84/*
85** IBM AIX 3.x -- actually tested for 3.2.3
86*/
87
a419d027 88# ifdef _AIX3
9114f86c
EA
89# define LOCKF 1 /* use System V lockf instead of flock */
90# define FORK fork /* no vfork primitive available */
45f49b73 91# define UNSETENV 1 /* need unsetenv(3) support */
8e5c6745
EA
92# define SYS5TZ 1 /* use System V style timezones */
93# endif
94
ba6514e2
EA
95/*
96** Silicon Graphics IRIX
97**
98** I haven't tested this yet myself.
99*/
100
8e5c6745
EA
101# ifdef IRIX
102# define FORK fork /* no vfork primitive available */
103# define UNSETENV 1 /* need unsetenv(3) support */
104# define setpgrp BSDsetpgrp
e6cb9fc4
EA
105# define HASSETREUID 1 /* have setreuid(2) call */
106# define GIDSET_T gid_t
9114f86c
EA
107# endif
108
ba6514e2
EA
109
110/*
111** SunOS
112*/
113
45f49b73 114#if defined(sun) && !defined(BSD)
fd57f063 115
45f49b73 116# define UNSETENV 1 /* need unsetenv(3) support */
45f49b73 117
7b3820ed 118# ifdef SOLARIS
ba6514e2 119 /* Solaris 2.x (a.k.a. SunOS 5.x) */
b4cd00ff 120# define SYSTEM5 1 /* use System V definitions */
fd57f063
EA
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 */
ba6514e2 126# define HASSETREUID 1 /* have setreuid(2) call */
45f49b73 127# include <vfork.h>
45f49b73 128
fd57f063 129# endif
45f49b73
EA
130#endif
131
ba6514e2
EA
132/*
133** Digital Ultrix 4.2A or 4.3
134*/
135
45f49b73
EA
136#ifdef ultrix
137# define HASSTATFS 1 /* has the statfs(2) syscall */
ba6514e2 138# define HASSETREUID 1 /* have setreuid(2) call */
e6245c7e
EA
139#endif
140
ba6514e2
EA
141/*
142** OSF/1 (tested on Alpha)
143*/
144
fd57f063 145#ifdef __osf__
ba6514e2 146# define HASSETREUID 1 /* have setreuid(2) call */
fd57f063 147# define seteuid(uid) setreuid(-1, uid)
6070681d
EA
148#endif
149
ba6514e2
EA
150/*
151** NeXTstep
152*/
153
8e5c6745
EA
154#ifdef __NeXT__
155# define sleep sleepX
156# define UNSETENV 1 /* need unsetenv(3) support */
8c5949d2
EA
157#endif
158
ba6514e2
EA
159/*
160** BSD
161*/
162
fd57f063
EA
163#ifdef BSD
164# define HASGETDTABLESIZE 1 /* we have getdtablesize(2) call */
165#endif
166
167/* 4.4BSD */
ed0b2c1b
EA
168#ifdef BSD4_4
169# include <sys/cdefs.h>
ba6514e2 170# define HASSETREUID 1 /* have setreuid(2) call */
7621e399
EA
171# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
172#endif
173
ba6514e2
EA
174/*
175** SCO Unix
176*/
177
7621e399
EA
178#ifdef _SCO_unix_
179# define SYSTEM5 1 /* include all the System V defines */
180# define UNSETENV 1 /* need unsetenv(3) support */
181# define FORK fork
182# define MAXPATHLEN PATHSIZE
ed0b2c1b
EA
183#endif
184
ba6514e2 185/**********************************************************************
fd57f063 186** End of Per-Operating System defines
ba6514e2 187**********************************************************************/
fd57f063 188
b4cd00ff
EA
189/**********************************************************************
190** More general defines
191**********************************************************************/
192
fd57f063
EA
193/* general System V defines */
194# ifdef SYSTEM5
b4cd00ff 195# define LOCKF 1 /* use System V locking instead of flock */
fd57f063 196# define SYS5TZ 1 /* use System V style timezones */
b4cd00ff
EA
197# define HASUNAME 1 /* use System V uname(2) system call */
198# define HASUSTAT 1 /* use System V ustat(2) syscall */
199# define bcopy(s, d, l) (memmove((d), (s), (l)))
200# define bzero(d, l) (memset((d), '\0', (l)))
201# define bcmp(s, d, l) (memcmp((s), (d), (l)))
fd57f063
EA
202# endif
203
b4cd00ff
EA
204/* general "standard C" defines */
205#if defined(__STDC__) || defined(SYSTEM5)
206# define HASSETVBUF 1 /* we have setvbuf(3) in libc */
207#endif
208
209/* general POSIX defines */
210#ifdef _POSIX_VERSION
211# define HASSETSID 1 /* has setsid(2) call */
212#endif
213
df39ad0d 214/*
38966fa4
EA
215** Due to a "feature" in some operating systems such as Ultrix 4.3 and
216** HPUX 8.0, if you receive a "No route to host" message (ICMP message
217** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
218** are closed. Some firewalls return this error if you try to connect
219** to the IDENT port (113), so you can't receive email from these hosts
220** on these systems. The firewall really should use a more specific
221** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.
df39ad0d
EA
222*/
223
8a47b280 224#if !defined(ultrix) && !defined(__hpux)
df39ad0d
EA
225# define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */
226#endif
19c9e482 227
e6cb9fc4
EA
228/*
229** If no type for argument two of getgroups call is defined, assume
230** it's an integer -- unfortunately, there seem to be several choices
231** here.
232*/
233
234#ifndef GIDSET_T
235# define GIDSET_T int
236#endif
237
e6245c7e
EA
238/*
239** Remaining definitions should never have to be changed. They are
240** primarily to provide back compatibility for older systems -- for
6070681d
EA
241** example, it includes some POSIX compatibility definitions
242*/
e6245c7e 243
bd3dddbf
EA
244/* System 5 compatibility */
245#ifndef S_ISREG
246#define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG)
247#endif
248#ifndef S_IWGRP
249#define S_IWGRP 020
250#endif
251#ifndef S_IWOTH
252#define S_IWOTH 002
253#endif
254
030ae776
EA
255/*
256** Older systems don't have this error code -- it should be in
257** /usr/include/sysexits.h.
258*/
259
260# ifndef EX_CONFIG
261# define EX_CONFIG 78 /* configuration error */
262# endif
5229f34d 263
ed0b2c1b
EA
264#ifndef __P
265# include "cdefs.h"
266#endif
267
3356c77c
EA
268/*
269** Do some required dependencies
270*/
271
272#if defined(NETINET) || defined(NETISO)
e9aa7870
EA
273# define SMTP 1 /* enable user and server SMTP */
274# define QUEUE 1 /* enable queueing */
275# define DAEMON 1 /* include the daemon (requires IPC & SMTP) */
3356c77c
EA
276#endif
277
278
5229f34d
EA
279/*
280** Arrange to use either varargs or stdargs
281*/
282
283# ifdef __STDC__
284
285# include <stdarg.h>
286
5229f34d
EA
287# define VA_LOCAL_DECL va_list ap;
288# define VA_START(f) va_start(ap, f)
289# define VA_END va_end(ap)
290
291# else
292
293# include <varargs.h>
294
5229f34d
EA
295# define VA_LOCAL_DECL va_list ap;
296# define VA_START(f) va_start(ap)
297# define VA_END va_end(ap)
298
299# endif
422bed79 300
322eceee 301#ifdef HASUNAME
422bed79
EA
302# include <sys/utsname.h>
303# ifdef newstr
304# undef newstr
305# endif
322eceee 306#else /* ! HASUNAME */
422bed79
EA
307# define NODE_LENGTH 32
308struct utsname
309{
310 char nodename[NODE_LENGTH+1];
311};
322eceee 312#endif /* HASUNAME */
6e99f903 313
7621e399
EA
314#if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_)
315# define MAXHOSTNAMELEN 256
8d3fd325 316#endif
49c069a9
EA
317
318#if !defined(SIGCHLD) && defined(SIGCLD)
319# define SIGCHLD SIGCLD
320#endif
321
322#ifndef STDIN_FILENO
323#define STDIN_FILENO 0
324#endif
325
326#ifndef STDOUT_FILENO
327#define STDOUT_FILENO 1
328#endif
329
330#ifndef STDERR_FILENO
331#define STDERR_FILENO 2
332#endif
f8a31c8e
EA
333
334#ifdef LOCKF
335#define LOCK_SH 0x01 /* shared lock */
336#define LOCK_EX 0x02 /* exclusive lock */
337#define LOCK_NB 0x04 /* non-blocking lock */
d8c2a697 338#define LOCK_UN 0x08 /* unlock */
64247676
EA
339
340#else
341
342# include <sys/file.h>
343
f8a31c8e 344#endif
a3685d83
EA
345
346/*
347** Size of tobuf (deliver.c)
348** Tweak this to match your syslog implementation. It will have to
349** allow for the extra information printed.
350*/
351
352#ifndef TOBUFSIZE
353# define TOBUFSIZE (1024 - 256)
354#endif
9114f86c
EA
355
356/* fork routine -- set above using #ifdef _osname_ or in Makefile */
357# ifndef FORK
358# define FORK vfork /* function to call to fork mailer */
359# endif