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