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