make SCCS id string reflect USERDB compile flag
[unix-history] / usr / src / usr.sbin / sendmail / src / conf.h
CommitLineData
5a739feb 1/*
dc45ba8c 2 * Copyright (c) 1983 Eric P. Allman
bee79b64
KB
3 * Copyright (c) 1988 Regents of the University of California.
4 * All rights reserved.
5 *
417f7a11 6 * %sccs.include.redist.c%
bee79b64 7 *
45f49b73 8 * @(#)conf.h 6.34 (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>
713c523f 18# include "cdefs.h"
f43b04ce 19
5a739feb
EA
20/*
21** Table sizes, etc....
22** There shouldn't be much need to change these....
23*/
24
d36f8e5c 25# define MAXLINE 2048 /* max line length */
f0a960f1 26# define MAXNAME 256 /* max length of a name */
5a739feb 27# define MAXPV 40 /* max # of parms to mailers */
d36f8e5c 28# define MAXATOM 200 /* max atoms per address */
5a739feb 29# define MAXMAILERS 25 /* maximum mailers known to system */
8583ab39 30# define MAXRWSETS 100 /* max # of sets of rewriting rules */
5a739feb 31# define MAXPRIORITIES 25 /* max values for Precedence: field */
8583ab39 32# define MAXMXHOSTS 20 /* max # of MX records */
8657d05f 33# define SMTPLINELIM 990 /* maximum SMTP line length */
f43b04ce
EA
34# define MAXKEY 128 /* maximum size of a database key */
35# define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */
b0b636d1 36# define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */
8e571338 37# define MAXIPADDR 16 /* max # of IP addrs for this host */
9f7134c8 38# define MAXALIASDB 12 /* max # of alias databases */
d36f8e5c 39# define PSBUFSIZE (MAXLINE + MAXATOM) /* size of prescan buffer */
8583ab39
EA
40
41# ifndef QUEUESIZE
42# define QUEUESIZE 1000 /* max # of jobs per queue run */
43# endif
44
5a739feb
EA
45/*
46** Compilation options.
9bcdff70
EA
47**
48** #define these if they are available; comment them out otherwise.
5a739feb
EA
49*/
50
9bcdff70 51# define LOG 1 /* enable logging */
9bcdff70 52# define UGLYUUCP 1 /* output ugly UUCP From lines */
3356c77c 53# define NETINET 1 /* include internet support */
9bcdff70 54# define SETPROCTITLE 1 /* munge argv to display current status */
35af2f06 55# define NAMED_BIND 1 /* use Berkeley Internet Domain Server */
7f0fd60b 56# define MATCHGECOS 1 /* match user names from gecos field */
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
a419d027 69/* HP-UX -- tested for 8.07 */
8a47b280 70# ifdef __hpux
5a4c03c6 71# define SYSTEM5 1
45f49b73 72# define UNSETENV 1 /* need unsetenv(3) support */
273562d8
EA
73# endif
74
a419d027
EA
75/* IBM AIX 3.x -- actually tested for 3.2.3 */
76# ifdef _AIX3
9114f86c
EA
77# define LOCKF 1 /* use System V lockf instead of flock */
78# define FORK fork /* no vfork primitive available */
45f49b73 79# define UNSETENV 1 /* need unsetenv(3) support */
9114f86c
EA
80# endif
81
a419d027 82/* general System V defines */
d25bb424
EA
83# ifdef SYSTEM5
84# define LOCKF 1 /* use System V lockf instead of flock */
07c63e56 85# define SYS5TZ 1 /* use System V style timezones */
322eceee 86# define HASUNAME 1 /* use System V uname system call */
df39ad0d
EA
87# endif
88
45f49b73
EA
89#if defined(sun) && !defined(BSD)
90# define UNSETENV 1 /* need unsetenv(3) support */
91# define HASSTATFS 1 /* has the statfs(2) syscall */
92
93# if !defined(SOLARIS)
94# include <vfork.h>
95# endif
96
97#endif
98
99#ifdef ultrix
100# define HASSTATFS 1 /* has the statfs(2) syscall */
e6245c7e
EA
101#endif
102
6070681d
EA
103#ifdef _POSIX_VERSION
104# define HASSETSID 1 /* has setsid(2) call */
105#endif
106
8c5949d2
EA
107#ifdef NeXT
108# define sleep sleepX
109#endif
110
df39ad0d 111/*
38966fa4
EA
112** Due to a "feature" in some operating systems such as Ultrix 4.3 and
113** HPUX 8.0, if you receive a "No route to host" message (ICMP message
114** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
115** are closed. Some firewalls return this error if you try to connect
116** to the IDENT port (113), so you can't receive email from these hosts
117** on these systems. The firewall really should use a more specific
118** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.
df39ad0d
EA
119*/
120
8a47b280 121#if !defined(ultrix) && !defined(__hpux)
df39ad0d
EA
122# define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */
123#endif
19c9e482 124
e6245c7e
EA
125/*
126** Remaining definitions should never have to be changed. They are
127** primarily to provide back compatibility for older systems -- for
6070681d
EA
128** example, it includes some POSIX compatibility definitions
129*/
e6245c7e 130
bd3dddbf
EA
131/* System 5 compatibility */
132#ifndef S_ISREG
133#define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG)
134#endif
135#ifndef S_IWGRP
136#define S_IWGRP 020
137#endif
138#ifndef S_IWOTH
139#define S_IWOTH 002
140#endif
141
030ae776
EA
142/*
143** Older systems don't have this error code -- it should be in
144** /usr/include/sysexits.h.
145*/
146
147# ifndef EX_CONFIG
148# define EX_CONFIG 78 /* configuration error */
149# endif
5229f34d 150
3356c77c
EA
151/*
152** Do some required dependencies
153*/
154
155#if defined(NETINET) || defined(NETISO)
e9aa7870
EA
156# define SMTP 1 /* enable user and server SMTP */
157# define QUEUE 1 /* enable queueing */
158# define DAEMON 1 /* include the daemon (requires IPC & SMTP) */
3356c77c
EA
159#endif
160
161
5229f34d
EA
162/*
163** Arrange to use either varargs or stdargs
164*/
165
166# ifdef __STDC__
167
168# include <stdarg.h>
169
5229f34d
EA
170# define VA_LOCAL_DECL va_list ap;
171# define VA_START(f) va_start(ap, f)
172# define VA_END va_end(ap)
173
174# else
175
176# include <varargs.h>
177
5229f34d
EA
178# define VA_LOCAL_DECL va_list ap;
179# define VA_START(f) va_start(ap)
180# define VA_END va_end(ap)
181
182# endif
422bed79 183
322eceee 184#ifdef HASUNAME
422bed79
EA
185# include <sys/utsname.h>
186# ifdef newstr
187# undef newstr
188# endif
322eceee 189#else /* ! HASUNAME */
422bed79
EA
190# define NODE_LENGTH 32
191struct utsname
192{
193 char nodename[NODE_LENGTH+1];
194};
322eceee 195#endif /* HASUNAME */
6e99f903 196
8d3fd325
EA
197#ifndef MAXHOSTNAMELEN
198#define MAXHOSTNAMELEN 256
199#endif
49c069a9
EA
200
201#if !defined(SIGCHLD) && defined(SIGCLD)
202# define SIGCHLD SIGCLD
203#endif
204
205#ifndef STDIN_FILENO
206#define STDIN_FILENO 0
207#endif
208
209#ifndef STDOUT_FILENO
210#define STDOUT_FILENO 1
211#endif
212
213#ifndef STDERR_FILENO
214#define STDERR_FILENO 2
215#endif
f8a31c8e
EA
216
217#ifdef LOCKF
218#define LOCK_SH 0x01 /* shared lock */
219#define LOCK_EX 0x02 /* exclusive lock */
220#define LOCK_NB 0x04 /* non-blocking lock */
d8c2a697 221#define LOCK_UN 0x08 /* unlock */
64247676
EA
222
223#else
224
225# include <sys/file.h>
226
f8a31c8e 227#endif
a3685d83
EA
228
229/*
230** Size of tobuf (deliver.c)
231** Tweak this to match your syslog implementation. It will have to
232** allow for the extra information printed.
233*/
234
235#ifndef TOBUFSIZE
236# define TOBUFSIZE (1024 - 256)
237#endif
9114f86c
EA
238
239/* fork routine -- set above using #ifdef _osname_ or in Makefile */
240# ifndef FORK
241# define FORK vfork /* function to call to fork mailer */
242# endif