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