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