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