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