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