README revision 38032
1# Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
2# Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
3# Copyright (c) 1988
4#	The Regents of the University of California.  All rights reserved.
5#
6# By using this file, you agree to the terms and conditions set
7# forth in the LICENSE file which can be found at the top level of
8# the sendmail distribution.
9#
10#
11#	@(#)README	8.206 (Berkeley) 6/30/98
12#
13
14This directory contains the source files for sendmail(TM).
15
16*********************
17!! DO NOT USE MAKE !!  in this directory to compile sendmail --
18*********************  instead, use the "Build" script located in
19the src directory.  It will build an appropriate Makefile, and
20create an appropriate obj.* subdirectory so that multiplatform
21support works easily.
22
23	**********************************************************
24	**  Read below for more details on building sendmail.	**
25	**********************************************************
26
27**************************************************************************
28**  IMPORTANT:  Read the appropriate paragraphs in the section on	**
29**  ``Operating System and Compile Quirks''.				**
30**************************************************************************
31
32For detailed instructions, please read the document ../doc/op/op.me:
33
34	eqn ../doc/op/op.me | pic | ditroff -me
35
36Sendmail is a trademark of Sendmail, Inc.
37
38
39+-------------------+
40| BUILDING SENDMAIL |
41+-------------------+
42
43By far, the easiest way to compile sendmail is to use the "Build"
44script:
45
46	sh Build
47
48This uses the "uname" command to figure out what architecture you are
49on and creates a proper Makefile accordingly.  It also creates a
50subdirectory per object format, so that multiarchitecture support is
51easy.  In general this should be all you need.  IRIX 6.x users should
52read the note below in the OPERATING SYSTEM AND COMPILE QUIRKS section.
53
54If you need to look at other include or library directories, use the
55-I or -L flags on the command line, e.g.,
56
57	sh Build -I/usr/sww/include -L/usr/sww/lib
58
59It's also possible to create local site configuration in the file
60site.config.m4 (or another file settable with the -f flag).  This
61file contains M4 definitions for various compilation values; the
62most useful are:
63
64confMAPDEF	-D flags to specify database types to be included
65		(see below)
66confENVDEF	-D flags to specify other environment information
67confINCDIRS	-I flags for finding include files during compilation
68confLIBDIRS	-L flags for finding libraries during linking
69confLIBS	-l flags for selecting libraries during linking
70confLDOPTS	other ld(1) linker options
71
72Others can be found by examining Makefile.m4.  Please read
73../BuildTools/README for more information about the site.config.m4
74file.
75
76You can recompile from scratch using the -c flag with the Build
77command.  This removes the existing compilation directory for the
78current platform and builds a new one.
79
80Porting to a new Unix-based system should be a matter of creating
81an appropriate configuration file in the BuildTools/OS/ directory.
82
83
84
85+----------------------+
86| DATABASE DEFINITIONS |
87+----------------------+
88
89There are several database formats that can be used for the alias files
90and for general maps.  When used for alias files they interact in an
91attempt to be backward compatible.
92
93The options are:
94
95NEWDB		The new Berkeley DB package.  Some systems (e.g., BSD/OS and
96		Digital UNIX 4.0) have some version of this package
97		pre-installed.  If your system does not have Berkeley DB
98		pre-installed, or the version installed is not version 2.0
99		or greater (e.g., is Berkeley DB 1.85 or 1.86), get the
100		current version from http://www.sleepycat.com/.  DO NOT
101		use a version from any of the University of California,
102		Berkeley "Net" or other distributions.  If you are still
103		running BSD/386 1.x, you will need to upgrade the included
104		Berkeley DB library to a current version.  NEWDB is included
105		automatically if the Build script can find a library named
106		libdb.a.
107NDBM		The older NDBM implementation -- the very old V7 DBM
108		implementation is no longer supported.
109NIS		Network Information Services.  To use this you must have
110		NIS support on your system.
111NISPLUS		NIS+ (the revised NIS released with Solaris 2).  You must
112		have NIS+ support on your system to use this flag.
113HESIOD		Support for Hesiod (from the DEC/Athena distribution).  You
114		must already have Hesiod support on your system for this to
115		work.  You may be able to get this to work with the MIT/Athena
116		version of Hesiod, but that's likely to be a lot of work.
117LDAPMAP		Lightweight Directory Lookup Protocol support.  You will
118		have to install the UMich ldap and lber libraries to use
119		this flag.
120MAP_REGEX	Regular Expression support.  You will need to use an
121		operating system which comes with the POSIX regex()
122		routines or install a regexp library such as libregex from
123		the Free Software Foundation.
124
125>>>  NOTE WELL for NEWDB support: If you want to get ndbm support, for
126>>>  Berkeley DB versions under 2.0, it is CRITICAL that you remove
127>>>  ndbm.o from libdb.a before you install it and DO NOT install ndbm.h;
128>>>  for Berkeley DB versions 2.0 through 2.3.14, remove dbm.o from libdb.a
129>>>  before you install it.  If you don't delete these, there is absolutely
130>>>  no point to including -DNDBM, since it will just get you another
131>>>  (inferior) API to the same format database.  These files OVERRIDE
132>>>  calls to ndbm routines -- in particular, if you leave ndbm.h in,
133>>>  you can find yourself using the new db package even if you don't
134>>>  define NEWDB.  Berkeley DB versions later than 2.3.14 do not need
135>>>  to be modified.  Please also consult the README in the top level
136>>>  directory of the sendmail distribution for other important information.
137>>>
138>>>  Further note: DO NOT remove your existing /usr/include/ndbm.h --
139>>>  you need that one.  But do not install an updated ndbm.h in
140>>>  /usr/include, /usr/local/include, or anywhere else.
141
142If NEWDB and NDBM are defined (but not NIS), then sendmail will read
143NDBM format alias files, but the next time a newaliases is run the
144format will be converted to NEWDB; that format will be used forever
145more.  This is intended as a transition feature.
146
147If NEWDB, NDBM, and NIS are all defined and the name of the file includes
148the string "/yp/", sendmail will rebuild BOTH the NEWDB and NDBM format
149alias files.  However, it will only read the NEWDB file; the NDBM format
150file is used only by the NIS subsystem.  This is needed because the NIS
151maps on an NIS server are built directly from the NDBM files.
152
153If NDBM and NIS are defined (regardless of the definition of NEWDB),
154and the filename includes the string "/yp/", sendmail adds the special
155tokens "YP_LAST_MODIFIED" and "YP_MASTER_NAME", both of which are
156required if the NDBM file is to be used as an NIS map.
157
158All of these flags are normally defined in the DBMDEF line in the
159Makefile.
160
161If you define NEWDB or HESIOD you get the User Database (USERDB)
162automatically.  Generally you do want to have NEWDB for it to do
163anything interesting.  See above for getting the Berkeley DB
164package (i.e., NEWDB).  There is no separate "user database"
165package -- don't bother searching for it on the net.
166
167Hesiod and LDAP require libraries that may not be installed with your
168system.  These are outside of my ability to provide support.  See the
169"Quirks" section for more information.
170
171The regex map can be used to see if an address matches a certain regular
172expression.  For example, all-numerics local parts are common spam
173addresses, so "^[0-9]+$" would match this.  By using such a map in a
174check_* rule-set, you can block a certain range of addresses that would
175otherwise be considered valid.
176
177+---------------+
178| COMPILE FLAGS |
179+---------------+
180
181Wherever possible, I try to make sendmail pull in the correct
182compilation options needed to compile on various environments based on
183automatically defined symbols.  Some machines don't seem to have useful
184symbols available, requiring that a compilation flag be defined in
185the Makefile; see the Buildtools/OS subdirectory for the supported
186architectures.
187
188If you are a system to which sendmail has already been ported you
189should not have to touch the following symbols.  But if you are porting,
190you may have to tweak the following compilation flags in conf.h in order
191to get it to compile and link properly:
192
193SYSTEM5		Adjust for System V (not necessarily Release 4).
194SYS5SIGNALS	Use System V signal semantics -- the signal handler
195		is automatically dropped when the signal is caught.
196		If this is not set, use POSIX/BSD semantics, where the
197		signal handler stays in force until an exec or an
198		explicit delete.  Implied by SYSTEM5.
199SYS5SETPGRP	Use System V setpgrp() semantics.  Implied by SYSTEM5.
200HASFCHMOD	Define this to one if you have the fchmod(2) system call.
201		This improves security.
202HASFLOCK	Set this if you prefer to use the flock(2) system call
203		rather than using fcntl-based locking.  Fcntl locking
204		has some semantic gotchas, but many vendor systems
205		also interface it to lockd(8) to do NFS-style locking.
206		Unfortunately, may vendors implementations of fcntl locking
207		is just plain broken (e.g., locks are never released,
208		causing your sendmail to deadlock; when the kernel runs
209		out of locks your system crashes).  For this reason, I
210		recommend always defining this unless you are absolutely
211		certain that your fcntl locking implementation really works.
212HASUNAME	Set if you have the "uname" system call.  Implied by
213		SYSTEM5.
214HASUNSETENV	Define this if your system library has the "unsetenv"
215		subroutine.
216HASSETSID	Define this if you have the setsid(2) system call.  This
217		is implied if your system appears to be POSIX compliant.
218HASINITGROUPS	Define this if you have the initgroups(3) routine.
219HASSETVBUF	Define this if you have the setvbuf(3) library call.
220		If you don't, setlinebuf will be used instead.  This
221		defaults on if your compiler defines __STDC__.
222HASSETREUID	Define this if you have setreuid(2) ***AND*** root can
223		use setreuid to change to an arbitrary user.  This second
224		condition is not satisfied on AIX 3.x.  You may find that
225		your system has setresuid(2), (for example, on HP-UX) in
226		which case you will also have to #define setreuid(r, e)
227		to be the appropriate call.  Some systems (such as Solaris)
228		have a compatibility routine that doesn't work properly,
229		but may have "saved user ids" properly implemented so you
230		can ``#define setreuid(r, e) seteuid(e)'' and have it work.
231		The important thing is that you have a call that will set
232		the effective uid independently of the real or saved uid
233		and be able to set the effective uid back again when done.
234		There's a test program in ../test/t_setreuid.c that will
235		try things on your system.  Setting this improves the
236		security, since sendmail doesn't have to read .forward
237		and :include: files as root.  There are certain attacks
238		that may be unpreventable without this call.
239USESETEUID	Define this to 1 if you have a seteuid(2) system call that
240		will allow root to set only the effective user id to an
241		arbitrary value ***AND*** you have saved user ids.  This is
242		preferable to HASSETREUID if these conditions are fulfilled.
243		These are the semantics of the to-be-released revision of
244		Posix.1.  The test program ../test/t_seteuid.c will try
245		this out on your system.  If you define both HASSETREUID
246		and USESETEUID, the former is ignored.
247HASLSTAT	Define this if you have symbolic links (and thus the
248		lstat(2) system call).  This improves security.  Unlike
249		most other options, this one is on by default, so you
250		need to #undef it in conf.h if you don't have symbolic
251		links (these days everyone does).
252HASSETRLIMIT	Define this to 1 if you have the setrlimit(2) syscall.
253		You can define it to 0 to force it off.  It is assumed
254		if you are running a BSD-like system.
255HASULIMIT	Define this if you have the ulimit(2) syscall (System V
256		style systems).  HASSETRLIMIT overrides, as it is more
257		general.
258HASWAITPID	Define this if you have the waitpid(2) syscall.
259HASGETDTABLESIZE
260		Define this if you have the getdtablesize(2) syscall.
261HAS_ST_GEN	Define this to 1 if your system has the st_gen field in
262		the stat structure (see stat(2)).
263USESTRERROR	Define this if you have the libc strerror function (which
264		should be declared in <errno.h>), and it should be used
265		instead of sys_errlist.
266NEEDGETOPT	Define this if you need a reimplementation of getopt(3).
267		On some systems, getopt does very odd things if called
268		to scan the arguments twice.  This flag will ask sendmail
269		to compile in a local version of getopt that works
270		properly.
271NEEDSTRTOL	Define this if your standard C library does not define
272		strtol(3).  This will compile in a local version.
273NEEDVPRINTF	Define this if your standard C library does not define
274		vprintf(3).  Note that the resulting fake implementation
275		is not very elegant and may not even work on some
276		architectures.
277NEEDFSYNC	Define this if your standard C library does not define
278		fsync(2).  This will try to simulate the operation using
279		fcntl(2); if that is not available it does nothing, which
280		isn't great, but at least it compiles and runs.
281HASGETUSERSHELL	Define this to 1 if you have getusershell(3) in your
282		standard C library.  If this is not defined, or is defined
283		to be 0, sendmail will scan the /etc/shells file (no
284		NIS-style support, defaults to /bin/sh and /bin/csh if
285		that file does not exist) to get a list of unrestricted
286		user shells.  This is used to determine whether users
287		are allowed to forward their mail to a program or a file.
288NEEDPUTENV	Define this if your system needs am emulation of the
289		putenv(3) call.  Define to 1 to implement it in terms
290		of setenv(3) or to 2 to do it in terms of primitives.
291NOFTRUNCATE	Define this if you don't have the ftruncate(2) syscall.
292		If you don't have this system call, there is an unavoidable
293		race condition that occurs when creating alias databases.
294GIDSET_T	The type of entries in a gidset passed as the second
295		argument to getgroups(2).  Historically this has been an
296		int, so this is the default, but some systems (such as
297		IRIX) pass it as a gid_t, which is an unsigned short.
298		This will make a difference, so it is important to get
299		this right!  However, it is only an issue if you have
300		group sets.
301SLEEP_T		The type returned by the system sleep() function.
302		Defaults to "unsigned int".  Don't worry about this
303		if you don't have compilation problems.
304ARBPTR_T	The type of an arbitrary pointer -- defaults to "void *".
305		If you are an very old compiler you may need to define
306		this to be "char *".
307SOCKADDR_LEN_T	The type used for the third parameter to accept(2),
308		getsockname(2), and getpeername(2), representing the
309		length of a struct sockaddr.  Defaults to int.
310SOCKOPT_LEN_T	The type used for the fifth parameter to getsockopt(2)
311		and setsockopt(2), representing the length of the option
312		buffer.  Defaults to int.
313LA_TYPE		The type of load average your kernel supports.  These
314		can be one of:
315		 LA_ZERO (1) -- it always returns the load average as
316			"zero" (and does so on all architectures).
317		 LA_INT (2) to read /dev/kmem for the symbol avenrun and
318			interpret as a long integer.
319		 LA_FLOAT (3) same, but interpret the result as a floating
320			point number.
321		 LA_SHORT (6) to interpret as a short integer.
322		 LA_SUBR (4) if you have the getloadavg(3) routine in your
323			system library.
324		 LA_MACH (5) to use MACH-style load averages (calls
325			processor_set_info()),
326		 LA_PROCSTR (7) to read /proc/loadavg and interpret it
327			as a string representing a floating-point
328			number (Linux-style).
329		 LA_READKSYM (8) is an implementation suitable for some
330			versions of SVr4 that uses the MIOC_READKSYM ioctl
331			call to read /dev/kmem.
332		 LA_DGUX (9) is a special implementation for DG/UX that uses
333			the dg_sys_info system call.
334		 LA_HPUX (10) is an HP-UX specific version that uses the
335			pstat_getdynamic system call.
336		 LA_IRIX6 (11) is an IRIX 6.x specific version that adapts
337			to 32 or 64 bit kernels; it is otherwise very similar
338			to LA_INT.
339		 LA_KSTAT (12) uses the (Solaris-specific) kstat(3k)
340			implementation.
341		 LA_DEVSHORT (13) reads a short from a system file (default:
342			/dev/table/avenrun) and scales it in the same manner
343			as LA_SHORT.
344		LA_INT, LA_SHORT, LA_FLOAT, and LA_READKSYM have several
345		other parameters that they try to divine: the name of your
346		kernel, the name of the variable in the kernel to examine,
347		the number of bits of precision in a fixed point load average,
348		and so forth.  LA_DEVSHORT uses _PATH_AVENRUN to find the
349		device to be read to find the load average.
350		In desperation, use LA_ZERO.  The actual code is in
351		conf.c -- it can be tweaked if you are brave.
352FSHIFT		For LA_INT, LA_SHORT, and LA_READKSYM, this is the number
353		of bits of load average after the binary point -- i.e.,
354		the number of bits to shift right in order to scale the
355		integer to get the true integer load average.  Defaults to 8.
356_PATH_UNIX	The path to your kernel.  Needed only for LA_INT, LA_SHORT,
357		and LA_FLOAT.  Defaults to "/unix" on System V, "/vmunix"
358		everywhere else.
359LA_AVENRUN	For LA_INT, LA_SHORT, and LA_FLOAT, the name of the kernel
360		variable that holds the load average.  Defaults to "avenrun"
361		on System V, "_avenrun" everywhere else.
362SFS_TYPE	Encodes how your kernel can locate the amount of free
363		space on a disk partition.  This can be set to SFS_NONE
364		(0) if you have no way of getting this information,
365		SFS_USTAT (1) if you have the ustat(2) system call,
366		SFS_4ARGS (2) if you have a four-argument statfs(2)
367		system call (and the include file is <sys/statfs.h>),
368		SFS_VFS (3), SFS_MOUNT (4), SFS_STATFS (5) if you have
369		the two-argument statfs(2) system call with includes in
370		<sys/vfs.h>, <sys/mount.h>, or <sys/statfs.h> respectively,
371		or SFS_STATVFS (6) if you have the two-argument statvfs(2)
372		call.  The default if nothing is defined is SFS_NONE.
373SFS_BAVAIL	with SFS_4ARGS you can also set SFS_BAVAIL to the field name
374		in the statfs structure that holds the useful information;
375		this defaults to f_bavail.
376SPT_TYPE	Encodes how your system can display what a process is doing
377		on a ps(1) command (SPT stands for Set Process Title).  Can
378		be set to:
379		SPT_NONE (0) -- Don't try to set the process title at all.
380		SPT_REUSEARGV (1) -- Pad out your argv with the information;
381			this is the default if none specified.
382		SPT_BUILTIN (2) -- The system library has setproctitle.
383		SPT_PSTAT (3) -- Use the PSTAT_SETCMD option to pstat(2)
384			to set the process title; this is used by HP-UX.
385		SPT_PSSTRINGS (4) -- Use the magic PS_STRINGS pointer (4.4BSD).
386		SPT_SYSMIPS (5) -- Use sysmips() supported by NEWS-OS 6.
387		SPT_SCO (6) -- Write kernel u. area.
388		SPT_CHANGEARGV (7) -- Write pointers to our own strings into
389			the existing argv vector.
390SPT_PADCHAR	Character used to pad the process title; if undefined,
391		the space character (0x20) is used.  This is ignored if
392		SPT_TYPE != SPT_REUSEARGV
393ERRLIST_PREDEFINED
394		If set, assumes that some header file defines sys_errlist.
395		This may be needed if you get type conflicts on this
396		variable -- otherwise don't worry about it.
397WAITUNION	The wait(2) routine takes a "union wait" argument instead
398		of an integer argument.  This is for compatibility with
399		old versions of BSD.
400SCANF		You can set this to extend the F command to accept a
401		scanf string -- this gives you a primitive parser for
402		class definitions -- BUT it can make you vulnerable to
403		core dumps if the target file is poorly formed.
404SYSLOG_BUFSIZE	You can define this to be the size of the buffer that
405		syslog accepts.  If it is not defined, it assumes a
406		1024-byte buffer.  If the buffer is very small (under
407		256 bytes) the log message format changes -- each
408		e-mail message will log many more messages, since it
409		will log each piece of information as a separate line
410		in syslog.
411BROKEN_RES_SEARCH
412		On Ultrix (and maybe other systems?) if you use the
413		res_search routine with an unknown host name, it returns
414		-1 but sets h_errno to 0 instead of HOST_NOT_FOUND.  If
415		you set this, sendmail considers 0 to be the same as
416		HOST_NOT_FOUND.
417NAMELISTMASK	If defined, values returned by nlist(3) are masked
418		against this value before use -- a common value is
419		0x7fffffff to strip off the top bit.
420BSD4_4_SOCKADDR	If defined, socket addresses have an sa_len field that
421		defines the length of this address.
422SAFENFSPATHCONF	Set this to 1 if and only if you have verified that a
423		pathconf(2) call with _PC_CHOWN_RESTRICTED argument on an
424		NFS filesystem where the underlying system allows users to
425		give away files to other users returns <= 0.  Be sure you
426		try both on NFS V2 and V3.  Some systems assume that their
427		local policy apply to NFS servers -- this is a bad
428		assumption!  The test/t_pathconf.c program will try this
429		for you -- you have to run it in a directory that is
430		mounted from a server that allows file giveaway.
431SIOCGIFCONF_IS_BROKEN
432		Set this if your system has an SIOCGIFCONF ioctl defined,
433		but it doesn't behave the same way as "most" systems (BSD,
434		Solaris, SunOS, HP-UX, etc.)
435SIOCGIFNUM_IS_BROKEN
436		Set this if your system has an SIOCGIFNUM ioctl defined,
437		but it doesn't behave the same way as "most" systems
438		(Solaris, HP-UX).
439NEED_PERCENTQ	Set this if your system doesn't support the printf
440		format strings %lld or %llu.  If this is set, %qd and
441		%qu are used instead.
442
443
444
445+-----------------------+
446| COMPILE-TIME FEATURES |
447+-----------------------+
448
449There are a bunch of features that you can decide to compile in, such
450as selecting various database packages and special protocol support.
451Several are assumed based on other compilation flags -- if you want to
452"un-assume" something, you probably need to edit conf.h.  Compilation
453flags that add support for special features include:
454
455NDBM		Include support for "new" DBM library for aliases and maps.
456		Normally defined in the Makefile.
457NEWDB		Include support for Berkeley DB package (hash & btree)
458		for aliases and maps.  Normally defined in the Makefile.
459		If the version of NEWDB you have is the old one that does
460		not include the "fd" call (this call was added in version
461		1.5 of the Berkeley DB code), you must upgrade to the
462		current version of Berkeley DB.
463NIS		Define this to get NIS (YP) support for aliases and maps.
464		Normally defined in the Makefile.
465NISPLUS		Define this to get NIS+ support for aliases and maps.
466		Normally defined in the Makefile.
467HESIOD		Define this to get Hesiod support for aliases and maps.
468		Normally defined in the Makefile.
469NETINFO		Define this to get NeXT NetInfo support for aliases and maps.
470		Normally defined in the Makefile.
471USERDB		Define this to 1 to include support for the User Information
472		Database.  Implied by NEWDB or HESIOD.  You can use
473		-DUSERDB=0 to explicitly turn it off.
474IDENTPROTO	Define this as 1 to get IDENT (RFC 1413) protocol support.
475		This is assumed unless you are running on Ultrix or
476		HP-UX, both of which have a problem in the UDP
477		implementation.  You can define it to be 0 to explicitly
478		turn off IDENT protocol support.  If defined off, the code
479		is actually still compiled in, but it defaults off; you
480		can turn it on by setting the IDENT timeout to 30s in the
481		configuration file.
482IP_SRCROUTE	Define this to 1 to get IP source routing information
483		displayed in the Received: header.  This is assumed on
484		most systems, but some (e.g., Ultrix) apparently have a
485		broken version of getsockopt that doesn't properly
486		support the IP_OPTIONS call.  You probably want this if
487		your OS can cope with it.  Symptoms of failure will be that
488		it won't compile properly (that is, no support for fetching
489		IP_OPTIONs), or it compiles but source-routed TCP connections
490		either refuse to open or open and hang for no apparent reason.
491		Ultrix and AIX3 are known to fail this way.
492LOG		Set this to get syslog(3) support.  Defined by default
493		in conf.h.  You want this if at all possible.
494NETINET		Set this to get TCP/IP support.  Defined by default
495		in conf.h.  You probably want this.
496NETISO		Define this to get ISO networking support.
497NETUNIX		Define this to get Unix domain networking support.  Defined
498		by default.  A few bizarre systems (SCO, ISC, Altos) don't
499		support this networking domain.
500SMTP		Define this to get the SMTP code.  Implied by NETINET
501		or NETISO.
502NAMED_BIND	If non-zero, include DNS (name daemon) support, including
503		MX support.  The specs say you must use this if you run
504		SMTP.  You don't have to be running a name server daemon
505		on your machine to need this -- any use of the DNS resolver,
506		including remote access to another machine, requires this
507		option.  Defined by default in conf.h.  Define it to zero
508		ONLY on machines that do not use DNS in any way.
509QUEUE		Define this to get queueing code.  Implied by NETINET
510		or NETISO; required by SMTP.  This gives you other good
511		stuff -- it should be on.
512DAEMON		Define this to get general network support.  Implied by
513		NETINET or NETISO.  Defined by default in conf.h.  You
514		almost certainly want it on.
515MATCHGECOS	Permit fuzzy matching of user names against the full
516		name (GECOS) field in the /etc/passwd file.  This should
517		probably be on, since you can disable it from the config
518		file if you want to.  Defined by default in conf.h.
519MIME8TO7	If non-zero, include 8 to 7 bit MIME conversions.  This
520		also controls advertisement of 8BITMIME in the ESMTP
521		startup dialogue.
522MIME7TO8	If non-zero, include 7 to 8 bit MIME conversions.
523HES_GETMAILHOST	Define this to 1 if you are using Hesiod with the
524		hes_getmailhost() routine.  This is included with the MIT
525		Hesiod distribution, but not with the DEC Hesiod distribution.
526XDEBUG		Do additional internal checking.  These don't cost too
527		much; you might as well leave this on.
528TCPWRAPPERS	Turns on support for the TCP wrappers library (-lwrap).
529		See below for further information.
530SECUREWARE	Enable calls to the SecureWare luid enabling/changing routines.
531		SecureWare is a C2 security package added to several UNIX's
532		(notably ConvexOS) to get a C2 Secure system.  This
533		option causes mail delivery to be done with the luid of the
534		recipient.
535SHARE_V1	Support for the fair share scheduler, version 1.  Setting to
536		1 causes final delivery to be done using the recipients
537		resource limitations.  So far as I know, this is only
538		supported on ConvexOS.
539
540
541+---------------------+
542| DNS/RESOLVER ISSUES |
543+---------------------+
544
545Many systems have old versions of the resolver library.  At a minimum,
546you should be running BIND 4.8.3; older versions may compile, but they
547have known bugs that should give you pause.
548
549Common problems in old versions include "undefined" errors for
550dn_skipname.
551
552Some people have had a problem with BIND 4.9; it uses some routines
553that it expects to be externally defined such as strerror().  It may
554help to link with "-l44bsd" to solve this problem.  This has apparently
555been fixed in later versions of BIND, starting around 4.9.3.  In other
556words, if you use 4.9.0 through 4.9.2, you need -l44bsd; for earlier or
557later versions, you do not.
558
559!PLEASE! be sure to link with the same version of the resolver as
560the header files you used -- some people have used the 4.9 headers
561and linked with BIND 4.8 or vice versa, and it doesn't work.
562Unfortunately, it doesn't fail in an obvious way -- things just
563subtly don't work.
564
565WILDCARD MX RECORDS ARE A BAD IDEA!  The only situation in which they
566work reliably is if you have two versions of DNS, one in the real world
567which has a wildcard pointing to your firewall, and a completely
568different version of the database internally that does not include
569wildcard MX records that match your domain.  ANYTHING ELSE WILL GIVE
570YOU HEADACHES!
571
572
573+-------------------------------------+
574| OPERATING SYSTEM AND COMPILE QUIRKS |
575+-------------------------------------+
576
577GCC problems
578	*****************************************************************
579	**  IMPORTANT:  DO NOT USE OPTIMIZATION (``-O'') IF YOU ARE    **
580	**  RUNNING GCC 2.4.x or 2.5.x.  THERE IS A BUG IN THE GCC     **
581	**  OPTIMIZER THAT CAUSES SENDMAIL COMPILES TO FAIL MISERABLY. **
582	*****************************************************************
583
584	Jim Wilson of Cygnus believes he has found the problem -- it will
585	probably be fixed in GCC 2.5.6 -- but until this is verified, be
586	very suspicious of gcc -O.  This problem is reported to have been
587	fixed in gcc 2.6.
588
589	A bug in gcc 2.5.5 caused problems compiling sendmail 8.6.5 with
590	optimization on a Sparc.  If you are using gcc 2.5.5, youi should
591	upgrade to the latest version of gcc.
592
593	Apparently GCC 2.7.0 on the Pentium processor has optimization
594	problems.  I recommend against using -O on that architecture.  This
595	has been seen on FreeBSD 2.0.5 RELEASE.
596
597	Solaris 2.X users should use version 2.7.2.3 over 2.7.2.
598
599	We have been told there are problems with gcc 2.8.0.  If you are
600	using this version, you should upgrade to 2.8.1 or later.
601
602GDBM	GDBM does not work with sendmail 8.8 because the additional
603	security checks and file locking cause problems.  Unfortunately,
604	gdbm does not provide a compile flag in its version of ndbm.h so
605	the code can adapt.  Until the GDBM authors can fix these problems,
606	GDBM will not be supported.  Please use Berkeley DB instead.
607
608Configuration file location
609	Up to 8.6, sendmail tried to find the sendmail.cf file in the same
610	place as the vendors had put it, even when this was obviously
611	stupid.  As of 8.7, sendmail ALWAYS looks for /etc/sendmail.cf.
612	Beginning with 8.10, sendmail will use /etc/mail/sendmail.cf.
613	You can get sendmail to use the stupid vendor .cf location by
614	adding -DUSE_VENDOR_CF_PATH during compilation, but this may break
615	support programs and scripts that need to find sendmail.cf.  You
616	are STRONGLY urged to use symbolic links if you want to use the
617	vendor location rather than changing the location in the sendmail
618	binary.
619
620SunOS 4.x (Solaris 1.x)
621	You may have to use -lresolv on SunOS.  However, beware that
622	this links in a new version of gethostbyname that does not
623	understand NIS, so you must have all of your hosts in DNS.
624
625	Some people have reported problems with the SunOS version of
626	-lresolv and/or in.named, and suggest that you get a newer
627	version.  The symptoms are delays when you connect to the
628	SMTP server on a SunOS machine or having your domain added to
629	addresses inappropriately.  There is a version of BIND
630	version 4.9 on gatekeeper.DEC.COM in pub/BSD/bind/4.9.
631
632	There is substantial disagreement about whether you can make
633	this work with resolv+, which allows you to specify a search-path
634	of services.  Some people report that it works fine, others
635	claim it doesn't work at all (including causing sendmail to
636	drop core when it tries to do multiple resolv+ lookups for a
637	single job).  I haven't tried resolv+, as we use DNS exclusively.
638
639	Should you want to try resolv+, it is on ftp.uu.net in
640	/networking/ip/dns.
641
642	Apparently getservbyname() can fail under moderate to high
643	load under some circumstances.  This will exhibit itself as
644	the message ``554 makeconnection: service "smtp" unknown''.
645	The problem has been traced to one or more blank lines in
646	/etc/services on the NIS server machine.  Delete these
647	and it should work.  This info is thanks to Brian Bartholomew
648	<bb@math.ufl.edu> of I-Kinetics, Inc.
649
650SunOS 4.0.2 (Sun 386i)
651	Date: Fri, 25 Aug 1995 11:13:58 +0200 (MET DST)
652	From: teus@oce.nl
653
654	Sendmail 8.7.Beta.12 compiles and runs nearly out of the box with the
655	following changes:
656	* Don't use /usr/5bin in your PATH, but make /usr/5bin/uname
657	  available as "uname" command.
658	* Use the defines "-DBSD4_3 -DNAMED_BIND=0" in
659	  BuildTools/OS/SunOS.4.0, which is selected via the "uname" command.
660	I recommend to make available the db-library on the system first
661	(and change the Makefile to use this library).
662	Note that the sendmail.cf and aliases files are found in /etc.
663
664SunOS 4.1.3, 4.1.3_U1
665	Sendmail causes crashes on SunOS 4.1.3 and 4.1.3_U1.  According
666	to Sun bug number 1077939:
667
668	If an application does a getsockopt() on a SOCK_STREAM (TCP) socket
669	after the other side of the connection has sent a TCP RESET for
670	the stream, the kernel gets a Bus Trap in the tcp_ctloutput() or
671	ip_ctloutput() routine.
672
673	For 4.1.3, this is fixed in patch 100584-08, available on the
674	Sunsolve 2.7.1 or later CDs.  For 4.1.3_U1, this was fixed in patch
675	101790-01 (SunOS 4.1.3_U1: TCP socket and reset problems), later
676	obsoleted by patch 102010-05.
677
678	Sun patch 100584-08 is not currently publicly available on their
679	ftp site but a user has reported it can be found at other sites
680	using a web search engine.
681
682Solaris 2.x (SunOS 5.x)
683	To compile for Solaris, the Makefile built by Build must
684	include a SOLARIS definition which reflects the Solaris version
685	(i.e. -DSOLARIS=20400 for 2.4 or -DSOLARIS=20501 for 2.5.1).
686	If you are using gcc, make sure -I/usr/include is not used (or
687	it might complain about TopFrame).  If you are using Sun's cc,
688	make sure /opt/SUNWspro/bin/cc is used instead of /usr/ucb/cc
689	(or it might complain about tm_zone).
690
691	To the best of my knowledge, Solaris does not have the
692	gethostbyname problem described above.  However, it does
693	have another one:
694
695	From a correspondent:
696
697	   For solaris 2.2, I have
698
699		hosts:      files dns
700
701	   in /etc/nsswitch.conf and /etc/hosts has to have the fully
702	   qualified host name. I think "files" has to be before "dns"
703	   in /etc/nsswitch.conf during bootup.
704
705	From another correspondent:
706
707	   When running sendmail under Solaris, the gethostbyname()
708	   hack in conf.c which should perform proper canonicalization
709	   of host names could fail.  Result: the host name is not
710	   canonicalized despite the hack, and you'll have to define $j
711	   and $m in sendmail.cf somewhere.
712
713	   The reason could be that /etc/nsswitch.conf is improperly
714	   configured (at least from sendmail's point of view).  For
715	   example, the line
716
717		hosts:      files nisplus dns
718
719	   will make gethostbyname() look in /etc/hosts first, then ask
720	   nisplus, then dns.  However, if /etc/hosts does not contain
721	   the full canonicalized hostname, then no amount of
722	   gethostbyname()s will work.
723
724	   Solution (or rather, a workaround): Ask nisplus first, then
725	   dns, then local files:
726
727		hosts:      nisplus dns [NOTFOUND=return] files
728
729	The Solaris "syslog" function is apparently limited to something
730	about 90 characters because of a kernel limitation.  If you have
731	source code, you can probably up this number.  You can get patches
732	that fix this problem: the patch ids are:
733
734		Solaris 2.1	100834
735		Solaris 2.2	100999
736		Solaris 2.3	101318
737
738	Be sure you have the appropriate patch installed or you won't
739	see system logging.
740
741Solaris 2.4 (SunOS 5.4)
742	If you include /usr/lib at the end of your LD_LIBRARY_PATH you run
743	the risk of getting the wrong libraries under some circumstances.
744	This is because of a new feature in Solaris 2.4, described by
745	Rod.Evans@Eng.Sun.COM:
746
747	>> Prior to SunOS 5.4, any LD_LIBRARY_PATH setting was ignored by the
748	>> runtime linker if the application was setxid (secure), thus your
749	>> applications search path would be:
750	>>
751	>>	/usr/local/lib	LD_LIBRARY_PATH component - IGNORED
752	>>	/usr/lib	LD_LIBRARY_PATH component - IGNORED
753	>>	/usr/local/lib	RPATH - honored
754	>>	/usr/lib	RPATH - honored
755	>>
756	>> the effect is that path 3 would be the first used, and this would
757	>> satisfy your resolv.so lookup.
758	>>
759	>> In SunOS 5.4 we made the LD_LIBRARY_PATH a little more flexible.
760	>> People who developed setxid applications wanted to be able to alter
761	>> the library search path to some degree to allow for their own
762	>> testing and debugging mechanisms.  It was decided that the only
763	>> secure way to do this was to allow a `trusted' path to be used in
764	>> LD_LIBRARY_PATH.  The only trusted directory we presently define
765	>> is /usr/lib.  Thus a setuid root developer could play with some
766	>> alternative shared object implementations and place them in
767	>> /usr/lib (being root we assume they'ed have access to write in this
768	>> directory).  This change was made as part of 1155380 - after a
769	>> *huge* amount of discussion regarding the security aspect of things.
770	>>
771	>> So, in SunOS 5.4 your applications search path would be:
772	>>
773	>>	/usr/local/lib	from LD_LIBRARY_PATH - IGNORED (untrustworthy)
774	>>	/usr/lib	from LD_LIBRARY_PATH - honored (trustworthy)
775	>>	/usr/local/lib	from RPATH - honored
776	>>	/usr/lib	from RPATH - honored
777	>>
778	>> here, path 2 would be the first used.
779
780Solaris 2.6 (SunOS 5.6)
781	If you built sendmail 8.8.1 through 8.8.4 inclusive on a Solaris 2.5
782	system, that binary will not run on Solaris 2.6, due to problems with
783	incompatible snprintf(3s) calls.  This problem is fixed in sendmail
784	8.8.5.
785
786Solaris 2.5.1 (SunOS 5.5.1) and 2.6 (SunOS 5.6)
787	Apparently Solaris 2.5.1 patch 103663-01 installs a new
788	/usr/include/resolv.h file that defines the __P macro without
789	checking to see if it is already defined.  This new resolv.h is also
790	included in the Solaris 2.6 distribution. This causes compile
791	warnings such as:
792
793	   In file included from daemon.c:51:
794	   /usr/include/resolv.h:208: warning: `__P' redefined
795	   cdefs.h:58: warning: this is the location of the previous definition
796
797	These warnings can be safely ignored or you can create a resolv.h
798	file in the obj.SunOS.5.5.1.* or obj.SunOS.5.6.* directory that reads:
799
800	   #undef __P
801	   #include "/usr/include/resolv.h"
802
803	Sun is aware of the problem (Sun bug ID 4081053) and it will be fixed
804	in Solaris 2.7.
805
806Ultrix
807	By default, the IDENT protocol is turned off on Ultrix.  If you
808	are running Ultrix 4.4 or later, or if you have included patch
809	CXO-8919 for Ultrix 4.2 or 4.3 to fix the TCP problem, you can turn
810	IDENT on in the configuration file by setting the "ident" timeout
811	to 30 seconds.
812
813Digital UNIX (formerly DEC OSF/1)
814	If you are compiling on OSF/1 (DEC Alpha), you must use
815	-L/usr/shlib (otherwise it core dumps on startup).  You may also
816	need -mld to get the nlist() function, although some versions
817	apparently don't need this.
818	
819	Also, the enclosed makefile removed /usr/sbin/smtpd; if you need
820	it, just create the link to the sendmail binary.
821
822	On DEC OSF/1 3.2 or earlier, the MatchGECOS option doesn't work
823	properly due to a bug in the getpw* routines.  If you want to use
824	this, use -DDEC_OSF_BROKEN_GETPWENT=1.  The problem is fixed in 3.2C.
825
826	Digital's mail delivery agent, /bin/mail (aka /bin/binmail), will
827	only preserve the envelope sender in the "From " header if
828	DefaultUserID is set to daemon.  Setting this to mailnull will
829	cause all mail to have the header "From mailnull ...".  To use
830	a different DefaultUserID, you will need to use a different mail
831	delivery agent (such as mail.local found in the sendmail
832	distribution).
833
834	On Digital UNIX 4.0 and later, Berkeley DB 1.85 is included with the
835	operating system and already has the ndbm.o module removed.  However,
836	Digital has modified the original Berkeley DB db.h include file.
837	This results in the following warning while compiling map.c and udb.c:
838
839	cc: Warning: /usr/include/db.h, line 74: The redefinition of the macro
840	 "__signed" conflicts with a current definition because the replacement
841	 lists differ.  The redefinition is now in effect.
842	#define __signed        signed
843	------------------------^
844
845	This warning can be ignored.
846
847IRIX
848	The header files on SGI IRIX are completely prototyped, and as
849	a result you can sometimes get some warning messages during
850	compilation.  These can be ignored.  There are two errors in
851	deliver only if you are using gcc, both of the form ``warning:
852	passing arg N of `execve' from incompatible pointer type''.
853	Also, if you compile with -DNIS, you will get a complaint
854	about a declaration of struct dom_binding in a prototype
855	when compiling map.c; this is not important because the
856	function being prototyped is not used in that file.
857
858	In order to compile sendmail you will have had to install
859	the developers' option in order to get the necessary include
860	files.
861
862	If you compile with -lmalloc (the fast memory allocator), you may
863	get warning messages such as the following:
864
865	   ld32: WARNING 85: definition of _calloc in /usr/lib32/libmalloc.so
866		preempts that definition in /usr/lib32/mips3/libc.so.
867	   ld32: WARNING 85: definition of _malloc in /usr/lib32/libmalloc.so
868		preempts that definition in /usr/lib32/mips3/libc.so.
869	   ld32: WARNING 85: definition of _realloc in /usr/lib32/libmalloc.so
870		preempts that definition in /usr/lib32/mips3/libc.so.
871	   ld32: WARNING 85: definition of _free in /usr/lib32/libmalloc.so
872		preempts that definition in /usr/lib32/mips3/libc.so.
873	   ld32: WARNING 85: definition of _cfree in /usr/lib32/libmalloc.so
874		preempts that definition in /usr/lib32/mips3/libc.so.
875
876	These are unavoidable and innocuous -- just ignore them.
877
878	According to Dave Sill <de5@ornl.gov>, there is a version of the
879	Berkeley DB library patched to run on Irix 6.2 available from
880	http://reality.sgi.com/ariel/freeware/#db .
881
882IRIX 6.x
883	It is important that on IRIX 6.x you give used ABI in command
884	line of Build, otherwise configuration script does not work
885	correctly, e.g.,
886
887		sh Build -E ABI=-n32
888
889	If you are using XFS filesystem, avoid using ABI=-32 if possible.
890
891NeXT or NEXTSTEP
892	NEXTSTEP 3.3 and earlier ship with the old DBM library.  Also,
893	Berkeley DB does not currently run on NEXTSTEP.
894
895	If you are compiling on NEXTSTEP, you will have to create an
896	empty file "unistd.h" and create a file "dirent.h" containing:
897
898		#include <sys/dir.h>
899		#define dirent	direct
900
901	(BuildTools/OS/NeXT should try to do both of these for you.)
902
903	Apparently, there is a bug in getservbyname on Nextstep 3.0
904	that causes it to fail under some circumstances with the
905	message "SYSERR: service "smtp" unknown" logged.  You should
906	be able to work around this by including the line:
907
908		OOPort=25
909
910	in your .cf file.
911
912	You may have to use -DNeXT.
913
914BSDI (BSD/386) 1.0, NetBSD 0.9, FreeBSD 1.0
915	The "m4" from BSDI won't handle the config files properly.
916	I haven't had a chance to test this myself.
917
918	The M4 shipped in FreeBSD and NetBSD 0.9 don't handle the config
919	files properly. One must use either GNU m4 1.1 or the PD-M4
920	recently posted in comp.os.386bsd.bugs (and maybe others).
921	NetBSD-current includes the PD-M4 (as stated in the NetBSD file
922	CHANGES).
923	
924	FreeBSD 1.0 RELEASE has uname(2) now. Use -DUSEUNAME in order to
925	use it (look into BuildTools/OS/FreeBSD). NetBSD-current may have
926	it too but it has not been verified.
927
928	The latest version of Berkeley DB uses a different naming
929	scheme than the version that is supplied with your release.  This
930	means you will be able to use the current version of Berkeley DB
931	with sendmail as long you use the new db.h when compiling
932	sendmail and link it against the new libdb.a.  You should probably
933	keep the original db.h in /usr/include and the new db.h in
934	/usr/local/include.
935
9364.3BSD
937	If you are running a "virgin" version of 4.3BSD, you'll have
938	a very old resolver and be missing some header files.  The
939	header files are simple -- create empty versions and everything
940	will work fine.  For the resolver you should really port a new
941	version (4.8.3 or later) of the resolver; 4.9 is available on
942	gatekeeper.DEC.COM in pub/BSD/bind/4.9.  If you are really
943	determined to continue to use your old, buggy version (or as
944	a shortcut to get sendmail working -- I'm sure you have the
945	best intentions to port a modern version of BIND), you can
946	copy ../contrib/oldbind.compat.c into src and add
947	oldbind.compat.o to OBJADD in the Makefile.
948
949A/UX
950	Date: Tue, 12 Oct 1993 18:28:28 -0400 (EDT)
951	From: "Eric C. Hagberg" <hagberg@med.cornell.edu>
952	Subject: Fix for A/UX ndbm
953
954	I guess this isn't really a sendmail bug, however, it is something
955	that A/UX users should be aware of when compiling sendmail 8.6.
956
957	Apparently, the calls that sendmail is using to the ndbm routines
958	in A/UX 3.0.x contain calls to "broken" routines, in that the
959	aliases database will break when it gets "just a little big"
960	(sorry I don't have exact numbers here, but it broke somewhere
961	around 20-25 aliases for me.), making all aliases non-functional
962	after exceeding this point.
963
964	What I did was to get the gnu-dbm-1.6 package, compile it, and
965	then re-compile sendmail with "-lgdbm", "-DNDBM", and using the
966	ndbm.h header file that comes with the gnu-package. This makes
967	things behave properly.
968	  [NOTE: see comment above about GDBM]
969
970	I suppose porting the New Berkeley DB package is another route,
971	however, I made a quick attempt at it, and found it difficult
972	(not easy at least); the gnu-dbm package "configured" and
973	compiled easily.
974
975	  [NOTE: Berkeley DB version 2.X runs on A/UX and can be used for
976	  database maps.]
977
978SCO Unix
979	From: Thomas Essebier <tom@stallion.oz.au>
980	Organisation:  Stallion Technologies Pty Ltd.
981
982	It will probably help those who are trying to configure sendmail 8.6.9
983	to know that if they are on SCO, they had better set
984		OI-dnsrch
985	or they will core dump as soon as they try to use the resolver.
986	ie. although SCO has _res.dnsrch defined, and is kinda BIND 4.8.3, it
987	does not inititialise it, nor does it understand 'search' in
988	/etc/named.boot.
989		- sigh -
990
991	According to SCO, the m4 which ships with UnixWare 2.1.2 is broken.	
992	We recommend installing GNU m4 before attempting to build sendmail.
993
994DG/UX
995	Doug Anderson <dlander@afterlife.ncsc.mil> has successfully run
996	V8 on the DG/UX 5.4.2 and 5.4R3.x platforms under heavy usage.
997	Originally, the DG /bin/mail program wasn't compatible with
998	the V8 sendmail, since the DG /bin/mail requires the environment
999	variable "_FORCE_MAIL_LOCAL_=yes" be set.  Version 8.7 now includes
1000	this in the environment before invoking the local mailer.  Some
1001	have used procmail to avoid this problem in the past.  It works
1002	but some have experienced file locking problems with their DG/UX
1003	ports of procmail.
1004
1005Apollo DomainOS
1006	If you are compiling on Apollo, you will have to create an empty
1007	file "unistd.h" (for DomainOS 10.3 and earlier) and create a file
1008	"dirent.h" containing:
1009
1010		#include <sys/dir.h>
1011		#define dirent	direct
1012
1013	(BuildTools/OS/DomainOS will attempt to do both of these for you.)
1014
1015HP-UX 8.00
1016	Date: Mon, 24 Jan 1994 13:25:45 +0200
1017	From: Kimmo Suominen <Kimmo.Suominen@lut.fi>
1018	Subject: 8.6.5 w/ HP-UX 8.00 on s300
1019
1020	Just compiled and fought with sendmail 8.6.5 on a HP9000/360 (ie. a
1021	series 300 machine) running HP-UX 8.00.
1022
1023	I was getting segmentation fault when delivering to a local user.
1024	With debugging I saw it was faulting when doing _free@libc... *sigh*
1025	It seems the new implementation of malloc on s300 is buggy as of 8.0,
1026	so I tried out the one in -lmalloc (malloc(3X)).  With that it seems
1027	to work just dandy.
1028
1029	When linking, you will get the following error:
1030
1031	ld: multiply defined symbol _freespace in file /usr/lib/libmalloc.a
1032
1033	but you can just ignore it.  You might want to add this info to the
1034	README file for the future...
1035
1036Linux
1037	Something broke between versions 0.99.13 and 0.99.14 of Linux:
1038	the flock() system call gives errors.  If you are running .14,
1039	you must not use flock.  You can do this with -DHASFLOCK=0.
1040
1041	Around the inclusion of bind-4.9.3 & Linux libc-4.6.20, the
1042	initialization of the _res structure changed.  If /etc/hosts.conf
1043	was configured as "hosts, bind" the resolver code could return
1044	"Name server failure" errors.  This is supposedly fixed in
1045	later versions of libc (>= 4.6.29?), and later versions of
1046	sendmail (> 8.6.10) try to work around the problem.
1047
1048	Some older versions (< 4.6.20?) of the libc/include files conflict
1049	with sendmail's version of cdefs.h.  Deleting sendmail's version
1050	on those systems should be non-harmful, and new versions don't care.
1051
1052	Sendmail assumes that libc has snprintf, which has been true since
1053	libc 4.7.0.  If you are running an older version, you will need to
1054	use -DHASSNPRINTF=0 in the Makefile.  If may be able to use -lbsd
1055	(which includes snprintf) instead of turning this off on versions
1056	of libc between 4.4.4 and 4.7.0 (snprintf improves security, so
1057	you want to use this if at all possible).
1058
1059	NOTE ON LINUX & BIND:  By default, the Makefile generated for Linux
1060	includes header files in /usr/local/include and libraries in
1061	/usr/local/lib.  If you've installed BIND on your system, the header
1062	files typically end up in the search path and you need to add
1063	"-lresolv" to the LIBS line in your Makefile.  Really old versions
1064	may need to include "-l44bsd" as well (particularly if the link phase
1065	complains about missing strcasecmp, strncasecmp or strpbrk).
1066	Complaints about an undefined reference to `__dn_skipname' in
1067	domain.o are a sure sign that you need to add -lresolv to LIBS.
1068	Newer versions of Linux are basically threaded BIND, so you may or
1069	may not see complaints if you accidentally mix BIND
1070	headers/libraries with virginal libc.  If you have BIND headers in
1071	/usr/local/include (resolv.h, etc) you *should* be adding -lresolv
1072	to LIBS.  Data structures may change and you'd be asking for a
1073	core dump.
1074
1075AIX 3.x
1076	This version of sendmail does not support MB, MG, and MR resource
1077	records, which are supported by AIX sendmail.
1078
1079	Several people have reported that the IBM-supplied named returns
1080	fairly random results -- the named should be replaced.  It is not
1081	necessary to replace the resolver, which will simplify installation.
1082	A new BIND resolver can be found at http://www.isc.org/isc/.
1083
1084AIX 3.1.x
1085	The supplied load average code only works correctly for AIX 3.2.x.
1086	For 3.1, use -DLA_TYPE=LA_SUBR and get the latest ``monitor''
1087	package by Jussi Maki <jmaki@hut.fi> from ftp.funet.fi in the
1088	directory pub/unix/AIX/rs6000/monitor-1.12.tar.Z; use the loadavgd
1089	daemon, and the getloadavg subroutine supplied with that package.
1090	If you don't care about load average throttling, just turn off
1091	load average checking using -DLA_TYPE=LA_ZERO.
1092
1093AIX 2.2.1
1094	Date: Mon Dec  4 14:14:56 CST 1995
1095	From: Mark Whetzel <markw@antimatr.houston.tx.us>
1096	Subject: Porting sendmail 8.7.2 to AIX V2 on the RT.
1097	
1098	This version of sendmail does not support MB, MG, and MR resource
1099	records, which are supported by AIX sendmail.
1100
1101	AIX V2 on the RT does not have 'paths.h'.  Create a null
1102	file in the 'obj' directory to remove this compile error.
1103
1104	A patch file is needed to get the BSD 'db' library to compile
1105	for AIX/RT.  I have sent the necessary updates to the author,
1106	but they may not be immediately available.
1107	  [NOTE: Berkeley DB version 2.X runs on AIX/RT.]
1108
1109	The original AIX/RT resolver libraries are very old, and you
1110	should get the latest BIND to replace it.  The 4.8.3 version
1111	has been tested, but 4.9.x is out and should work.
1112
1113	To make the load average code work correctly requires an
1114	external routine, as the kernel does not maintain system
1115	load averages, similar to AIX V3.1.x.  A reverse port of the
1116	older 1.05 'monitor' load average daemon code written by
1117	Jussi Maki that will work on AIX V2 for the RT is available
1118	by E-mail to Mark Whetzel  <markw@antimatr.houston.tx.us>.
1119	That code depends on an external daemon to collect system
1120	load information, and the external routine 'getloadavg',
1121	that will return that information.  The 'LA_SUBR' define
1122	will handle this for AIX V2 on the RT.
1123
1124	Note: You will have to change BuildTools/OS/AIX.2 to correctly
1125	point to the locatons of the updated BIND source tree and
1126	the location of the 'newdb' tree and library location.
1127	You will also have to change BuildTools/OS/AIX.2 to know
1128	about the location of the 'getloadavg' routine if you use
1129	the LA_SUBR define.
1130
1131	
1132	Manual pages will format correctly if given the mandoc macros
1133	and used with nroff.  I have not tried groff.
1134
1135RISC/os
1136	RISC/os from MIPS is a merged AT&T/Berkeley system.  When you
1137	compile on that platform you will get duplicate definitions
1138	on many files.  You can ignore these.
1139
1140System V Release 4 Based Systems
1141	There is a single BuildTools OS that is intended for all SVR4-based
1142	systems (built from BuildTools/OS/SVR4).  It defines __svr4__,
1143	which is predefined by some compilers.  If your compiler already
1144	defines this compile variable, you can delete the definition from
1145	the generated Makefile or create a BuildTools/Site/site.config.m4
1146	file.
1147
1148	It's been tested on Dell Issue 2.2.
1149
1150DELL SVR4
1151	Date:      Mon, 06 Dec 1993 10:42:29 EST
1152	From: "Kimmo Suominen" <kim@grendel.lut.fi>
1153	Message-ID: <2d0352f9.lento29@lento29.UUCP>
1154	To: eric@cs.berkeley.edu
1155	Cc: sendmail@cs.berkeley.edu
1156	Subject:   Notes for DELL SVR4
1157
1158	Eric,
1159
1160	Here are some notes for compiling Sendmail 8.6.4 on DELL SVR4.  I ran
1161	across these things when helping out some people who contacted me by
1162	e-mail.
1163
1164	1) Use gcc 2.4.5 (or later?).  Dell distributes gcc 2.1 with their
1165	   Issue 2.2 Unix.  It is too old, and gives you problems with
1166	   clock.c, because sigset_t won't get defined in <sys/signal.h>.
1167	   This is due to a problematic protection rule in there, and is
1168	   fixed with gcc 2.4.5.
1169
1170	2) If you don't use the new Berkeley DB (-DNEWDB), then you need
1171	   to add "-lc -lucb" to the libraries to link with.  This is because
1172	   the -ldbm distributed by Dell needs the bcopy, bcmp and bzero
1173	   functions.  It is important that you specify both libraries in
1174	   the given order to be sure you only get the BSTRING functions
1175	   from the UCB library (and not the signal routines etc.).
1176
1177	3) Don't leave out "-lelf" even if compiling with "-lc -lucb".
1178	   The UCB library also has another copy of the nlist routines,
1179	   but we do want the ones from "-lelf".
1180
1181	If anyone needs a compiled gcc 2.4.5 and/or a ported DB library, they
1182	can use anonymous ftp to fetch them from lut.fi in the /kim directory.
1183	They are copies of what I use on grendel.lut.fi, and offering them
1184	does not imply that I would also support them.  I have sent the DB
1185	port for SVR4 back to Keith Bostic for inclusion in the official
1186	distribution, but I haven't heard anything from him as of today.
1187
1188	- gcc-2.4.5-svr4.tar.gz	(gcc 2.4.5 and the corresponding libg++)
1189	- db-1.72.tar.gz	(with source, objects and a installed copy)
1190
1191	Cheers
1192	+ Kim
1193	--
1194	 *  Kimmo.Suominen@lut.fi  *  SysVr4 enthusiast at GRENDEL.LUT.FI  *
1195	*    KIM@FINFILES.BITNET   *  Postmaster and Hostmaster at LUT.FI   *
1196	 *    + 358 200 865 718    *  Unix area moderator at NIC.FUNET.FI  *
1197
1198ConvexOS 10.1 and below
1199	In order to use the name server, you must create the file
1200	/etc/use_nameserver.  If this file does not exist, the call
1201	to res_init() will fail and you will have absolutely no
1202	access to DNS, including MX records.
1203
1204Amdahl UTS 2.1.5
1205	In order to get UTS to work, you will have to port BIND 4.9.
1206	The vendor's BIND is reported to be ``totally inadequate.''
1207	See sendmail/contrib/AmdahlUTS.patch for the patches necessary
1208	to get BIND 4.9 compiled for UTS.
1209
1210UnixWare
1211	According to Alexander Kolbasov <sasha@unitech.gamma.ru>,
1212	the m4 on UnixWare 2.0 (still in Beta) will core dump on the
1213	config files.  GNU m4 and the m4 from UnixWare 1.x both work.
1214
1215	According to Larry Rosenman <ler@lerami.lerctr.org>:
1216
1217		UnixWare 2.1.[23]'s m4 chokes (not obviously) when
1218		processing the 8.9.0 cf files. 
1219 
1220		I had a LOCAL_RULE_0 that wound up AFTER the
1221		SBasic_check_rcpt rules using the SCO supplied M4.
1222		GNU M4 works fine. 
1223
1224UNICOS 8.0.3.4
1225	Some people have reported that the -O flag on UNICOS can cause
1226	problems.  You may want to turn this off if you have problems
1227	running sendmail.  Reported by Jerry G. DeLapp <jgd@acl.lanl.gov>.
1228
1229GNU getopt
1230	I'm told that GNU getopt has a problem in that it gets confused
1231	by the double call.  Use the version in conf.c instead.
1232
1233BIND 4.9.2 and Ultrix
1234	If you are running on Ultrix, be sure you read conf/Info.Ultrix
1235	in the BIND distribution very carefully -- there is information
1236	in there that you need to know in order to avoid errors of the
1237	form:
1238
1239		/lib/libc.a(gethostent.o): sethostent: multiply defined
1240		/lib/libc.a(gethostent.o): endhostent: multiply defined
1241		/lib/libc.a(gethostent.o): gethostbyname: multiply defined
1242		/lib/libc.a(gethostent.o): gethostbyaddr: multiply defined
1243
1244	during the link stage.
1245
1246strtoul
1247	Some compilers (notably gcc) claim to be ANSI C but do not
1248	include the ANSI-required routine "strtoul".  If your compiler
1249	has this problem, you will get an error in srvrsmtp.c on the
1250	code:
1251
1252	  # ifdef defined(__STDC__) && !defined(BROKEN_ANSI_LIBRARY)
1253			e->e_msgsize = strtoul(vp, (char **) NULL, 10);
1254	  # else
1255			e->e_msgsize = strtol(vp, (char **) NULL, 10);
1256	  # endif
1257
1258	You can use -DBROKEN_ANSI_LIBRARY to get around this problem.
1259
1260Listproc 6.0c
1261	Date: 23 Sep 1995 23:56:07 GMT
1262	Message-ID: <95925101334.~INN-AUMa00187.comp-news@dl.ac.uk>
1263	From: alansz@mellers1.psych.berkeley.edu (Alan Schwartz)
1264	Subject: Listproc 6.0c + Sendmail 8.7 [Helpful hint]
1265
1266	Just upgraded to sendmail 8.7, and discovered that listproc 6.0c
1267	breaks, because it, by default, sends a blank "HELO" rather than
1268	a "HELO hostname" when using the 'system' or 'telnet' mailmethod.
1269
1270	The fix is to include -DZMAILER in the compilation, which will
1271	cause it to use "HELO hostname" (which Z-mail apparently requires
1272	as well. :)
1273
1274LDAP
1275	LDAP was provided by Booker Bense <bbense+ldap@stanford.edu> of
1276	Stanford University.  From Booker:
1277
1278	  - The patch attached to this message implements an Ldap map class.
1279	    Currently we are using this at stanford to support campus-wide
1280	    email addressing. More information can be found at
1281	    http://www.stanford.edu/~bbense/Inst.html.
1282
1283	  - Currently we are using the ldap map as follows:
1284
1285		Kluser ldapx
1286		    -h"localhost borax.stanford.edu borate.stanford.edu boron.stanford.edu"
1287		    -k"mailacceptinggeneralid=%s" -v maildrop
1288
1289	    and in Rule set S5
1290
1291		# Now attempt to lookup in luser (ldap map)
1292		R< $L > $+		$: < $L > $( luser $1 $)
1293		R< $*  > $+ @ $+	$: < $3 > $2		Rewrite if forward
1294
1295	  - The map definition supports most of the standard Map args plus most
1296	    of the command line options of ldapsearch. The software is currently
1297	    limited to only accepting the first entry returned. It expects that
1298	    the map defines an ldap filter that returns at most 1 valid entry.
1299	    It requires the ldap and lber libraries from the Umich Ldap3.2
1300	    release.
1301
1302	    The software has been in production on Solaris.2.5.1 at Stanford
1303	    for over 2 years.
1304
1305TCP Wrappers
1306	If you are using -DTCPWRAPPERS to get TCP Wrappers support you will
1307	also need to install libwrap.a and modify your site.config.m4 file
1308	or the generated Makefile to include -lwrap in the LIBS line
1309	(make sure that INCDIRS and LIBDIRS point to where the tcpd.h and
1310	libwrap.a can be found).
1311
1312	TCP Wrappers is available on ftp.win.tue.nl in /pub/security;
1313	grab tcp_wrappers_<VER>.tar.gz (where <VER> is the highest
1314	numbered version).
1315
1316	If you have alternate MX sites for your site, be sure that all of
1317	your MX sites reject the same set of hosts.  If not, a bad guy whom
1318	you reject will connect to your site, fail, and move on to the next
1319	MX site, which will accept the mail for you and forward it on to you.
1320
1321Regular Expressions (MAP_REGEX)
1322	If sendmail linking fails with:
1323
1324		undefined reference to 'regcomp'
1325
1326	or sendmail gives an error about a regular expression with:
1327
1328		pattern-compile-error: : Operation not applicable 
1329
1330	Your libc does not include a running version of POSIX-regex. Use
1331	librx or regex.o from the GNU Free Software Foundation,  
1332	ftp://ftp.gnu.org/pub/gnu/rx-?.?.tar.gz or 
1333	ftp://ftp.gnu.org/pub/gnu/regex-?.?.tar.gz. 
1334	You can also use the regex-lib by Henry Spencer, 
1335	ftp://ftp.funet.fi/pub/languages/C/spencer/regex.shar.gz  
1336	Make sure, your compiler reads regex.h from the distribution,  
1337	not from /usr/include, otherwise sendmail will dump a core. 
1338
1339
1340+--------------+
1341| MANUAL PAGES |
1342+--------------+
1343
1344The manual pages have been written against the -mandoc macros
1345instead of the -man macros.  The latest version of groff has them
1346included.  You can also get a copy from FTP.UU.NET in the directory
1347/systems/unix/bsd-sources/share/tmac.  groff is available from
1348ftp.gnu.org in the /pub/gnu directory.
1349
1350
1351+-----------------+
1352| DEBUGGING HOOKS |
1353+-----------------+
1354
1355As of 8.6.5, sendmail daemons will catch a SIGUSR1 signal and log
1356some debugging output (logged at LOG_DEBUG severity).  The
1357information dumped is:
1358
1359 * The value of the $j macro.
1360 * A warning if $j is not in the set $=w.
1361 * A list of the open file descriptors.
1362 * The contents of the connection cache.
1363 * If ruleset 89 is defined, it is evaluated and the results printed.
1364
1365This allows you to get information regarding the runtime state of the
1366daemon on the fly.  This should not be done too frequently, since
1367the process of rewriting may lose memory which will not be recovered.
1368Also, ruleset 89 may call non-reentrant routines, so there is a small
1369non-zero probability that this will cause other problems.  It is
1370really only for debugging serious problems.
1371
1372A typical formulation of ruleset 89 would be:
1373
1374	R$*		$@ $>0 some test address
1375
1376
1377+-----------------------------+
1378| DESCRIPTION OF SOURCE FILES |
1379+-----------------------------+
1380
1381The following list describes the files in this directory:
1382
1383Makefile.m4	A template for constructing a makefile based on the
1384		information in the BuildTools directory.
1385README		This file.
1386TRACEFLAGS	My own personal list of the trace flags -- not guaranteed
1387		to be particularly up to date.
1388alias.c		Does name aliasing in all forms.
1389arpadate.c	A subroutine which creates ARPANET standard dates.
1390clock.c		Routines to implement real-time oriented functions
1391		in sendmail -- e.g., timeouts.
1392collect.c	The routine that actually reads the mail into a temp
1393		file.  It also does a certain amount of parsing of
1394		the header, etc.
1395conf.c		The configuration file.  This contains information
1396		that is presumed to be quite static and non-
1397		controversial, or code compiled in for efficiency
1398		reasons.  Most of the configuration is in sendmail.cf.
1399conf.h		Configuration that must be known everywhere.
1400convtime.c	A routine to sanely process times.
1401daemon.c	Routines to implement daemon mode.  This version is
1402		specifically for Berkeley 4.1 IPC.
1403deliver.c	Routines to deliver mail.
1404domain.c	Routines that interface with DNS (the Domain Name
1405		System).
1406err.c		Routines to print error messages.
1407envelope.c	Routines to manipulate the envelope structure.
1408headers.c	Routines to process message headers.
1409macro.c		The macro expander.  This is used internally to
1410		insert information from the configuration file.
1411main.c		The main routine to sendmail.  This file also
1412		contains some miscellaneous routines.
1413map.c		Support for database maps.
1414mci.c		Routines that handle mail connection information caching.
1415mime.c		MIME conversion routines.
1416parseaddr.c	The routines which do address parsing.
1417queue.c		Routines to implement message queueing.
1418readcf.c	The routine that reads the configuration file and
1419		translates it to internal form.
1420recipient.c	Routines that manipulate the recipient list.
1421safefile.c	Routines to do careful checking of file modes and permissions
1422		when opening or creating files.
1423savemail.c	Routines which save the letter on processing errors.
1424sendmail.h	Main header file for sendmail.
1425snprintf.c	Routines to manipulate strings but prevent buffer overflows.
1426srvrsmtp.c	Routines to implement server SMTP.
1427stab.c		Routines to manage the symbol table.
1428stats.c		Routines to collect and post the statistics.
1429sysexits.c	List of error messages associated with error codes
1430		in sysexits.h.
1431trace.c		The trace package.  These routines allow setting and
1432		testing of trace flags with a high granularity.
1433udb.c		The user database interface module.
1434usersmtp.c	Routines to implement user SMTP.
1435util.c		Some general purpose routines used by sendmail.
1436version.c	The version number and information about this
1437		version of sendmail.  Theoretically, this gets
1438		modified on every change.
1439
1440Eric Allman
1441
1442(Version 8.206, last update 6/30/98 22:08:36)
1443