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