avoid writing an error message announcing that you can't write the
[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 *
9114f86c 8 * @(#)conf.h 6.31 (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 60# define BTREE_MAP 1 /* enable BTREE mapping type (requires NEWDB) */
8583ab39 61# define HASH_MAP 1 /* enable HASH mapping type (requires NEWDB) */
5a4c03c6
EA
62# endif
63
5adc8151
EA
64# ifdef NIS
65# define NIS_ALIASES 1 /* include NIS support for aliases */
66# define NIS_MAP 1 /* include NIS mapping type */
67# endif
68
5a4c03c6
EA
69# ifdef NDBM
70# define DBM_MAP 1 /* enable DBM mapping type (requires NDBM) */
71# endif
72
73/*
e6245c7e
EA
74** Operating system configuration.
75**
76** Unless you are porting to a new OS, you shouldn't have to
77** change these.
5a4c03c6
EA
78*/
79
8a47b280 80# ifdef __hpux
5a4c03c6 81# define SYSTEM5 1
273562d8
EA
82# endif
83
9114f86c
EA
84# ifdef IBM_AIX
85# define LOCKF 1 /* use System V lockf instead of flock */
86# define FORK fork /* no vfork primitive available */
87# endif
88
d25bb424 89# ifdef SYSTEM5
07c63e56 90
d25bb424 91# define LOCKF 1 /* use System V lockf instead of flock */
07c63e56 92# define SYS5TZ 1 /* use System V style timezones */
322eceee 93# define HASUNAME 1 /* use System V uname system call */
07c63e56 94
df39ad0d
EA
95# endif
96
c827a110 97#if defined(sun) && !defined(BSD)
e6245c7e
EA
98# include <vfork.h>
99#endif
100
6070681d
EA
101#ifdef _POSIX_VERSION
102# define HASSETSID 1 /* has setsid(2) call */
103#endif
104
8c5949d2
EA
105#ifdef NeXT
106# define sleep sleepX
107#endif
108
df39ad0d 109/*
38966fa4
EA
110** Due to a "feature" in some operating systems such as Ultrix 4.3 and
111** HPUX 8.0, if you receive a "No route to host" message (ICMP message
112** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
113** are closed. Some firewalls return this error if you try to connect
114** to the IDENT port (113), so you can't receive email from these hosts
115** on these systems. The firewall really should use a more specific
116** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.
df39ad0d
EA
117*/
118
8a47b280 119#if !defined(ultrix) && !defined(__hpux)
df39ad0d
EA
120# define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */
121#endif
19c9e482 122
e6245c7e
EA
123/*
124** Remaining definitions should never have to be changed. They are
125** primarily to provide back compatibility for older systems -- for
6070681d
EA
126** example, it includes some POSIX compatibility definitions
127*/
e6245c7e 128
bd3dddbf
EA
129/* System 5 compatibility */
130#ifndef S_ISREG
131#define S_ISREG(foo) ((foo & S_IFREG) == S_IFREG)
132#endif
133#ifndef S_IWGRP
134#define S_IWGRP 020
135#endif
136#ifndef S_IWOTH
137#define S_IWOTH 002
138#endif
139
030ae776
EA
140/*
141** Older systems don't have this error code -- it should be in
142** /usr/include/sysexits.h.
143*/
144
145# ifndef EX_CONFIG
146# define EX_CONFIG 78 /* configuration error */
147# endif
5229f34d 148
3356c77c
EA
149/*
150** Do some required dependencies
151*/
152
153#if defined(NETINET) || defined(NETISO)
e9aa7870
EA
154# define SMTP 1 /* enable user and server SMTP */
155# define QUEUE 1 /* enable queueing */
156# define DAEMON 1 /* include the daemon (requires IPC & SMTP) */
3356c77c
EA
157#endif
158
159
5229f34d
EA
160/*
161** Arrange to use either varargs or stdargs
162*/
163
164# ifdef __STDC__
165
166# include <stdarg.h>
167
5229f34d
EA
168# define VA_LOCAL_DECL va_list ap;
169# define VA_START(f) va_start(ap, f)
170# define VA_END va_end(ap)
171
172# else
173
174# include <varargs.h>
175
5229f34d
EA
176# define VA_LOCAL_DECL va_list ap;
177# define VA_START(f) va_start(ap)
178# define VA_END va_end(ap)
179
180# endif
422bed79 181
322eceee 182#ifdef HASUNAME
422bed79
EA
183# include <sys/utsname.h>
184# ifdef newstr
185# undef newstr
186# endif
322eceee 187#else /* ! HASUNAME */
422bed79
EA
188# define NODE_LENGTH 32
189struct utsname
190{
191 char nodename[NODE_LENGTH+1];
192};
322eceee 193#endif /* HASUNAME */
6e99f903 194
8d3fd325
EA
195#ifndef MAXHOSTNAMELEN
196#define MAXHOSTNAMELEN 256
197#endif
49c069a9
EA
198
199#if !defined(SIGCHLD) && defined(SIGCLD)
200# define SIGCHLD SIGCLD
201#endif
202
203#ifndef STDIN_FILENO
204#define STDIN_FILENO 0
205#endif
206
207#ifndef STDOUT_FILENO
208#define STDOUT_FILENO 1
209#endif
210
211#ifndef STDERR_FILENO
212#define STDERR_FILENO 2
213#endif
f8a31c8e
EA
214
215#ifdef LOCKF
216#define LOCK_SH 0x01 /* shared lock */
217#define LOCK_EX 0x02 /* exclusive lock */
218#define LOCK_NB 0x04 /* non-blocking lock */
d8c2a697 219#define LOCK_UN 0x08 /* unlock */
64247676
EA
220
221#else
222
223# include <sys/file.h>
224
f8a31c8e 225#endif
a3685d83
EA
226
227/*
228** Size of tobuf (deliver.c)
229** Tweak this to match your syslog implementation. It will have to
230** allow for the extra information printed.
231*/
232
233#ifndef TOBUFSIZE
234# define TOBUFSIZE (1024 - 256)
235#endif
9114f86c
EA
236
237/* fork routine -- set above using #ifdef _osname_ or in Makefile */
238# ifndef FORK
239# define FORK vfork /* function to call to fork mailer */
240# endif