xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 60219)
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.31 (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 # ifdef __hpux
81 # define SYSTEM5	1
82 # endif
83 
84 # ifdef IBM_AIX
85 # define LOCKF		1	/* use System V lockf instead of flock */
86 # define FORK		fork	/* no vfork primitive available */
87 # endif
88 
89 # ifdef SYSTEM5
90 
91 # define LOCKF		1	/* use System V lockf instead of flock */
92 # define SYS5TZ		1	/* use System V style timezones */
93 # define HASUNAME	1	/* use System V uname system call */
94 
95 # endif
96 
97 #if defined(sun) && !defined(BSD)
98 # include <vfork.h>
99 #endif
100 
101 #ifdef _POSIX_VERSION
102 # define HASSETSID	1	/* has setsid(2) call */
103 #endif
104 
105 #ifdef NeXT
106 # define	sleep	sleepX
107 #endif
108 
109 /*
110 **  Due to a "feature" in some operating systems such as Ultrix 4.3 and
111 **  HPUX 8.0, if you receive a "No route to host" message (ICMP message
112 **  ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
113 **  are closed.  Some firewalls return this error if you try to connect
114 **  to the IDENT port (113), so you can't receive email from these hosts
115 **  on these systems.  The firewall really should use a more specific
116 **  message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.
117 */
118 
119 #if !defined(ultrix) && !defined(__hpux)
120 # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
121 #endif
122 
123 /*
124 **  Remaining definitions should never have to be changed.  They are
125 **  primarily to provide back compatibility for older systems -- for
126 **  example, it includes some POSIX compatibility definitions
127 */
128 
129 /* System 5 compatibility */
130 #ifndef S_ISREG
131 #define S_ISREG(foo)	((foo & S_IFREG) == S_IFREG)
132 #endif
133 #ifndef S_IWGRP
134 #define S_IWGRP		020
135 #endif
136 #ifndef S_IWOTH
137 #define S_IWOTH		002
138 #endif
139 
140 /*
141 **  Older systems don't have this error code -- it should be in
142 **  /usr/include/sysexits.h.
143 */
144 
145 # ifndef EX_CONFIG
146 # define EX_CONFIG	78	/* configuration error */
147 # endif
148 
149 /*
150 **  Do some required dependencies
151 */
152 
153 #if defined(NETINET) || defined(NETISO)
154 # define SMTP		1	/* enable user and server SMTP */
155 # define QUEUE		1	/* enable queueing */
156 # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
157 #endif
158 
159 
160 /*
161 **  Arrange to use either varargs or stdargs
162 */
163 
164 # ifdef __STDC__
165 
166 # include <stdarg.h>
167 
168 # define VA_LOCAL_DECL	va_list ap;
169 # define VA_START(f)	va_start(ap, f)
170 # define VA_END		va_end(ap)
171 
172 # else
173 
174 # include <varargs.h>
175 
176 # define VA_LOCAL_DECL	va_list ap;
177 # define VA_START(f)	va_start(ap)
178 # define VA_END		va_end(ap)
179 
180 # endif
181 
182 #ifdef HASUNAME
183 # include <sys/utsname.h>
184 # ifdef newstr
185 #  undef newstr
186 # endif
187 #else /* ! HASUNAME */
188 # define NODE_LENGTH 32
189 struct utsname
190 {
191 	char nodename[NODE_LENGTH+1];
192 };
193 #endif /* HASUNAME */
194 
195 #ifndef MAXHOSTNAMELEN
196 #define MAXHOSTNAMELEN	256
197 #endif
198 
199 #if !defined(SIGCHLD) && defined(SIGCLD)
200 # define SIGCHLD	SIGCLD
201 #endif
202 
203 #ifndef STDIN_FILENO
204 #define STDIN_FILENO	0
205 #endif
206 
207 #ifndef STDOUT_FILENO
208 #define STDOUT_FILENO	1
209 #endif
210 
211 #ifndef STDERR_FILENO
212 #define STDERR_FILENO	2
213 #endif
214 
215 #ifdef LOCKF
216 #define LOCK_SH		0x01	/* shared lock */
217 #define LOCK_EX		0x02	/* exclusive lock */
218 #define LOCK_NB		0x04	/* non-blocking lock */
219 #define LOCK_UN		0x08	/* unlock */
220 
221 #else
222 
223 # include <sys/file.h>
224 
225 #endif
226 
227 /*
228 **  Size of tobuf (deliver.c)
229 **	Tweak this to match your syslog implementation.  It will have to
230 **	allow for the extra information printed.
231 */
232 
233 #ifndef TOBUFSIZE
234 # define TOBUFSIZE (1024 - 256)
235 #endif
236 
237 /* fork routine -- set above using #ifdef _osname_ or in Makefile */
238 # ifndef FORK
239 # define FORK		vfork		/* function to call to fork mailer */
240 # endif
241