xref: /csrg-svn/usr.sbin/sendmail/src/READ_ME (revision 69951)
168839Seric# Copyright (c) 1983, 1995 Eric P. Allman
248582Sbostic# Copyright (c) 1988 The Regents of the University of California.
333728Sbostic# All rights reserved.
433728Sbostic#
548582Sbostic# %sccs.include.redist.sh%
633728Sbostic#
7*69951Seric#	@(#)READ_ME	8.98 (Berkeley) 06/20/95
833728Sbostic#
948582Sbostic
109881SericThis directory contains the source files for sendmail.
115369Seric
1260565SericFor detailed instructions, please read the document ../doc/op.me:
135369Seric
1460565Seric	eqn ../doc/op.me | pic | ditroff -me
155369Seric
1668543Seric*********************
1768543Seric!! DO NOT USE MAKE !!  to compile sendmail -- instead, use the
1868543Seric*********************  "makesendmail" script located in the src
1968543Sericdirectory.  It will find an appropriate Makefile, and create an
2068543Sericappropriate obj.* subdirectory so that multiplatform support
2168543Sericworks easily.
2268543Seric
2365366SericThe Makefile is for the new (4.4BSD) Berkeley make and uses syntax
2465366Sericthat is not recognized by older makes.  It also has assumptions
2565366Sericabout the 4.4 file system layout built in.  See below for details
2665366Sericabout other Makefiles.
2757418Seric
2868543SericIf you are porting to a new architecture for which there is no existing
2968543SericMakefile, you might start with Makefile.dist.  This works on the old
3068543Serictraditional make, but isn't customized for any particular architecture.
3164501Seric
3268543Seric	**************************************************
3368543Seric	**  Read below for more details of Makefiles.	**
3468543Seric	**************************************************
3557418Seric
3665000Seric**************************************************************************
3765000Seric**  IMPORTANT:  DO NOT USE OPTIMIZATION (``-O'') IF YOU ARE RUNNING	**
3865000Seric**  GCC 2.4.x or 2.5.x.  THERE IS A BUG IN THE GCC OPTIMIZER THAT	**
3965000Seric**  CAUSES SENDMAIL COMPILES TO FAIL MISERABLY.				**
4065000Seric**************************************************************************
4164272Seric
4265000SericJim Wilson of Cygnus believes he has found the problem -- it will
4365000Sericprobably be fixed in GCC 2.5.6 -- but until this is verified, be
4465000Sericvery suspicious of gcc -O.
4564701Seric
4668575SericThis problem is reported to have been fixed in gcc 2.6.
4768575Seric
4865000Seric**************************************************************************
4965000Seric**  IMPORTANT:  Read the appropriate paragraphs in the section on	**
5065000Seric**  ``Operating System and Compile Quirks''.				**
5165000Seric**************************************************************************
5264718Seric
5365000Seric
5465366Seric+-----------+
5565366Seric| MAKEFILES |
5665366Seric+-----------+
5765366Seric
5868543SericBy far, the easiest way to compile sendmail is to use the "makesendmail"
5968543Sericscript:
6068543Seric
6168543Seric	sh makesendmail
6268543Seric
6368543SericThis uses the "uname" command to figure out what architecture you are
6468543Sericon and selects a proper Makefile accordingly.  It also creates a
6568543Sericsubdirectory per object format, so that multiarchitecture support is
6668543Sericeasy.  In general this should be all you need.  However, if for some
6768543Sericreason this doesn't work (e.g., NeXT systems don't have the "uname"
6868543Sericcommand) you may have to set up your compile environment by hand.
6968543Seric
7065366SericThe "Makefile"s in these directories are from 4.4 BSD, and hence
7165366Sericreally only work properly if you are on a 4.4 system.  In particular,
7265366Sericthey use new syntax that will not be recognized on old make programs,
7365366Sericand some of them do things like ``.include ../../Makefile.inc'' to
7465366Sericpick up some system defines.  If you are getting sendmail separately,
7565366Sericthese files won't be included in the distribution, as they are
7665366Sericoutside of the sendmail tree.
7765366Seric
7865366SericInstead, you should use one of the other Makefiles, such as
7965366SericMakefile.SunOS for a SunOS system, and so forth.  These should
8065366Sericwork with the version of make that is appropriate for that
8168543Sericsystem.  All other Makefiles are in the "src/Makefiles" subdirectory.
8268543SericThey use the version of make that is native for that system.  These
8368543Sericare the Makefiles that I use, and they have "Berkeley quirks" in them.
8468543SericI can't guarantee that they will work unmodified in your environment.
8568543SericIn particular, Many of them include -I/usr/sww/include/db and
8668543Seric-L/usr/sww/lib -- these are Berkeley's locations in the ``Software
8768543SericWarehouse'' for the new database libraries, described below.  You don't
8868543Serichave to remove these definitions if you don't have these directories,
8968543Sericbut you may have to remove -DNEWDB from the DBMDEF definition.
9065366Seric
9165366SericPlease look for an appropriate Makefile before you start trying to
9265366Sericcompile with Makefile or Makefile.dist.
9365366Seric
9465366SericIf you want to port the new Berkeley make, you can get it from
9565366Sericftp.uu.net in the directory /systems/unix/bsd-sources/usr.bin/make.
9665366SericDiffs and instructions for building this version of make under
9765366SericSunOS 4.1.x are available on ftp.css.itd.umich.edu in
9869822Seric/pub/systems/sun/Net2-make-sun4.diff.Z.  Diffs and instructions
9965366Sericfor building this version of make under IBM AIX 3.2.4 are available
10065366Sericon ftp.uni-stuttgart.de in /sw/src/patches/bsd-make-rus-patches.
10168543SericFor Ultrix, try ftp.vix.com:~ftp/pub/patches/pmake-for-ultrix.Z.
10265366SericPaul Southworth <pauls@umich.edu> published a description of porting
10365366Sericthis make in comp.unix.bsd.
10465366Seric
10565366SericThe complete text of the Makefile.inc that is in the parent of the
10665366Sericsendmail directory is:
10765366Seric
10865366Seric	#	@(#)Makefile.inc	8.1 (Berkeley) 6/6/93
10965366Seric
11065366Seric	BINDIR?=	/usr/sbin
11165366Seric
11265366Seric
11364250Seric+----------------------+
11464250Seric| DATABASE DEFINITIONS |
11564250Seric+----------------------+
11664250Seric
11764250SericThere are several database formats that can be used for the alias files
11864250Sericand for general maps.  When used for alias files they interact in an
11964250Sericattempt to be back compatible.
12064250Seric
12164250SericThe three options are NEWDB (the new Berkeley DB package), NDBM (the
12264250Sericolder DBM implementation -- the very old V7 implementation is no
12364250Sericlonger supported), and NIS (Network Information Services).  Used alone
12464376Sericthese just include the support they indicate.  [If you are using NEWDB,
12568543Sericget the latest version from FTP.CS.Berkeley.EDU in /ucb/4bsd/db.tar.Z
12668543Seric(or db.tar.gz).  DO NOT use the version from the Net2 distribution!
12768543SericHowever, if you are on BSD/386 or 386BSD-based systems, use the one
12868543Sericthat already exists on your system.  You may need to #define OLD_NEWDB
12968543Seric1 to do this.]
13064250Seric
13165910Seric[NOTE WELL: it is CRITICAL that you remove ndbm.o from libdb.a and
13265910Sericndbm.h from the appropriate include directories if you want to get
13365910Sericndbm support.  These files OVERRIDE calls to ndbm routines -- in
13465910Sericparticular, if you leave ndbm.h in, you can find yourself using
13565910Sericthe new db package even if you don't define NEWDB.]
13665910Seric
13764250SericIf NEWDB and NDBM are defined (but not NIS), then sendmail will read
13864250SericNDBM format alias files, but the next time a newaliases is run the
13964250Sericformat will be converted to NEWDB; that format will be used forever
14064250Sericmore.  This is intended as a transition feature.  [Note however that
14164250Sericthe NEWDB library also catches and maps NDBM calls; you will have to
14264250Sericback out this feature to get this to work.  See ``Quirks'' section
14364250Sericbelow for details.]
14464250Seric
14569653SericIf all three are defined and the name of the file includes the string
14669653Seric"/yp/", sendmail will rebuild BOTH the NEWDB and NDBM format alias
14769653Sericfiles.  However, it will only read the NEWDB file; the NDBM format file
14869653Sericis used only by the NIS subsystem.
14964250Seric
15069653SericIf NDBM and NIS are defined (regardless of the definition of NEWDB),
15169653Sericand the filename includes the string "/yp/", sendmail adds the special
15264250Serictokens "YP_LAST_MODIFIED" and "YP_MASTER_NAME", both of which are
15364250Sericrequired if the NDBM file is to be used as an NIS map.
15464250Seric
15568543SericThere is also preliminary support for NIS+ (-DNISPLUS), Hesiod
15668543Seric(-DHESIOD), and NetInfo (-DNETINFO).  These have not been well
15768543Serictested.
15864250Seric
15968543SericAll of -DNEWDB, -DNDBM, -DNIS, -DNISPLUS, -DHESIOD, and -DNETINFO are
16068543Sericnormally defined in the DBMDEF line in the Makefile.
16164250Seric
162*69951SericIf you define NEWDB or HESIOD you get the User Database (USERDB)
163*69951Sericautomatically.  Generally you do want to have NEWDB for it to do
164*69951Sericanything interesting.  See above for getting the Berkeley "db"
165*69951Sericpackage (i.e., NEWDB).  There is no separate "user database"
166*69951Sericpackage -- don't bother searching for it on the net.
16768543Seric
168*69951Seric
16964035Seric+---------------+
17064035Seric| COMPILE FLAGS |
17164035Seric+---------------+
17264035Seric
17360565SericWhereever possible, I try to make sendmail pull in the correct
17460584Sericcompilation options needed to compile on various environments based on
17560584Sericautomatically defined symbols.  Some machines don't seem to have useful
17660584Sericsymbols availble, requiring the following compilation flags in the
17760584SericMakefile:
17860565Seric
17960565SericSOLARIS		Define this if you are running Solaris 2.0 or higher.
18065000SericSOLARIS_2_3	Define this if you are running Solaris 2.3 or higher.
18165108SericSUNOS403	Define this if you are running SunOS 4.0.3.
18264077SericNeXT		Define this if you are on a NeXT box.  (This one may
18364072Seric		be pre-defined for you.)  There are other hacks you
18464072Seric		have to make -- see below.
18560565Seric_AIX3		Define this if you are IBM AIX 3.x.
18663965SericRISCOS		Define this if you are running RISC/os from MIPS.
18766335SericIRIX		Define this if you are running IRIX from SGI.
18864501Seric_SCO_unix_	Define this if you are on SCO UNIX.
18965095Seric_SCO_unix_4_2	Define this if you are on SCO Open Server 3.2v4.
19068543SericDGUX		Define this if you are on DG/UX 5.4.3 or later
19168543SericDGUX_5_4_2	Define this if you are on DG/UX systems prior to 5.4.3.
19268543SericNonStop_UX_BXX	Define this if you are on a Tandem NonStop-UX release
19368543Seric		Bxx system.
19468543SericIRIX64		Define this if you are on an IRIX64 system.
19560565Seric
19660584SericIf you are a system that sendmail has already been ported to, you
19760584Sericprobably won't have to touch these.  But if you are porting, you may
19863962Serichave to tweak the following compilation flags in conf.h in order to
19963962Sericget it to compile and link properly:
20060565Seric
20165195SericSYSTEM5		Adjust for System V (not necessarily Release 4).
20264035SericSYS5SIGNALS	Use System V signal semantics -- the signal handler
20364035Seric		is automatically dropped when the signal is caught.
20464035Seric		If this is not set, use POSIX/BSD semantics, where the
20564035Seric		signal handler stays in force until an exec or an
20664035Seric		explicit delete.  Implied by SYSTEM5.
20764706SericSYS5SETPGRP	Use System V setpgrp() semantics.  Implied by SYSTEM5.
20864035SericHASFLOCK	Set this if you prefer to use the flock(2) system call
20964035Seric		rather than using fcntl-based locking.  Fcntl locking
21064035Seric		has some semantic gotchas, but many vendor systems
21164035Seric		also interface it to lockd(8) to do NFS-style locking.
21264035Seric		For this reason, this should not be set unless you
21364035Seric		don't have an alternative.
21460565SericHASUNAME	Set if you have the "uname" system call.  Implied by
21560565Seric		SYSTEM5.
21663962SericHASUNSETENV	Define this if your system library has the "unsetenv"
21763962Seric		subroutine.
21860565SericHASSETSID	Define this if you have the setsid(2) system call.  This
21960565Seric		is implied if your system appears to be POSIX compliant.
22060565SericHASINITGROUPS	Define this if you have the initgroups(3) routine.
22163753SericHASSETVBUF	Define this if you have the setvbuf(3) library call.
22263753Seric		If you don't, setlinebuf will be used instead.  This
22363753Seric		defaults on if your compiler defines __STDC__.
22463902SericHASSETREUID	Define this if you have setreuid(2) ***AND*** root can
22563902Seric		use setreuid to change to an arbitrary user.  This second
22663902Seric		condition is not satisfied on AIX 3.x.  You may find that
22763902Seric		your system has setresuid(2), (for example, on HP-UX) in
22863902Seric		which case you will also have to #define setreuid(r, e)
22963902Seric		to be the appropriate call.  Some systems (such as Solaris)
23065000Seric		have a compatibility routine that doesn't work properly,
23165000Seric		but may have "saved user ids" properly implemented so you
23265000Seric		can ``#define setreuid(r, e) seteuid(e)'' and have it work.
23363902Seric		The important thing is that you have a call that will set
23465000Seric		the effective uid independently of the real or saved uid
23565000Seric		and be able to set the effective uid back again when done.
23665000Seric		There's a test program in ../test/t_setreuid.c that will
23765000Seric		try things on your system.  Setting this improves the
23865000Seric		security, since sendmail doesn't have to read .forward
23965000Seric		and :include: files as root.  There are certain attacks
24065000Seric		that may be unpreventable without this call.
24169638SericUSESETEUID	Define this to 1 if you have seteuid(2) if you have a seteuid
24269638Seric		system call that will allow root to set only the effective
24369638Seric		user id to an arbitrary value ***AND*** you have saved user
24469638Seric		ids.  This is preferable to HASSETREUID if these conditions
24569638Seric		are fulfilled.  These are the semantics of the to-be-released
24669638Seric		revision of Posix.1.  The test program ../test/t_seteuid.c
24769638Seric		will try this out on your system.  If you define both
24869638Seric		HASSETREUID and USESETEUID, the former is ignored.
24965000SericHASLSTAT	Define this if you have symbolic links (and thus the
25065000Seric		lstat(2) system call).  This improves security.  Unlike
25165000Seric		most other options, this one is on by default, so you
25265000Seric		need to #undef it in conf.h if you don't have symbolic
25365000Seric		links (these days everyone does).
25468543SericHASSETRLIMIT	Define this to 1 if you have the setrlimit(2) syscall.
25568543Seric		You can define it to 0 to force it off.  It is assumed
25668543Seric		if you are running a BSD-like system.
25768543SericHASULIMIT	Define this if you have the ulimit(2) syscall (System V
25868543Seric		style systems).  HASSETRLIMIT overrides, as it is more
25968543Seric		general.
26065206SericNEEDGETOPT	Define this if you need a reimplementation of getopt(3).
26165206Seric		On some systems, getopt does very odd things if called
26265206Seric		to scan the arguments twice.  This flag will ask sendmail
26365206Seric		to compile in a local version of getopt that works
26465206Seric		properly.
26565206SericNEEDSTRTOL	Define this if your standard C library does not define
26665206Seric		strtol(3).  This will compile in a local version.
26765206SericNEEDVPRINTF	Define this if your standard C library does not define
26865206Seric		vprintf(3).  Note that the resulting fake implementation
26965206Seric		is not very elegant and may not even work on some
27065206Seric		architectures.
27166792SericNEEDFSYNC	Define this if your standard C library does not define
27266792Seric		fsync(2).  This will try to simulate the operation using
27366792Seric		fcntl(2); if that is not available it does nothing, which
27466792Seric		isn't great, but at least it compiles and runs.
27565211SericHASGETUSERSHELL	Define this to 1 if you have getusershell(3) in your
27665211Seric		standard C library.  If this is not defined, or is defined
27765211Seric		to be 0, sendmail will scan the /etc/shells file (no
27865211Seric		NIS-style support, defaults to /bin/sh and /bin/csh if
27965211Seric		that file does not exist) to get a list of unrestricted
28065211Seric		user shells.  This is used to determine whether users
28165211Seric		are allowed to forward their mail to a program or a file.
28269712SericNEEDPUTENV	Define this if your system needs am emulation of the
28369712Seric		putenv(3) call.  Define to 1 to implement it in terms
28469712Seric		of setenv(3) or to 2 to do it in terms of primitives.
28563937SericGIDSET_T	The type of entries in a gidset passed as the second
28663937Seric		argument to getgroups(2).  Historically this has been an
28763937Seric		int, so this is the default, but some systems (such as
28863937Seric		IRIX) pass it as a gid_t, which is an unsigned short.
28963937Seric		This will make a difference, so it is important to get
29063937Seric		this right!  However, it is only an issue if you have
29163937Seric		group sets.
29263968SericSLEEP_T		The type returned by the system sleep() function.
29363968Seric		Defaults to "unsigned int".  Don't worry about this
29463968Seric		if you don't have compilation problems.
29563974SericARBPTR_T	The type of an arbitrary pointer -- defaults to "void *".
29663974Seric		If you are an very old compiler you may need to define
29763974Seric		this to be "char *".
29860584SericLA_TYPE		The type of load average your kernel supports.  These
29966301Seric		can be one of:
30069543Seric		 LA_ZERO (1) -- it always returns the load average as
30166301Seric			"zero" (and does so on all architectures).
30269543Seric		 LA_INT (2) to read /dev/kmem for the symbol avenrun and
30369543Seric			interpret as a long integer.
30469543Seric		 LA_FLOAT (3) same, but interpret the result as a floating
30569543Seric			point number.
30669543Seric		 LA_SHORT (6) to interpret as a short integer.
30769543Seric		 LA_SUBR (4) if you have the getloadavg(3) routine in your
30869543Seric			system library.
30969543Seric		 LA_MACH (5) to use MACH-style load averages (calls
31066301Seric			processor_set_info()),
31169543Seric		 LA_PROCSTR (7) to read /proc/loadavg and interpret it
31266301Seric			as a string representing a floating-point
31369543Seric			number (Linux-style).
31469543Seric		 LA_READKSYM (8) is an implementation suitable for some
31569543Seric			versions of SVr4 that uses the MIOC_READKSYM ioctl
31669543Seric			call to read /dev/kmem.
31769543Seric		 LA_DGUX (9) is a special implementation for DG/UX that uses
31869543Seric			the dg_sys_info system call.
31969543Seric		 LA_HPUX (10) is an HP-UX specific version that uses the
32069543Seric			pstat_getdynamic system call.
32169543Seric		LA_INT, LA_SHORT, LA_FLOAT, and LA_READKSYM have several
32269543Seric		other parameters that they try to divine: the name of your
32369543Seric		kernel, the name of the variable in the kernel to examine,
32469543Seric		the number of bits of precision in a fixed point load average,
32569543Seric		and so forth.
32666301Seric		In desperation, use LA_ZERO.  The actual code is in
32766301Seric		conf.c -- it can be tweaked if you are brave.
32869543SericFSHIFT		For LA_INT, LA_SHORT, and LA_READKSYM, this is the number
32969543Seric		of bits of load average after the binary point -- i.e.,
33069543Seric		the number of bits to shift right in order to scale the
33169543Seric		integer to get the true integer load average.  Defaults to 8.
33269543Seric_PATH_UNIX	The path to your kernel.  Needed only for LA_INT, LA_SHORT,
33369543Seric		and LA_FLOAT.  Defaults to "/unix" on System V, "/vmunix"
33469543Seric		everywhere else.
33569543SericLA_AVENRUN	For LA_INT, LA_SHORT, and LA_FLOAT, the name of the kernel
33669543Seric		variable that holds the load average.  Defaults to "avenrun"
33769543Seric		on System V, "_avenrun" everywhere else.
33865752SericSFS_TYPE	Encodes how your kernel can locate the amount of free
33965752Seric		space on a disk partition.  This can be set to SFS_NONE
34065752Seric		(0) if you have no way of getting this information,
34165752Seric		SFS_USTAT (1) if you have the ustat(2) system call,
34265752Seric		SFS_4ARGS (2) if you have a four-argument statfs(2)
34365752Seric		system call (and the include file is <sys/statfs.h>),
34468543Seric		SFS_VFS (3), SFS_MOUNT (4), SFS_STATFS (5) if you have
34568543Seric		the two-argument statfs(2) system call with includes in
34668543Seric		<sys/vfs.h>, <sys/mount.h>, or <sys/statfs.h> respectively,
34768543Seric		or SFS_STATVFS (6) if you have the two-argument statvfs(2)
34868543Seric		call.  The default if nothing is defined is SFS_NONE.
34968543SericSFS_BAVAIL	with SFS_4ARGS hou can also set SFS_BAVAIL to the field name
35068543Seric		in the statfs structure that holds the useful information;
35168543Seric		this defaults to f_bavail.
35268543SericSPT_TYPE	Encodes how your system can display what a process is doing
35368543Seric		on a ps(1) command (SPT stands for Set Process Title).  Can
35468543Seric		be set to:
35568543Seric		SPT_NONE (0) -- Don't try to set the process title at all.
35668543Seric		SPT_REUSEARGV (1) -- Pad out your argv with the information;
35768543Seric			this is the default if none specified.
35868543Seric		SPT_BUILTIN (2) -- The system library has setproctitle.
35968543Seric		SPT_PSTAT (3) -- Use the PSTAT_SETCMD option to pstat(2)
36068543Seric			to set the process title; this is used by HP-UX.
36168543Seric		SPT_PSSTRINGS (4) -- Use the magic PS_STRINGS pointer (4.4BSD).
36268543SericSPT_PADCHAR	Character used to pad the process title; if undefined,
36368543Seric		the space character (0x20) is used.  This is ignored if
36468543Seric		SPT_TYPE != SPT_REUSEARGV
36563962SericERRLIST_PREDEFINED
36663962Seric		If set, assumes that some header file defines sys_errlist.
36763962Seric		This may be needed if you get type conflicts on this
36863962Seric		variable -- otherwise don't worry about it.
36964562SericWAITUNION	The wait(2) routine takes a "union wait" argument instead
37064562Seric		of an integer argument.  This is for compatibility with
37164562Seric		old versions of BSD.
37265000SericSCANF		You can set this to extend the F command to accept a
37365000Seric		scanf string -- this gives you a primitive parser for
37465000Seric		class definitions -- BUT it can make you vulnerable to
37565000Seric		core dumps if the target file is poorly formed.
37665095SericSYSLOG_BUFSIZE	You can define this to be the size of the buffer that
37765095Seric		syslog accepts.  If it is not defined, it assumes a
37865095Seric		1024-byte buffer.  If the buffer is very small (under
37965095Seric		256 bytes) the log message format changes -- each
38065095Seric		e-mail message will log many more messages, since it
38165095Seric		will log each piece of information as a separate line
38265095Seric		in syslog.
38366318SericBROKEN_RES_SEARCH
38466318Seric		On Ultrix (and maybe other systems?) if you use the
38566318Seric		res_search routine with an unknown host name, it returns
38666318Seric		-1 but sets h_errno to 0 instead of HOST_NOT_FOUND.  If
38766318Seric		you set this, sendmail considers 0 to be the same as
38866318Seric		HOST_NOT_FOUND.
38968543SericNAMELISTMASK	If defined, values returned by nlist(3) are masked
39068543Seric		against this value before use -- a common value is
39168543Seric		0x7fffffff to strip off the top bit.
39269543SericBSD4_4_SOCKADDR	If defined, socket addresses have an sa_len field that
39369543Seric		defines the length of this address.
39460565Seric
39564035Seric
39668543Seric
39764035Seric+-----------------------+
39864035Seric| COMPILE-TIME FEATURES |
39964035Seric+-----------------------+
40064035Seric
40160584SericThere are a bunch of features that you can decide to compile in, such
40260584Sericas selecting various database packages and special protocol support.
40360584SericSeveral are assumed based on other compilation flags -- if you want to
40460584Seric"un-assume" something, you probably need to edit conf.h.  Compilation
40560584Sericflags that add support for special features include:
40660565Seric
40760565SericNDBM		Include support for "new" DBM library for aliases and maps.
40864250Seric		Normally defined in the Makefile.
40960565SericNEWDB		Include support for Berkeley "db" package (hash & btree)
41064250Seric		for aliases and maps.  Normally defined in the Makefile.
41166843SericOLD_NEWDB	If non-zero, the version of NEWDB you have is the old
41266843Seric		one that does not include the "fd" call.  This call was
41366843Seric		added in version 1.5 of the Berkeley DB code.  If you
41466843Seric		use -DOLD_NEWDB=0 it forces you to use the new interface.
41560565SericNIS		Define this to get NIS (YP) support for aliases and maps.
41664250Seric		Normally defined in the Makefile.
41769543SericNISPLUS		Define this to get NIS+ support for aliases and maps.
41869543Seric		Normally defined in the Makefile.
41969543SericHESIOD		Define this to get Hesiod support for aliases and maps.
42069543Seric		Normally defined in the Makefile.
42169543SericNETINFO		Define this to get NeXT NetInfo support for aliases and maps.
42269543Seric		Normally defined in the Makefile.
42369712SericUSERDB		Define this to 1 to include support for the User Information
42469712Seric		Database.  Implied by NEWDB or HESIOD.  You can use
42569712Seric		-DUSERDB=0 to explicitly turn it off.
42665000SericIDENTPROTO	Define this as 1 to get IDENT (RFC 1413) protocol support.
42760565Seric		This is assumed unless you are running on Ultrix or
42860565Seric		HP-UX, both of which have a problem in the UDP
42965000Seric		implementation.  You can define it to be 0 to explicitly
43069543Seric		turn off IDENT protocol support.  If defined off, the code
43169543Seric		is actually still compiled in, but it defaults off; you
43269543Seric		can turn it on by setting the IDENT timeout to 30s in the
43369543Seric		configuration file.
43469601SericIP_SRCROUTE	Define this to 1 to get IP source routing information
43569601Seric		displayed in the Received: header.  This is assumed on
43669601Seric		most systems, but some (e.g., Ultrix) apparently have a
43769601Seric		broken version of getsockopt that doesn't properly
43869601Seric		support the IP_OPTIONS call.  You probably want this if
43969648Seric		your OS can cope with it.  Symptoms of failure will be that
44069648Seric		it won't compile properly (that is, no support for fetching
44169648Seric		IP_OPTIONs), or it compiles but source-routed TCP connections
44269648Seric		either refuse to open or open and hang for no apparent reason.
44369648Seric		Ultrix and AIX are known to fail this way.
44460565SericLOG		Set this to get syslog(3) support.  Defined by default
44560584Seric		in conf.h.  You want this if at all possible.
44660565SericNETINET		Set this to get TCP/IP support.  Defined by default
44760584Seric		in conf.h.  You probably want this.
44860565SericNETISO		Define this to get ISO networking support.
44960565SericSMTP		Define this to get the SMTP code.  Implied by NETINET
45060565Seric		or NETISO.
45169543SericNAMED_BIND	If non-zero, include DNS (name daemon) support, including
45260565Seric		MX support.  The specs you must use this if you run
45360565Seric		SMTP.  Defined by default in conf.h.
45460565SericQUEUE		Define this to get queueing code.  Implied by NETINET
45560584Seric		or NETISO; required by SMTP.  This gives you other good
45660584Seric		stuff -- it should be on.
45760565SericDAEMON		Define this to get general network support.  Implied by
45860584Seric		NETINET or NETISO.  Defined by default in conf.h.  You
45960584Seric		almost certainly want it on.
46060565SericMATCHGECOS	Permit fuzzy matching of user names against the full
46160565Seric		name (GECOS) field in the /etc/passwd file.  This should
46260565Seric		probably be on, since you can disable it from the config
46360584Seric		file if you want to.  Defined by default in conf.h.
46469543SericMIME8TO7	If non-zero, include 8 to 7 bit MIME conversions.  This
46569543Seric		also controls advertisement of 8BITMIME in the ESMTP
46669543Seric		startup dialogue.
46769543SericMIME7TO8	If non-zero, include 7 to 8 bit MIME conversions.  Not yet
46869543Seric		implemented.
46960565Seric
47064035Seric
47165000Seric+---------------------+
47265000Seric| DNS/RESOLVER ISSUES |
47365000Seric+---------------------+
47465000Seric
47565000SericMany systems have old versions of the resolver library.  At a minimum,
47665000Sericyou should be running BIND 4.8.3; older versions may compile, but they
47765000Serichave known bugs that should give you pause.
47865000Seric
47965000SericCommon problems in old versions include "undefined" errors for
48065000Sericdn_skipname.
48165000Seric
48265000SericSome people have had a problem with BIND 4.9; it uses some routines
48365000Sericthat it expects to be externally defined such as strerror().  It may
48465000Serichelp to link with "-l44bsd" to solve this problem.
48565000Seric
48665095Seric!PLEASE! be sure to link with the same version of the resolver as
48765095Sericthe header files you used -- some people have used the 4.9 headers
48865095Sericand linked with BIND 4.8 or vice versa, and it doesn't work.
48965095SericUnfortunately, it doesn't fail in an obvious way -- things just
49065954Sericsubtly don't work.
49165000Seric
49269934SericWILDCARD MX RECORDS ARE A BAD IDEA!  The only situation in which they
49369934Sericwork reliably is if you have two versions of DNS, one in the real world
49469934Sericwhich has a wildcard pointing to your firewall, and a completely
49569934Sericdifferent version of the database internally that does not include
49669934Sericwildcard MX records that match your domain.  ANYTHING ELSE WILL GIVE
49769934SericYOU HEADACHES!
49865095Seric
49969934Seric
50064035Seric+-------------------------------------+
50164035Seric| OPERATING SYSTEM AND COMPILE QUIRKS |
50264035Seric+-------------------------------------+
50364035Seric
50465095SericGCC 2.5.x problems  *** IMPORTANT ***
50565095Seric	Date: Mon, 29 Nov 93 19:08:44 PST
50665095Seric	From: wilson@cygnus.com (Jim Wilson)
50765095Seric	Message-Id: <9311300308.AA04608@cygnus.com>
50865095Seric	To: kenner@vlsi1.ultra.nyu.edu
50965095Seric	Subject: [cattelan@thebarn.com: gcc 2.5.4-2.5.5 -O bug]
51065095Seric	Cc: cattelan@thebarn.com, rms@gnu.ai.mit.edu, sendmail@cs.berkeley.edu
51165095Seric
51265095Seric	This fixes a problem that occurs when gcc 2.5.5 is used to compile
51365095Seric	sendmail 8.6.4 with optimization on a sparc.
51465095Seric
51565095Seric	Mon Nov 29 19:00:14 1993  Jim Wilson  (wilson@sphagnum.cygnus.com)
51665095Seric
51765095Seric		* reload.c (find_reloads_toplev): Replace obsolete reference to
51865095Seric		BYTE_LOADS_*_EXTEND with LOAD_EXTEND_OP.
51965095Seric
52065095Seric	*** clean-ss-931128/reload.c    Sun Nov 14 16:20:01 1993
52165095Seric	--- ss-931128/reload.c  Mon Nov 29 18:52:55 1993
52265095Seric	*************** find_reloads_toplev (x, opnum, type, ind
52365095Seric	*** 3888,3894 ****
52465095Seric		 force a reload in that case.  So we should not do anything here.  */
52569747Seric
52665095Seric		else if (regno >= FIRST_PSEUDO_REGISTER
52765095Seric	! #if defined(BYTE_LOADS_ZERO_EXTEND) || defined(BYTE_LOADS_SIGN_EXTEND)
52865095Seric		       && (GET_MODE_SIZE (GET_MODE (x))
52965095Seric			   <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
53065095Seric	  #endif
53165095Seric	--- 3888,3894 ----
53265095Seric		 force a reload in that case.  So we should not do anything here.  */
53369747Seric
53465095Seric		else if (regno >= FIRST_PSEUDO_REGISTER
53565095Seric	! #ifdef LOAD_EXTEND_OP
53665095Seric		       && (GET_MODE_SIZE (GET_MODE (x))
53765095Seric			   <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
53865095Seric	  #endif
53965095Seric
54065095Seric
54164376SericSunOS 4.x (Solaris 1.x)
54264376Seric	You may have to use -lresolv on SunOS.  However, beware that
54364376Seric	this links in a new version of gethostbyname that does not
54464376Seric	understand NIS, so you must have all of your hosts in DNS.
54564035Seric
54664798Seric	Some people have reported problems with the SunOS version of
54764798Seric	-lresolv and/or in.named, and suggest that you get a newer
54864798Seric	version.  The symptoms are delays when you connect to the
54965000Seric	SMTP server on a SunOS machine or having your domain added to
55065000Seric	addresses inappropriately.  There is a version of BIND
55164798Seric	version 4.9 on gatekeeper.DEC.COM in pub/BSD/bind/4.9.
55264798Seric
55364400Seric	There is substantial disagreement about whether you can make
55464400Seric	this work with resolv+, which allows you to specify a search-path
55564400Seric	of services.  Some people report that it works fine, others
55664400Seric	claim it doesn't work at all (including causing sendmail to
55764400Seric	drop core when it tries to do multiple resolv+ lookups for a
55864400Seric	single job).  I haven't tried resolv+, as we use DNS exclusively.
55964400Seric
56064400Seric	Should you want to try resolv+, it is on ftp.uu.net in
56164400Seric	/networking/ip/dns.
56264400Seric
56368543Seric	Apparently getservbyname() can fail under moderate to high
56468543Seric	load under some circumstances.  This will exhibit itself as
56568543Seric	the message ``554 makeconnection: service "smtp" unknown''.
56668543Seric	The problem has been traced to one or more blank lines in
56768543Seric	/etc/services on the NIS server machine.  Delete these
56868543Seric	and it should work.  This info is thanks to Brian Bartholomew
56968543Seric	<bb@math.ufl.edu> of I-Kinetics, Inc.
57068543Seric
57164376SericSolaris 2.x (SunOS 5.x)
57264376Seric	To compile for Solaris, be sure you use -DSOLARIS.
57364376Seric
57466329Seric	To the best of my knowledge, Solaris does not have the
57566329Seric	gethostbyname problem described above.  However, it does
57666329Seric	have another one:
57766329Seric
57864364Seric	From a correspondent:
57964364Seric
58069747Seric	   For solaris 2.2, I have
58164364Seric
58264364Seric		hosts:      files dns
58364364Seric
58464364Seric	   in /etc/nsswitch.conf and /etc/hosts has to have the fully
58564364Seric	   qualified host name. I think "files" has to be before "dns"
58664364Seric	   in /etc/nsswitch.conf during bootup.
58764364Seric
58866329Seric	From another correspondent:
58964376Seric
59066329Seric	   When running sendmail under Solaris, the gethostbyname()
59166329Seric	   hack in conf.c which should perform proper canonicalization
59266329Seric	   of host names could fail.  Result: the host name is not
59366329Seric	   canonicalized despite the hack, and you'll have to define $j
59466329Seric	   and $m in sendmail.cf somewhere.
59566329Seric
59666329Seric	   The reason could be that /etc/nsswitch.conf is improperly
59766329Seric	   configured (at least from sendmail's point of view).  For
59866329Seric	   example, the line
59966329Seric
60066329Seric		hosts:      files nisplus dns
60166329Seric
60266329Seric	   will make gethostbyname() look in /etc/hosts first, then ask
60366329Seric	   nisplus, then dns.  However, if /etc/hosts does not contain
60466329Seric	   the full canonicalized hostname, then no amount of
60566329Seric	   gethostbyname()s will work.
60666329Seric
60766329Seric	   Solution (or rather, a workaround): Ask nisplus first, then
60866329Seric	   dns, then local files:
60966329Seric
61066329Seric		hosts:      nisplus dns [NOTFOUND=return] files
61166329Seric
61264385Seric	The Solaris "syslog" function is apparently limited to something
61364385Seric	about 90 characters because of a kernel limitation.  If you have
61466023Seric	source code, you can probably up this number.  You can get patches
61566023Seric	that fix this problem: the patch ids are:
61664385Seric
61766023Seric		Solaris 2.1	100834
61866023Seric		Solaris 2.2	100999
61966024Seric		Solaris 2.3	101318
62066023Seric
62166023Seric	Be sure you have the appropriate patch installed or you won't
62266023Seric	see system logging.
62366023Seric
62469729SericSolaris 2.4 (SunOS 5.4)
62569747Seric	If you include /usr/lib at the end of your LD_LIBRARY_PATH you run
62669747Seric	the risk of getting the wrong libraries under some circumstances.
62769747Seric	This is because of a new feature in Solaris 2.4, described by
62869747Seric	Rod.Evans@Eng.Sun.COM:
62969729Seric
63069747Seric	>> Prior to SunOS 5.4, any LD_LIBRARY_PATH setting was ignored by the
63169747Seric	>> runtime linker if the application was setxid (secure), thus your
63269747Seric	>> applications search path would be:
63369747Seric	>>
63469747Seric	>>	/usr/local/lib	LD_LIBRARY_PATH component - IGNORED
63569747Seric	>>	/usr/lib	LD_LIBRARY_PATH component - IGNORED
63669747Seric	>>	/usr/local/lib	RPATH - honored
63769747Seric	>>	/usr/lib	RPATH - honored
63869747Seric	>>
63969747Seric	>> the effect is that path 3 would be the first used, and this would
64069747Seric	>> satisfy your resolv.so lookup.
64169747Seric	>>
64269747Seric	>> In SunOS 5.4 we made the LD_LIBRARY_PATH a little more flexible.
64369747Seric	>> People who developed setxid applications wanted to be able to alter
64469747Seric	>> the library search path to some degree to allow for their own
64569747Seric	>> testing and debugging mechanisms.  It was decided that the only
64669747Seric	>> secure way to do this was to allow a `trusted' path to be used in
64769747Seric	>> LD_LIBRARY_PATH.  The only trusted directory we presently define
64869747Seric	>> is /usr/lib.  Thus a setuid root developer could play with some
64969747Seric	>> alternative shared object implementations and place them in
65069747Seric	>> /usr/lib (being root we assume they'ed have access to write in this
65169747Seric	>> directory).  This change was made as part of 1155380 - after a
65269747Seric	>> *huge* amount of discussion regarding the security aspect of things.
65369747Seric	>>
65469747Seric	>> So, in SunOS 5.4 your applications search path would be:
65569747Seric	>>
65669747Seric	>>	/usr/local/lib	from LD_LIBRARY_PATH - IGNORED (untrustworthy)
65769747Seric	>>	/usr/lib	from LD_LIBRARY_PATH - honored (trustworthy)
65869747Seric	>>	/usr/local/lib	from RPATH - honored
65969747Seric	>>	/usr/lib	from RPATH - honored
66069747Seric	>>
66169747Seric	>> here, path 2 would be the first used.
66269729Seric
66369280SericUltrix
66469280Seric	By default, the IDENT protocol is turned off on Ultrix.  If you
66569680Seric	are running Ultrix 4.4 or later, or if you have included patch
66669680Seric	CXO-8919 for Ultrix 4.2 or 4.3 to fix the TCP problem, you can turn
66769280Seric	IDENT on in the configuration file by setting the "ident" timeout
66869280Seric	to 30 seconds.
66969280Seric
67064250SericOSF/1
67169747Seric	If you are compiling on OSF/1 (DEC Alpha), you must use
67265616Seric	-L/usr/shlib (otherwise it core dumps on startup).  You may also
67365000Seric	need -mld to get the nlist() function, although some versions
67465000Seric	apparently don't need this.
67565000Seric
67665000Seric	Also, the enclosed makefile removed /usr/sbin/smtpd; if you need
67765000Seric	it, just create the link to the sendmail binary.
67857977Seric
67966335SericIRIX
68066335Seric	The header files on SGI IRIX are completely prototyped, and as
68166335Seric	a result you can sometimes get some warning messages during
68266335Seric	compilation.  These can be ignored.  There are two errors in
68366335Seric	deliver only if you are using gcc, both of the form ``warning:
68466335Seric	passing arg N of `execve' from incompatible pointer type''.
68566335Seric	Also, if you compile with -DNIS, you will get a complaint
68666335Seric	about a declaration of struct dom_binding in a prototype
68766335Seric	when compiling map.c; this is not important because the
68866335Seric	function being prototyped is not used in that file.
68966335Seric
69068543Seric	In order to compile sendmail you will have had to install
69168543Seric	the developers' option in order to get the necessary include
69268543Seric	files.
69368543Seric
69469923SericNeXT or NEXTSTEP
69569923Seric	NEXTSTEP 3.3 and earlier ship with the old DBM library.  You will
69669923Seric	need to acquire the new Berkeley DB from ftp.cs.berkeley.edu.
69769923Seric	Install it in /usr/local/{lib,include}.
69863753Seric
69969923Seric	If you are compiling on NEXTSTEP, you will have to create an
70069923Seric	empty file "unistd.h" and create a file "dirent.h" containing:
70169923Seric
70264250Seric		#include <sys/dir.h>
70364250Seric		#define dirent	direct
70464035Seric
70564250Seric	(The Makefile.NeXT should try to do both of these for you.)
70664077Seric
70764364Seric	Apparently, there is a bug in getservbyname on Nextstep 3.0
70864364Seric	that causes it to fail under some circumstances with the
70964364Seric	message "SYSERR: service "smtp" unknown" logged.  You should
71064364Seric	be able to work around this by including the line:
71164364Seric
71264670Seric		OOPort=25
71364364Seric
71464364Seric	in your .cf file.
71564364Seric
71664376Seric	You may have to use -DNeXT.
71764376Seric
71865000SericBSDI (BSD/386) 1.0, NetBSD 0.9, FreeBSD 1.0
71965000Seric	The "m4" from BSDI won't handle the config files properly.
72065000Seric	I haven't had a chance to test this myself.
72157943Seric
72265000Seric	The M4 shipped in FreeBSD and NetBSD 0.9 don't handle the config
72365000Seric	files properly. One must use either GNU m4 1.1 or the PD-M4
72465000Seric	recently posted in comp.os.386bsd.bugs (and maybe others).
72565000Seric	NetBSD-current includes the PD-M4 (as stated in the NetBSD file
72665000Seric	CHANGES).
72765000Seric
72865000Seric	FreeBSD 1.0 RELEASE has uname(2) now. Use -DUSEUNAME in order to
72965000Seric	use it (look into Makefile.FreeBSD). NetBSD-current may have
73065000Seric	it too but it has not been verified.
73165000Seric
73265000Seric	You cannot port the latest version of the Berkeley db library
73365000Seric	and use it with sendmail without recompiling the world.  This
73465000Seric	is because C library routines use the older version which have
73565000Seric	incompatible header files -- the result is that it can't read
73665000Seric	other system files, such as /etc/passwd, unless you use the
73765000Seric	new db format throughout your system.  You should normally just
73865000Seric	use the version of db supplied in your release.  You may need
73966843Seric	to use -DOLD_NEWDB=1 to make this work -- this turns off some
74065000Seric	new interface calls (for file locking) that are not in older
74165000Seric	versions of db.  You'll get compile errors if you need this
74265000Seric	flag and don't have it set.
74365000Seric
74464364Seric4.3BSD
74564364Seric	If you are running a "virgin" version of 4.3BSD, you'll have
74664364Seric	a very old resolver and be missing some header files.  The
74764364Seric	header files are simple -- create empty versions and everything
74864364Seric	will work fine.  For the resolver you should really port a new
74964364Seric	version (4.8.3 or later) of the resolver; 4.9 is available on
75064364Seric	gatekeeper.DEC.COM in pub/BSD/bind/4.9.  If you are really
75164364Seric	determined to continue to use your old, buggy version (or as
75264364Seric	a shortcut to get sendmail working -- I'm sure you have the
75364364Seric	best intentions to port a modern version of BIND), you can
75464364Seric	copy ../contrib/oldbind.compat.c into src and add
75564364Seric	oldbind.compat.o to OBJADD in the Makefile.
75664364Seric
75764718SericA/UX
75864718Seric	Date: Tue, 12 Oct 1993 18:28:28 -0400 (EDT)
75964718Seric	From: "Eric C. Hagberg" <hagberg@med.cornell.edu>
76064718Seric	Subject: Fix for A/UX ndbm
76164718Seric
76264718Seric	I guess this isn't really a sendmail bug, however, it is something
76364718Seric	that A/UX users should be aware of when compiling sendmail 8.6.
76464718Seric
76564718Seric	Apparently, the calls that sendmail is using to the ndbm routines
76664718Seric	in A/UX 3.0.x contain calls to "broken" routines, in that the
76764718Seric	aliases database will break when it gets "just a little big"
76864718Seric	(sorry I don't have exact numbers here, but it broke somewhere
76964718Seric	around 20-25 aliases for me.), making all aliases non-functional
77064718Seric	after exceeding this point.
77164718Seric
77264718Seric	What I did was to get the gnu-dbm-1.6 package, compile it, and
77364718Seric	then re-compile sendmail with "-lgdbm", "-DNDBM", and using the
77464718Seric	ndbm.h header file that comes with the gnu-package. This makes
77564718Seric	things behave properly.
77664718Seric
77764718Seric	I suppose porting the New Berkeley db package is another route,
77864718Seric	however, I made a quick attempt at it, and found it difficult
77964718Seric	(not easy at least); the gnu-dbm package "configured" and
78064718Seric	compiled easily.
78164718Seric
78268543SericSCO Unix
78368543Seric	From: Thomas Essebier <tom@stallion.oz.au>
78468543Seric	Organisation:  Stallion Technologies Pty Ltd.
78568543Seric
78668543Seric	It will probably help those who are trying to configure sendmail 8.6.9
78769747Seric	to know that if they are on SCO, they had better set
78868543Seric		OI-dnsrch
78968543Seric	or they will core dump as soon as they try to use the resolver.
79068543Seric	ie. although SCO has _res.dnsrch defined, and is kinda BIND 4.8.3, it
79168543Seric	does not inititialise it, nor does it understand 'search' in
79268543Seric	/etc/named.boot.
79368543Seric		- sigh -
79468543Seric
79564718SericDG/UX
79668543Seric	Doug Anderson <dlander@afterlife.ncsc.mil> has successfully run
79768543Seric	V8 on the DG/UX 5.4.2 and 5.4R3.x platforms under heavy usage.
79868543Seric	Originally, the DG /bin/mail program wasn't compatible with
79968543Seric	the V8 sendmail, since the DG /bin/mail requires the environment
80068543Seric	variable "_FORCE_MAIL_LOCAL_=yes" be set.  Version 8.7 now includes
80168543Seric	this in the environment before invoking the local mailer.  Some
80268543Seric	have used procmail to avoid this problem in the past.  It works
80368543Seric	but some have experienced file locking problems with their DG/UX
80468543Seric	ports of procmail.
80564718Seric
80665820SericApollo DomainOS
80765820Seric	If you are compiling on Apollo, you will have to create an empty
80865820Seric	file "unistd.h" and create a file "dirent.h" containing:
80965820Seric
81065820Seric		#include <sys/dir.h>
81165820Seric		#define dirent	direct
81265820Seric
81365820Seric	(The Makefile.DomainOS will attempt to do both of these for you.)
81465820Seric
81565910SericHP-UX 8.00
81665910Seric	Date: Mon, 24 Jan 1994 13:25:45 +0200
81765910Seric	From: Kimmo Suominen <Kimmo.Suominen@lut.fi>
81865910Seric	Subject: 8.6.5 w/ HP-UX 8.00 on s300
81965910Seric
82065910Seric	Just compiled and fought with sendmail 8.6.5 on a HP9000/360 (ie. a
82165910Seric	series 300 machine) running HP-UX 8.00.
82265910Seric
82365910Seric	I was getting segmentation fault when delivering to a local user.
82465910Seric	With debugging I saw it was faulting when doing _free@libc... *sigh*
82565910Seric	It seems the new implementation of malloc on s300 is buggy as of 8.0,
82665910Seric	so I tried out the one in -lmalloc (malloc(3X)).  With that it seems
82765910Seric	to work just dandy.
82865910Seric
82965910Seric	When linking, you will get the following error:
83065910Seric
83165910Seric	ld: multiply defined symbol _freespace in file /usr/lib/libmalloc.a
83265910Seric
83365910Seric	but you can just ignore it.  You might want to add this info to the
83465910Seric	README file for the future...
83565910Seric
83665910SericLinux
83765910Seric	Something broke between versions 0.99.13 and 0.99.14 of Linux:
83865910Seric	the flock() system call gives errors.  If you are running .14,
83965910Seric	you must not use flock.  You can do this with -DHASFLOCK=0.
84065910Seric
84168487Seric	Around the inclusion of bind-4.9.3 & linux libc-4.6.20, the
84268487Seric	initialization of the _res structure changed.  If /etc/hosts.conf
84368487Seric	was configured as "hosts, bind" the resolver code could return
84468487Seric	"Name server failure" errors.  This is supposedly fixed in
84568487Seric	later versions of libc (>= 4.6.29?), and later versions of
84668487Seric	sendmail (> 8.6.10) try to work around the problem.
84768487Seric
84868487Seric	Some older versions (< 4.6.20?) of the libc/include files conflict
84968487Seric	with sendmail's version of cdefs.h.  Deleting sendmail's version
85068487Seric	on those systems should be non-harmful, and new versions don't care.
85168487Seric
85265910SericAIX
85365910Seric	This version of sendmail does not support MB, MG, and MR resource
85465910Seric	records, which are supported by AIX sendmail.
85565910Seric
85666335SericRISC/os
85766335Seric	RISC/os from MIPS is a merged AT&T/Berkeley system.  When you
85866335Seric	compile on that platform you will get duplicate definitions
85966335Seric	on many files.  You can ignore these.
86066335Seric
86165195SericSystem V Release 4 Based Systems
86265195Seric	There is a single Makefile that is intended for all SVR4-based
86365195Seric	systems (called Makefile.SVR4).  It defines __svr4__, which is
86465195Seric	predefined by some compilers.  If your compiler already defines
86565195Seric	this compile variable, you can delete the definition from the
86665195Seric	Makefile.
86765195Seric
86865195Seric	It's been tested on Dell Issue 2.2.
86965195Seric
87065095SericDELL SVR4
87165095Seric	Date:      Mon, 06 Dec 1993 10:42:29 EST
87265095Seric	From: "Kimmo Suominen" <kim@grendel.lut.fi>
87365095Seric	Message-ID: <2d0352f9.lento29@lento29.UUCP>
87465095Seric	To: eric@cs.berkeley.edu
87565166Seric	Cc: sendmail@cs.berkeley.edu
87665095Seric	Subject:   Notes for DELL SVR4
87765095Seric
87865095Seric	Eric,
87965095Seric
88065095Seric	Here are some notes for compiling Sendmail 8.6.4 on DELL SVR4.  I ran
88165095Seric	across these things when helping out some people who contacted me by
88265095Seric	e-mail.
88365095Seric
88465095Seric	1) Use gcc 2.4.5 (or later?).  Dell distributes gcc 2.1 with their
88565095Seric	   Issue 2.2 Unix.  It is too old, and gives you problems with
88665095Seric	   clock.c, because sigset_t won't get defined in <sys/signal.h>.
88765095Seric	   This is due to a problematic protection rule in there, and is
88865095Seric	   fixed with gcc 2.4.5.
88965095Seric
89065095Seric	2) If you don't use the new Berkeley DB (-DNEWDB), then you need
89165095Seric	   to add "-lc -lucb" to the libraries to link with.  This is because
89265095Seric	   the -ldbm distributed by Dell needs the bcopy, bcmp and bzero
89365095Seric	   functions.  It is important that you specify both libraries in
89465095Seric	   the given order to be sure you only get the BSTRING functions
89565095Seric	   from the UCB library (and not the signal routines etc.).
89665095Seric
89765095Seric	3) Don't leave out "-lelf" even if compiling with "-lc -lucb".
89865095Seric	   The UCB library also has another copy of the nlist routines,
89965095Seric	   but we do want the ones from "-lelf".
90065095Seric
90165095Seric	If anyone needs a compiled gcc 2.4.5 and/or a ported DB library, they
90269747Seric	can use anonymous ftp to fetch them from lut.fi in the /kim directory.
90365095Seric	They are copies of what I use on grendel.lut.fi, and offering them
90465095Seric	does not imply that I would also support them.  I have sent the DB
90565095Seric	port for SVR4 back to Keith Bostic for inclusion in the official
90665095Seric	distribution, but I haven't heard anything from him as of today.
90765095Seric
90865095Seric	- gcc-2.4.5-svr4.tar.gz	(gcc 2.4.5 and the corresponding libg++)
90965095Seric	- db-1.72.tar.gz	(with source, objects and a installed copy)
91065095Seric
91165095Seric	Cheers
91265095Seric	+ Kim
91369747Seric	--
91465095Seric	 *  Kimmo.Suominen@lut.fi  *  SysVr4 enthusiast at GRENDEL.LUT.FI  *
91565095Seric	*    KIM@FINFILES.BITNET   *  Postmaster and Hostmaster at LUT.FI   *
91665095Seric	 *    + 358 200 865 718    *  Unix area moderator at NIC.FUNET.FI  *
91765095Seric
91868543SericConvexOS 10.1 and below
91968543Seric	In order to use the name server, you must create the file
92068543Seric	/etc/use_nameserver.  If this file does not exist, the call
92168543Seric	to res_init() will fail and you will have absolutely no
92268543Seric	access to DNS, including MX records.
92365095Seric
92468543SericAmdahl UTS 2.1.5
92568543Seric	In order to get UTS to work, you will have to port BIND 4.9.
92668543Seric	The vendor's BIND is reported to be ``totally inadequate.''
92768543Seric	See sendmail/contrib/AmdahlUTS.patch for the patches necessary
92868543Seric	to get BIND 4.9 compiled for UTS.
92968543Seric
93068543SericUnixWare 2.0
93168543Seric	According to Alexander Kolbasov <sasha@unitech.gamma.ru>,
93268543Seric	the m4 on UnixWare 2.0 (still in Beta) will core dump on the
93368543Seric	config files.  GNU m4 and the m4 from UnixWare 1.x both work.
93468543Seric
93564718SericNon-DNS based sites
93664718Seric	This version of sendmail always tries to connect to the Domain
93764718Seric	Name System (DNS) to resolve names, regardless of the setting
93864718Seric	of the `I' option.  On most systems that are not running DNS,
93964718Seric	this will fail quickly and sendmail will continue, but on some
94064718Seric	systems it has a long timeout.  If you have this problem, you
94164718Seric	will have to recompile without NAMED_BIND.  Some people have
94264718Seric	claimed that they have successfully used "OI+USEVC" to force
94364718Seric	sendmail to use a virtual circuit -- this will always time out
94464718Seric	quickly, but also tells sendmail that a failed connection
94564718Seric	should requeue the message (probably not what you intended).
94664718Seric	A future release of sendmail will correct this problem.
94764718Seric
94864250SericBoth NEWDB and NDBM
94964250Seric	If you use both -DNDBM and -DNEWDB, you must delete the module
95064250Seric	ndbm.o from libdb.a and delete the file "ndbm.h" from the files
95164250Seric	that get installed (that is, use the OLD ndbm.h, not the new
95264250Seric	ndbm.h).  This compatibility module maps ndbm calls into DB
95364250Seric	calls, and breaks things rather badly.
95458709Seric
95564559SericGNU getopt
95664559Seric	I'm told that GNU getopt has a problem in that it gets confused
95764559Seric	by the double call.  Use the version in conf.c instead.
95864250Seric
95966350SericBIND 4.9.2 and Ultrix
96068543Seric	If you are running on Ultrix, be sure you read conf/Info.Ultrix
96168543Seric	in the BIND distribution very carefully -- there is information
96268543Seric	in there that you need to know in order to avoid errors of the
96368543Seric	form:
96464559Seric
96566350Seric		/lib/libc.a(gethostent.o): sethostent: multiply defined
96666350Seric		/lib/libc.a(gethostent.o): endhostent: multiply defined
96766350Seric		/lib/libc.a(gethostent.o): gethostbyname: multiply defined
96866350Seric		/lib/libc.a(gethostent.o): gethostbyaddr: multiply defined
96966350Seric
97066350Seric	during the link stage.
97166350Seric
97268890Sericstrtoul
97368890Seric	Some compilers (notably gcc) claim to be ANSI C but do not
97468890Seric	include the ANSI-required routine "strtoul".  If your compiler
97568890Seric	has this problem, you will get an error in srvrsmtp.c on the
97668890Seric	code:
97766350Seric
97868890Seric	  # ifdef defined(__STDC__) && !defined(BROKEN_ANSI_LIBRARY)
97968890Seric			e->e_msgsize = strtoul(vp, (char **) NULL, 10);
98068890Seric	  # else
98168890Seric			e->e_msgsize = strtol(vp, (char **) NULL, 10);
98268890Seric	  # endif
98368890Seric
98468890Seric	You can use -DBROKEN_ANSI_LIBRARY to get around this problem.
98568890Seric
98668890Seric
98764820Seric+--------------+
98864820Seric| MANUAL PAGES |
98964820Seric+--------------+
99064820Seric
99164820SericThe manual pages have been written against the -mandoc macros
99264820Sericinstead of the -man macros.  The latest version of groff has them
99364820Sericincluded.  You can also get a copy from FTP.UU.NET in directory
99464820Seric/systems/unix/bsd-sources/share/tmac.
99564820Seric
99664820Seric
99765151Seric+-----------------+
99865151Seric| DEBUGGING HOOKS |
99965151Seric+-----------------+
100065151Seric
100165151SericAs of 8.6.5, sendmail daemons will catch a SIGUSR1 signal and log
100265151Sericsome debugging output (logged at LOG_DEBUG severity).  The
100365151Sericinformation dumped is:
100465151Seric
100565151Seric * The value of the $j macro.
100665151Seric * A warning if $j is not in the set $=w.
100765151Seric * A list of the open file descriptors.
100865151Seric * The contents of the connection cache.
100965151Seric * If ruleset 89 is defined, it is evaluated and the results printed.
101065151Seric
101165151SericThis allows you to get information regarding the runtime state of the
101265151Sericdaemon on the fly.  This should not be done too frequently, since
101365151Sericthe process of rewriting may lose memory which will not be recovered.
101465151SericAlso, ruleset 89 may call non-reentrant routines, so there is a small
101565151Sericnon-zero probability that this will cause other problems.  It is
101665151Sericreally only for debugging serious problems.
101765151Seric
101865151SericA typical formulation of ruleset 89 would be:
101965151Seric
102065151Seric	R$*		$@ $>0 some test address
102165151Seric
102265151Seric
102364035Seric+-----------------------------+
102464035Seric| DESCRIPTION OF SOURCE FILES |
102564035Seric+-----------------------------+
102664035Seric
10279881SericThe following list describes the files in this directory:
10285369Seric
102957418SericMakefile	The makefile used here; this version only works with
103057418Seric		the new Berkeley make.
103157418SericMakefile.dist	A trimmed down version of the makefile that works with
103257418Seric		the old make.
10335369SericREAD_ME		This file.
103460565SericTRACEFLAGS	My own personal list of the trace flags -- not guaranteed
103560565Seric		to be particularly up to date.
10365369Sericalias.c		Does name aliasing in all forms.
10379881Sericarpadate.c	A subroutine which creates ARPANET standard dates.
10389881Sericclock.c		Routines to implement real-time oriented functions
10399881Seric		in sendmail -- e.g., timeouts.
10405369Sericcollect.c	The routine that actually reads the mail into a temp
10415369Seric		file.  It also does a certain amount of parsing of
10425369Seric		the header, etc.
10435369Sericconf.c		The configuration file.  This contains information
10445369Seric		that is presumed to be quite static and non-
10455369Seric		controversial, or code compiled in for efficiency
10465369Seric		reasons.  Most of the configuration is in sendmail.cf.
10479881Sericconf.h		Configuration that must be known everywhere.
10485369Sericconvtime.c	A routine to sanely process times.
10499881Sericdaemon.c	Routines to implement daemon mode.  This version is
10509881Seric		specifically for Berkeley 4.1 IPC.
10515369Sericdeliver.c	Routines to deliver mail.
105260565Sericdomain.c	Routines that interface with DNS (the Domain Name
105360565Seric		System).
10545369Sericerr.c		Routines to print error messages.
10559881Sericenvelope.c	Routines to manipulate the envelope structure.
10565369Sericheaders.c	Routines to process message headers.
10575369Sericmacro.c		The macro expander.  This is used internally to
10585369Seric		insert information from the configuration file.
10595369Sericmain.c		The main routine to sendmail.  This file also
10605369Seric		contains some miscellaneous routines.
106160565Sericmap.c		Support for database maps.
106260565Sericmci.c		Routines that handle mail connection information caching.
10639881Sericparseaddr.c	The routines which do address parsing.
10645369Sericqueue.c		Routines to implement message queueing.
10655369Sericreadcf.c	The routine that reads the configuration file and
10665369Seric		translates it to internal form.
10679881Sericrecipient.c	Routines that manipulate the recipient list.
10685369Sericsavemail.c	Routines which save the letter on processing errors.
10695369Sericsendmail.h	Main header file for sendmail.
10705369Sericsrvrsmtp.c	Routines to implement server SMTP.
10715369Sericstab.c		Routines to manage the symbol table.
10725369Sericstats.c		Routines to collect and post the statistics.
10735369Sericsysexits.c	List of error messages associated with error codes
10745369Seric		in sysexits.h.
10759881Serictrace.c		The trace package.  These routines allow setting and
10769881Seric		testing of trace flags with a high granularity.
107760565Sericudb.c		The user database interface module.
10785369Sericusersmtp.c	Routines to implement user SMTP.
10795369Sericutil.c		Some general purpose routines used by sendmail.
108060565Sericversion.c	The version number and information about this
108160565Seric		version of sendmail.  Theoretically, this gets
108260565Seric		modified on every change.
10835369Seric
10845369SericEric Allman
10855369Seric
1086*69951Seric(Version 8.98, last update 06/20/95 10:41:51)
1087