xref: /csrg-svn/usr.sbin/sendmail/src/READ_ME (revision 65366)
135062Sbostic# Copyright (c) 1983 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*65366Seric#	@(#)READ_ME	8.44 (Berkeley) 01/03/94
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
16*65366SericThe Makefile is for the new (4.4BSD) Berkeley make and uses syntax
17*65366Sericthat is not recognized by older makes.  It also has assumptions
18*65366Sericabout the 4.4 file system layout built in.  See below for details
19*65366Sericabout other Makefiles.
2057418Seric
2164501SericThere is also a Makefile.dist which is much less clever, but works on
2264501Sericthe old traditional make.  You can use this using:
2364501Seric
2457418Seric	make -f Makefile.dist
2557418Seric
26*65366Seric**************************************************
27*65366Seric**  Read below for more details of Makefiles.	**
28*65366Seric**************************************************
2957943Seric
3064272SericThere is also a shell script (makesendmail) that tries to be clever
3164272Sericabout using object subdirectories.  It's pretty straightforward, and
3264272Sericmay help if you share a source tree among different architectures.
3364035Seric
3465000Seric**************************************************************************
3565000Seric**  IMPORTANT:  DO NOT USE OPTIMIZATION (``-O'') IF YOU ARE RUNNING	**
3665000Seric**  GCC 2.4.x or 2.5.x.  THERE IS A BUG IN THE GCC OPTIMIZER THAT	**
3765000Seric**  CAUSES SENDMAIL COMPILES TO FAIL MISERABLY.				**
3865000Seric**************************************************************************
3964272Seric
4065000SericJim Wilson of Cygnus believes he has found the problem -- it will
4165000Sericprobably be fixed in GCC 2.5.6 -- but until this is verified, be
4265000Sericvery suspicious of gcc -O.
4364701Seric
4465000Seric**************************************************************************
4565000Seric**  IMPORTANT:  Read the appropriate paragraphs in the section on	**
4665000Seric**  ``Operating System and Compile Quirks''.				**
4765000Seric**************************************************************************
4864718Seric
4965000Seric
50*65366Seric+-----------+
51*65366Seric| MAKEFILES |
52*65366Seric+-----------+
53*65366Seric
54*65366SericThe "Makefile"s in these directories are from 4.4 BSD, and hence
55*65366Sericreally only work properly if you are on a 4.4 system.  In particular,
56*65366Sericthey use new syntax that will not be recognized on old make programs,
57*65366Sericand some of them do things like ``.include ../../Makefile.inc'' to
58*65366Sericpick up some system defines.  If you are getting sendmail separately,
59*65366Sericthese files won't be included in the distribution, as they are
60*65366Sericoutside of the sendmail tree.
61*65366Seric
62*65366SericInstead, you should use one of the other Makefiles, such as
63*65366SericMakefile.SunOS for a SunOS system, and so forth.  These should
64*65366Sericwork with the version of make that is appropriate for that
65*65366Sericsystem.
66*65366Seric
67*65366SericThere are a bunch of other Makefiles for other systems with names
68*65366Sericlike Makefile.HPUX for an HP-UX system.  They use the version of
69*65366Sericmake that is native for that system.  These are the Makefiles that
70*65366SericI use, and they have "Berkeley quirks" in them.  I can't guarantee
71*65366Sericthat they will work unmodified in your environment.  Many of them
72*65366Sericinclude -I/usr/sww/include/db and -L/usr/sww/lib -- this is Berkeley's
73*65366Sericlocation (the ``Software Warehouse'') for the new database libraries,
74*65366Sericdescribed below.  You don't have to remove these definitions if you
75*65366Sericdon't have these directories.
76*65366Seric
77*65366SericPlease look for an appropriate Makefile before you start trying to
78*65366Sericcompile with Makefile or Makefile.dist.
79*65366Seric
80*65366SericIf you want to port the new Berkeley make, you can get it from
81*65366Sericftp.uu.net in the directory /systems/unix/bsd-sources/usr.bin/make.
82*65366SericDiffs and instructions for building this version of make under
83*65366SericSunOS 4.1.x are available on ftp.css.itd.umich.edu in
84*65366Seric/pub/systems/sun/Net2-make.sun4.diff.Z.  Diffs and instructions
85*65366Sericfor building this version of make under IBM AIX 3.2.4 are available
86*65366Sericon ftp.uni-stuttgart.de in /sw/src/patches/bsd-make-rus-patches.
87*65366SericPaul Southworth <pauls@umich.edu> published a description of porting
88*65366Sericthis make in comp.unix.bsd.
89*65366Seric
90*65366SericThe complete text of the Makefile.inc that is in the parent of the
91*65366Sericsendmail directory is:
92*65366Seric
93*65366Seric	#	@(#)Makefile.inc	8.1 (Berkeley) 6/6/93
94*65366Seric
95*65366Seric	BINDIR?=	/usr/sbin
96*65366Seric
97*65366Seric
9864250Seric+----------------------+
9964250Seric| DATABASE DEFINITIONS |
10064250Seric+----------------------+
10164250Seric
10264250SericThere are several database formats that can be used for the alias files
10364250Sericand for general maps.  When used for alias files they interact in an
10464250Sericattempt to be back compatible.
10564250Seric
10664250SericThe three options are NEWDB (the new Berkeley DB package), NDBM (the
10764250Sericolder DBM implementation -- the very old V7 implementation is no
10864250Sericlonger supported), and NIS (Network Information Services).  Used alone
10964376Sericthese just include the support they indicate.  [If you are using NEWDB,
11064376Sericget the latest version from FTP.CS.Berkeley.EDU in /ucb/4bsd.  DO NOT
11165000Sericuse the version from the Net2 distribution!  However, if you are on
11265000SericBSD/386 or 386BSD-based systems, use the one that already exists
11365000Sericon your system.  You may need to define OLD_NEWDB to do this.]
11464250Seric
11564250SericIf NEWDB and NDBM are defined (but not NIS), then sendmail will read
11664250SericNDBM format alias files, but the next time a newaliases is run the
11764250Sericformat will be converted to NEWDB; that format will be used forever
11864250Sericmore.  This is intended as a transition feature.  [Note however that
11964250Sericthe NEWDB library also catches and maps NDBM calls; you will have to
12064250Sericback out this feature to get this to work.  See ``Quirks'' section
12164250Sericbelow for details.]
12264250Seric
12364250SericIf all three are defined, sendmail operates as described above, and also
12464250Sericlooks for the file /var/yp/Makefile.  If it exists, newaliases will
12564250Sericbuild BOTH the NEWDB and NDBM format alias files.  However, it will
12664250Sericonly use the NEWDB file; the NDBM format file is used only by the
12764250SericNIS subsystem.
12864250Seric
12964250SericIf NDBM and NIS are defined (regardless of the definition of NEWDB
13064250Sericor the existance of /var/yp/Makefile), sendmail adds the special
13164250Serictokens "YP_LAST_MODIFIED" and "YP_MASTER_NAME", both of which are
13264250Sericrequired if the NDBM file is to be used as an NIS map.
13364250Seric
13464250SericAll of -DNEWDB, -DNDBM, and -DNIS are normally defined in the DBMDEF
13564250Sericline in the Makefile.
13664250Seric
13764250Seric
13864035Seric+---------------+
13964035Seric| COMPILE FLAGS |
14064035Seric+---------------+
14164035Seric
14260565SericWhereever possible, I try to make sendmail pull in the correct
14360584Sericcompilation options needed to compile on various environments based on
14460584Sericautomatically defined symbols.  Some machines don't seem to have useful
14560584Sericsymbols availble, requiring the following compilation flags in the
14660584SericMakefile:
14760565Seric
14860565SericSOLARIS		Define this if you are running Solaris 2.0 or higher.
14965000SericSOLARIS_2_3	Define this if you are running Solaris 2.3 or higher.
15065108SericSUNOS403	Define this if you are running SunOS 4.0.3.
15164077SericNeXT		Define this if you are on a NeXT box.  (This one may
15264072Seric		be pre-defined for you.)  There are other hacks you
15364072Seric		have to make -- see below.
15460565Seric_AIX3		Define this if you are IBM AIX 3.x.
15563965SericRISCOS		Define this if you are running RISC/os from MIPS.
15664501Seric_SCO_unix_	Define this if you are on SCO UNIX.
15765095Seric_SCO_unix_4_2	Define this if you are on SCO Open Server 3.2v4.
15860565Seric
15960584SericIf you are a system that sendmail has already been ported to, you
16060584Sericprobably won't have to touch these.  But if you are porting, you may
16163962Serichave to tweak the following compilation flags in conf.h in order to
16263962Sericget it to compile and link properly:
16360565Seric
16465195SericSYSTEM5		Adjust for System V (not necessarily Release 4).
16564035SericSYS5SIGNALS	Use System V signal semantics -- the signal handler
16664035Seric		is automatically dropped when the signal is caught.
16764035Seric		If this is not set, use POSIX/BSD semantics, where the
16864035Seric		signal handler stays in force until an exec or an
16964035Seric		explicit delete.  Implied by SYSTEM5.
17064706SericSYS5SETPGRP	Use System V setpgrp() semantics.  Implied by SYSTEM5.
17164035SericHASFLOCK	Set this if you prefer to use the flock(2) system call
17264035Seric		rather than using fcntl-based locking.  Fcntl locking
17364035Seric		has some semantic gotchas, but many vendor systems
17464035Seric		also interface it to lockd(8) to do NFS-style locking.
17564035Seric		For this reason, this should not be set unless you
17664035Seric		don't have an alternative.
17760565SericHASUNAME	Set if you have the "uname" system call.  Implied by
17860565Seric		SYSTEM5.
17963962SericHASUNSETENV	Define this if your system library has the "unsetenv"
18063962Seric		subroutine.
18160584SericHASSTATFS	Define this if you have the statfs(2) system call.  It's
18260584Seric		not a disaster to get this wrong -- but you do lose the
18360584Seric		queue free space code.
18460584SericHASUSTAT	Define this if you have the ustat(2) system call.  It's
18560584Seric		not a disaster to get this wrong -- but you do lose the
18660584Seric		queue free space code.
18760565SericHASSETSID	Define this if you have the setsid(2) system call.  This
18860565Seric		is implied if your system appears to be POSIX compliant.
18960565SericHASINITGROUPS	Define this if you have the initgroups(3) routine.
19063753SericHASSETVBUF	Define this if you have the setvbuf(3) library call.
19163753Seric		If you don't, setlinebuf will be used instead.  This
19263753Seric		defaults on if your compiler defines __STDC__.
19363902SericHASSETREUID	Define this if you have setreuid(2) ***AND*** root can
19463902Seric		use setreuid to change to an arbitrary user.  This second
19563902Seric		condition is not satisfied on AIX 3.x.  You may find that
19663902Seric		your system has setresuid(2), (for example, on HP-UX) in
19763902Seric		which case you will also have to #define setreuid(r, e)
19863902Seric		to be the appropriate call.  Some systems (such as Solaris)
19965000Seric		have a compatibility routine that doesn't work properly,
20065000Seric		but may have "saved user ids" properly implemented so you
20165000Seric		can ``#define setreuid(r, e) seteuid(e)'' and have it work.
20263902Seric		The important thing is that you have a call that will set
20365000Seric		the effective uid independently of the real or saved uid
20465000Seric		and be able to set the effective uid back again when done.
20565000Seric		There's a test program in ../test/t_setreuid.c that will
20665000Seric		try things on your system.  Setting this improves the
20765000Seric		security, since sendmail doesn't have to read .forward
20865000Seric		and :include: files as root.  There are certain attacks
20965000Seric		that may be unpreventable without this call.
21065000SericHASLSTAT	Define this if you have symbolic links (and thus the
21165000Seric		lstat(2) system call).  This improves security.  Unlike
21265000Seric		most other options, this one is on by default, so you
21365000Seric		need to #undef it in conf.h if you don't have symbolic
21465000Seric		links (these days everyone does).
21565206SericNEEDGETOPT	Define this if you need a reimplementation of getopt(3).
21665206Seric		On some systems, getopt does very odd things if called
21765206Seric		to scan the arguments twice.  This flag will ask sendmail
21865206Seric		to compile in a local version of getopt that works
21965206Seric		properly.
22065206SericNEEDSTRTOL	Define this if your standard C library does not define
22165206Seric		strtol(3).  This will compile in a local version.
22265206SericNEEDVPRINTF	Define this if your standard C library does not define
22365206Seric		vprintf(3).  Note that the resulting fake implementation
22465206Seric		is not very elegant and may not even work on some
22565206Seric		architectures.
22665211SericHASGETUSERSHELL	Define this to 1 if you have getusershell(3) in your
22765211Seric		standard C library.  If this is not defined, or is defined
22865211Seric		to be 0, sendmail will scan the /etc/shells file (no
22965211Seric		NIS-style support, defaults to /bin/sh and /bin/csh if
23065211Seric		that file does not exist) to get a list of unrestricted
23165211Seric		user shells.  This is used to determine whether users
23265211Seric		are allowed to forward their mail to a program or a file.
23363937SericGIDSET_T	The type of entries in a gidset passed as the second
23463937Seric		argument to getgroups(2).  Historically this has been an
23563937Seric		int, so this is the default, but some systems (such as
23663937Seric		IRIX) pass it as a gid_t, which is an unsigned short.
23763937Seric		This will make a difference, so it is important to get
23863937Seric		this right!  However, it is only an issue if you have
23963937Seric		group sets.
24063968SericSLEEP_T		The type returned by the system sleep() function.
24163968Seric		Defaults to "unsigned int".  Don't worry about this
24263968Seric		if you don't have compilation problems.
24363974SericARBPTR_T	The type of an arbitrary pointer -- defaults to "void *".
24463974Seric		If you are an very old compiler you may need to define
24563974Seric		this to be "char *".
24660584SericLA_TYPE		The type of load average your kernel supports.  These
24760584Seric		can be LA_SUBR (4) if you have the getloadavg(3) routine,
24864376Seric		LA_MACH (5) to use MACH-style load averages (calls
24964376Seric		processor_set_info()), LA_FLOAT (3) if you read kmem and
25064376Seric		interpret the value as a floating point number, LA_INT (2)
25164376Seric		to interpret as a long integer, or LA_SHORT (6) to
25264376Seric		interpret as a short integer.  These last three have
25364376Seric		several other parameters that they try to divine: the
25464376Seric		name of your kernel, the name of the variable in the
25564376Seric		kernel to examine, the number of bits of precision in
25664376Seric		a fixed point load average, and so forth.  In desparation,
25764376Seric		use LA_ZERO (1) -- it always returns the load average as
25864376Seric		"zero" (and does so on all architectures).  The actual
25964376Seric		code is in conf.c -- it can be tweaked if you are brave.
26063962SericERRLIST_PREDEFINED
26163962Seric		If set, assumes that some header file defines sys_errlist.
26263962Seric		This may be needed if you get type conflicts on this
26363962Seric		variable -- otherwise don't worry about it.
26464562SericWAITUNION	The wait(2) routine takes a "union wait" argument instead
26564562Seric		of an integer argument.  This is for compatibility with
26664562Seric		old versions of BSD.
26765000SericSCANF		You can set this to extend the F command to accept a
26865000Seric		scanf string -- this gives you a primitive parser for
26965000Seric		class definitions -- BUT it can make you vulnerable to
27065000Seric		core dumps if the target file is poorly formed.
27165095SericSYSLOG_BUFSIZE	You can define this to be the size of the buffer that
27265095Seric		syslog accepts.  If it is not defined, it assumes a
27365095Seric		1024-byte buffer.  If the buffer is very small (under
27465095Seric		256 bytes) the log message format changes -- each
27565095Seric		e-mail message will log many more messages, since it
27665095Seric		will log each piece of information as a separate line
27765095Seric		in syslog.
27860565Seric
27964035Seric
28064035Seric+-----------------------+
28164035Seric| COMPILE-TIME FEATURES |
28264035Seric+-----------------------+
28364035Seric
28460584SericThere are a bunch of features that you can decide to compile in, such
28560584Sericas selecting various database packages and special protocol support.
28660584SericSeveral are assumed based on other compilation flags -- if you want to
28760584Seric"un-assume" something, you probably need to edit conf.h.  Compilation
28860584Sericflags that add support for special features include:
28960565Seric
29060565SericNDBM		Include support for "new" DBM library for aliases and maps.
29164250Seric		Normally defined in the Makefile.
29260565SericNEWDB		Include support for Berkeley "db" package (hash & btree)
29364250Seric		for aliases and maps.  Normally defined in the Makefile.
29460565SericNIS		Define this to get NIS (YP) support for aliases and maps.
29564250Seric		Normally defined in the Makefile.
29660565SericUSERDB		Include support for the User Information Database.  Implied
29764250Seric		by NEWDB in conf.h.
29865000SericIDENTPROTO	Define this as 1 to get IDENT (RFC 1413) protocol support.
29960565Seric		This is assumed unless you are running on Ultrix or
30060565Seric		HP-UX, both of which have a problem in the UDP
30165000Seric		implementation.  You can define it to be 0 to explicitly
30265000Seric		turn off IDENT protocol support.
30360565SericMIME		Include support for MIME-encapsulated error messages.
30460565SericLOG		Set this to get syslog(3) support.  Defined by default
30560584Seric		in conf.h.  You want this if at all possible.
30660565SericNETINET		Set this to get TCP/IP support.  Defined by default
30760584Seric		in conf.h.  You probably want this.
30860565SericNETISO		Define this to get ISO networking support.
30960565SericSMTP		Define this to get the SMTP code.  Implied by NETINET
31060565Seric		or NETISO.
31160565SericNAMED_BIND	Define this to get DNS (name daemon) support, including
31260565Seric		MX support.  The specs you must use this if you run
31360565Seric		SMTP.  Defined by default in conf.h.
31460565SericQUEUE		Define this to get queueing code.  Implied by NETINET
31560584Seric		or NETISO; required by SMTP.  This gives you other good
31660584Seric		stuff -- it should be on.
31760565SericDAEMON		Define this to get general network support.  Implied by
31860584Seric		NETINET or NETISO.  Defined by default in conf.h.  You
31960584Seric		almost certainly want it on.
32060565SericMATCHGECOS	Permit fuzzy matching of user names against the full
32160565Seric		name (GECOS) field in the /etc/passwd file.  This should
32260565Seric		probably be on, since you can disable it from the config
32360584Seric		file if you want to.  Defined by default in conf.h.
32460565SericSETPROCTITLE	Try to set the string printed by "ps" to something
32560584Seric		informative about what sendmail is doing.  Defined by
32660584Seric		default in conf.h.
32760565Seric
32864035Seric
32965000Seric+---------------------+
33065000Seric| DNS/RESOLVER ISSUES |
33165000Seric+---------------------+
33265000Seric
33365000SericMany systems have old versions of the resolver library.  At a minimum,
33465000Sericyou should be running BIND 4.8.3; older versions may compile, but they
33565000Serichave known bugs that should give you pause.
33665000Seric
33765000SericCommon problems in old versions include "undefined" errors for
33865000Sericdn_skipname.
33965000Seric
34065000SericSome people have had a problem with BIND 4.9; it uses some routines
34165000Sericthat it expects to be externally defined such as strerror().  It may
34265000Serichelp to link with "-l44bsd" to solve this problem.
34365000Seric
34465095Seric!PLEASE! be sure to link with the same version of the resolver as
34565095Sericthe header files you used -- some people have used the 4.9 headers
34665095Sericand linked with BIND 4.8 or vice versa, and it doesn't work.
34765095SericUnfortunately, it doesn't fail in an obvious way -- things just
34865095Sericsubtlely don't work.
34965000Seric
35065095Seric
35164035Seric+-------------------------------------+
35264035Seric| OPERATING SYSTEM AND COMPILE QUIRKS |
35364035Seric+-------------------------------------+
35464035Seric
35565095SericGCC 2.5.x problems  *** IMPORTANT ***
35665095Seric	Date: Mon, 29 Nov 93 19:08:44 PST
35765095Seric	From: wilson@cygnus.com (Jim Wilson)
35865095Seric	Message-Id: <9311300308.AA04608@cygnus.com>
35965095Seric	To: kenner@vlsi1.ultra.nyu.edu
36065095Seric	Subject: [cattelan@thebarn.com: gcc 2.5.4-2.5.5 -O bug]
36165095Seric	Cc: cattelan@thebarn.com, rms@gnu.ai.mit.edu, sendmail@cs.berkeley.edu
36265095Seric
36365095Seric	This fixes a problem that occurs when gcc 2.5.5 is used to compile
36465095Seric	sendmail 8.6.4 with optimization on a sparc.
36565095Seric
36665095Seric	Mon Nov 29 19:00:14 1993  Jim Wilson  (wilson@sphagnum.cygnus.com)
36765095Seric
36865095Seric		* reload.c (find_reloads_toplev): Replace obsolete reference to
36965095Seric		BYTE_LOADS_*_EXTEND with LOAD_EXTEND_OP.
37065095Seric
37165095Seric	*** clean-ss-931128/reload.c    Sun Nov 14 16:20:01 1993
37265095Seric	--- ss-931128/reload.c  Mon Nov 29 18:52:55 1993
37365095Seric	*************** find_reloads_toplev (x, opnum, type, ind
37465095Seric	*** 3888,3894 ****
37565095Seric		 force a reload in that case.  So we should not do anything here.  */
37665095Seric
37765095Seric		else if (regno >= FIRST_PSEUDO_REGISTER
37865095Seric	! #if defined(BYTE_LOADS_ZERO_EXTEND) || defined(BYTE_LOADS_SIGN_EXTEND)
37965095Seric		       && (GET_MODE_SIZE (GET_MODE (x))
38065095Seric			   <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
38165095Seric	  #endif
38265095Seric	--- 3888,3894 ----
38365095Seric		 force a reload in that case.  So we should not do anything here.  */
38465095Seric
38565095Seric		else if (regno >= FIRST_PSEUDO_REGISTER
38665095Seric	! #ifdef LOAD_EXTEND_OP
38765095Seric		       && (GET_MODE_SIZE (GET_MODE (x))
38865095Seric			   <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
38965095Seric	  #endif
39065095Seric
39165095Seric
39264376SericSunOS 4.x (Solaris 1.x)
39364376Seric	You may have to use -lresolv on SunOS.  However, beware that
39464376Seric	this links in a new version of gethostbyname that does not
39564376Seric	understand NIS, so you must have all of your hosts in DNS.
39664035Seric
39764798Seric	Some people have reported problems with the SunOS version of
39864798Seric	-lresolv and/or in.named, and suggest that you get a newer
39964798Seric	version.  The symptoms are delays when you connect to the
40065000Seric	SMTP server on a SunOS machine or having your domain added to
40165000Seric	addresses inappropriately.  There is a version of BIND
40264798Seric	version 4.9 on gatekeeper.DEC.COM in pub/BSD/bind/4.9.
40364798Seric
40464400Seric	There is substantial disagreement about whether you can make
40564400Seric	this work with resolv+, which allows you to specify a search-path
40664400Seric	of services.  Some people report that it works fine, others
40764400Seric	claim it doesn't work at all (including causing sendmail to
40864400Seric	drop core when it tries to do multiple resolv+ lookups for a
40964400Seric	single job).  I haven't tried resolv+, as we use DNS exclusively.
41064400Seric
41164400Seric	Should you want to try resolv+, it is on ftp.uu.net in
41264400Seric	/networking/ip/dns.
41364400Seric
41464376SericSolaris 2.x (SunOS 5.x)
41564376Seric	To compile for Solaris, be sure you use -DSOLARIS.
41664376Seric
41764364Seric	From a correspondent:
41864364Seric
41964364Seric	   For solaris 2.2, I have
42064364Seric
42164364Seric		hosts:      files dns
42264364Seric
42364364Seric	   in /etc/nsswitch.conf and /etc/hosts has to have the fully
42464364Seric	   qualified host name. I think "files" has to be before "dns"
42564364Seric	   in /etc/nsswitch.conf during bootup.
42664364Seric
42764376Seric	To the best of my knowledge, Solaris does not have the
42864376Seric	gethostbyname problem described above.
42964376Seric
43064385Seric	The Solaris "syslog" function is apparently limited to something
43164385Seric	about 90 characters because of a kernel limitation.  If you have
43265000Seric	source code, you can probably up this number.  The syslogd patch
43365000Seric	is included in kernel jumbo patch for Solaris 2.2 as of revision
43465000Seric	-39 or so.  At least one person is running with patch 100999-45
43565166Seric	and their long lost sendmail logging is finally showing up.  At
43665166Seric	least one other person is running with patch 101318 installed
43765166Seric	under Solaris 2.3 with success.
43864385Seric
43964250SericOSF/1
44065000Seric	If you are compiling on OSF/1 (DEC Alpha), you must use
44165000Seric	-non_shared (otherwise it core dumps on startup).  You may also
44265000Seric	need -mld to get the nlist() function, although some versions
44365000Seric	apparently don't need this.
44465000Seric
44565000Seric	Also, the enclosed makefile removed /usr/sbin/smtpd; if you need
44665000Seric	it, just create the link to the sendmail binary.
44757977Seric
44864250SericNeXT
44964250Seric	If you are compiling on NeXT, you will have to create an empty
45064250Seric	file "unistd.h" and create a file "dirent.h" containing:
45163753Seric
45264250Seric		#include <sys/dir.h>
45364250Seric		#define dirent	direct
45464035Seric
45564250Seric	(The Makefile.NeXT should try to do both of these for you.)
45664077Seric
45764364Seric	Apparently, there is a bug in getservbyname on Nextstep 3.0
45864364Seric	that causes it to fail under some circumstances with the
45964364Seric	message "SYSERR: service "smtp" unknown" logged.  You should
46064364Seric	be able to work around this by including the line:
46164364Seric
46264670Seric		OOPort=25
46364364Seric
46464364Seric	in your .cf file.
46564364Seric
46664376Seric	You may have to use -DNeXT.
46764376Seric
46865000SericBSDI (BSD/386) 1.0, NetBSD 0.9, FreeBSD 1.0
46965000Seric	The "m4" from BSDI won't handle the config files properly.
47065000Seric	I haven't had a chance to test this myself.
47157943Seric
47265000Seric	The M4 shipped in FreeBSD and NetBSD 0.9 don't handle the config
47365000Seric	files properly. One must use either GNU m4 1.1 or the PD-M4
47465000Seric	recently posted in comp.os.386bsd.bugs (and maybe others).
47565000Seric	NetBSD-current includes the PD-M4 (as stated in the NetBSD file
47665000Seric	CHANGES).
47765000Seric
47865000Seric	FreeBSD 1.0 RELEASE has uname(2) now. Use -DUSEUNAME in order to
47965000Seric	use it (look into Makefile.FreeBSD). NetBSD-current may have
48065000Seric	it too but it has not been verified.
48165000Seric
48265000Seric	You cannot port the latest version of the Berkeley db library
48365000Seric	and use it with sendmail without recompiling the world.  This
48465000Seric	is because C library routines use the older version which have
48565000Seric	incompatible header files -- the result is that it can't read
48665000Seric	other system files, such as /etc/passwd, unless you use the
48765000Seric	new db format throughout your system.  You should normally just
48865000Seric	use the version of db supplied in your release.  You may need
48965000Seric	to use -DOLD_NEWDB to make this work -- this turns off some
49065000Seric	new interface calls (for file locking) that are not in older
49165000Seric	versions of db.  You'll get compile errors if you need this
49265000Seric	flag and don't have it set.
49365000Seric
49464364Seric4.3BSD
49564364Seric	If you are running a "virgin" version of 4.3BSD, you'll have
49664364Seric	a very old resolver and be missing some header files.  The
49764364Seric	header files are simple -- create empty versions and everything
49864364Seric	will work fine.  For the resolver you should really port a new
49964364Seric	version (4.8.3 or later) of the resolver; 4.9 is available on
50064364Seric	gatekeeper.DEC.COM in pub/BSD/bind/4.9.  If you are really
50164364Seric	determined to continue to use your old, buggy version (or as
50264364Seric	a shortcut to get sendmail working -- I'm sure you have the
50364364Seric	best intentions to port a modern version of BIND), you can
50464364Seric	copy ../contrib/oldbind.compat.c into src and add
50564364Seric	oldbind.compat.o to OBJADD in the Makefile.
50664364Seric
50764718SericA/UX
50864718Seric	Date: Tue, 12 Oct 1993 18:28:28 -0400 (EDT)
50964718Seric	From: "Eric C. Hagberg" <hagberg@med.cornell.edu>
51064718Seric	Subject: Fix for A/UX ndbm
51164718Seric
51264718Seric	I guess this isn't really a sendmail bug, however, it is something
51364718Seric	that A/UX users should be aware of when compiling sendmail 8.6.
51464718Seric
51564718Seric	Apparently, the calls that sendmail is using to the ndbm routines
51664718Seric	in A/UX 3.0.x contain calls to "broken" routines, in that the
51764718Seric	aliases database will break when it gets "just a little big"
51864718Seric	(sorry I don't have exact numbers here, but it broke somewhere
51964718Seric	around 20-25 aliases for me.), making all aliases non-functional
52064718Seric	after exceeding this point.
52164718Seric
52264718Seric	What I did was to get the gnu-dbm-1.6 package, compile it, and
52364718Seric	then re-compile sendmail with "-lgdbm", "-DNDBM", and using the
52464718Seric	ndbm.h header file that comes with the gnu-package. This makes
52564718Seric	things behave properly.
52664718Seric
52764718Seric	I suppose porting the New Berkeley db package is another route,
52864718Seric	however, I made a quick attempt at it, and found it difficult
52964718Seric	(not easy at least); the gnu-dbm package "configured" and
53064718Seric	compiled easily.
53164718Seric
53264718SericDG/UX
53364718Seric	Apparently, /bin/mail doesn't work properly for delivery on
53464718Seric	DG/UX -- the person who has this working, Douglas Anderson
53564718Seric	<dlander@afterlife.ncsc.mil>, used procmail instead.
53664718Seric
53765195SericSystem V Release 4 Based Systems
53865195Seric	There is a single Makefile that is intended for all SVR4-based
53965195Seric	systems (called Makefile.SVR4).  It defines __svr4__, which is
54065195Seric	predefined by some compilers.  If your compiler already defines
54165195Seric	this compile variable, you can delete the definition from the
54265195Seric	Makefile.
54365195Seric
54465195Seric	It's been tested on Dell Issue 2.2.
54565195Seric
54665095SericDELL SVR4
54765095Seric	Date:      Mon, 06 Dec 1993 10:42:29 EST
54865095Seric	From: "Kimmo Suominen" <kim@grendel.lut.fi>
54965095Seric	Message-ID: <2d0352f9.lento29@lento29.UUCP>
55065095Seric	To: eric@cs.berkeley.edu
55165166Seric	Cc: sendmail@cs.berkeley.edu
55265095Seric	Subject:   Notes for DELL SVR4
55365095Seric
55465095Seric	Eric,
55565095Seric
55665095Seric	Here are some notes for compiling Sendmail 8.6.4 on DELL SVR4.  I ran
55765095Seric	across these things when helping out some people who contacted me by
55865095Seric	e-mail.
55965095Seric
56065095Seric	1) Use gcc 2.4.5 (or later?).  Dell distributes gcc 2.1 with their
56165095Seric	   Issue 2.2 Unix.  It is too old, and gives you problems with
56265095Seric	   clock.c, because sigset_t won't get defined in <sys/signal.h>.
56365095Seric	   This is due to a problematic protection rule in there, and is
56465095Seric	   fixed with gcc 2.4.5.
56565095Seric
56665095Seric	2) If you don't use the new Berkeley DB (-DNEWDB), then you need
56765095Seric	   to add "-lc -lucb" to the libraries to link with.  This is because
56865095Seric	   the -ldbm distributed by Dell needs the bcopy, bcmp and bzero
56965095Seric	   functions.  It is important that you specify both libraries in
57065095Seric	   the given order to be sure you only get the BSTRING functions
57165095Seric	   from the UCB library (and not the signal routines etc.).
57265095Seric
57365095Seric	3) Don't leave out "-lelf" even if compiling with "-lc -lucb".
57465095Seric	   The UCB library also has another copy of the nlist routines,
57565095Seric	   but we do want the ones from "-lelf".
57665095Seric
57765095Seric	If anyone needs a compiled gcc 2.4.5 and/or a ported DB library, they
57865095Seric	can use anonymous ftp to fetch them from lut.fi in the /kim directory.
57965095Seric	They are copies of what I use on grendel.lut.fi, and offering them
58065095Seric	does not imply that I would also support them.  I have sent the DB
58165095Seric	port for SVR4 back to Keith Bostic for inclusion in the official
58265095Seric	distribution, but I haven't heard anything from him as of today.
58365095Seric
58465095Seric	- gcc-2.4.5-svr4.tar.gz	(gcc 2.4.5 and the corresponding libg++)
58565095Seric	- db-1.72.tar.gz	(with source, objects and a installed copy)
58665095Seric
58765095Seric	Cheers
58865095Seric	+ Kim
58965095Seric	--
59065095Seric	 *  Kimmo.Suominen@lut.fi  *  SysVr4 enthusiast at GRENDEL.LUT.FI  *
59165095Seric	*    KIM@FINFILES.BITNET   *  Postmaster and Hostmaster at LUT.FI   *
59265095Seric	 *    + 358 200 865 718    *  Unix area moderator at NIC.FUNET.FI  *
59365095Seric
59465095Seric
59564718SericNon-DNS based sites
59664718Seric	This version of sendmail always tries to connect to the Domain
59764718Seric	Name System (DNS) to resolve names, regardless of the setting
59864718Seric	of the `I' option.  On most systems that are not running DNS,
59964718Seric	this will fail quickly and sendmail will continue, but on some
60064718Seric	systems it has a long timeout.  If you have this problem, you
60164718Seric	will have to recompile without NAMED_BIND.  Some people have
60264718Seric	claimed that they have successfully used "OI+USEVC" to force
60364718Seric	sendmail to use a virtual circuit -- this will always time out
60464718Seric	quickly, but also tells sendmail that a failed connection
60564718Seric	should requeue the message (probably not what you intended).
60664718Seric	A future release of sendmail will correct this problem.
60764718Seric
60864250SericBoth NEWDB and NDBM
60964250Seric	If you use both -DNDBM and -DNEWDB, you must delete the module
61064250Seric	ndbm.o from libdb.a and delete the file "ndbm.h" from the files
61164250Seric	that get installed (that is, use the OLD ndbm.h, not the new
61264250Seric	ndbm.h).  This compatibility module maps ndbm calls into DB
61364250Seric	calls, and breaks things rather badly.
61458709Seric
61564559SericGNU getopt
61664559Seric	I'm told that GNU getopt has a problem in that it gets confused
61764559Seric	by the double call.  Use the version in conf.c instead.
61864250Seric
61964559Seric
62064820Seric+--------------+
62164820Seric| MANUAL PAGES |
62264820Seric+--------------+
62364820Seric
62464820SericThe manual pages have been written against the -mandoc macros
62564820Sericinstead of the -man macros.  The latest version of groff has them
62664820Sericincluded.  You can also get a copy from FTP.UU.NET in directory
62764820Seric/systems/unix/bsd-sources/share/tmac.
62864820Seric
62964820Seric
63065151Seric+-----------------+
63165151Seric| DEBUGGING HOOKS |
63265151Seric+-----------------+
63365151Seric
63465151SericAs of 8.6.5, sendmail daemons will catch a SIGUSR1 signal and log
63565151Sericsome debugging output (logged at LOG_DEBUG severity).  The
63665151Sericinformation dumped is:
63765151Seric
63865151Seric * The value of the $j macro.
63965151Seric * A warning if $j is not in the set $=w.
64065151Seric * A list of the open file descriptors.
64165151Seric * The contents of the connection cache.
64265151Seric * If ruleset 89 is defined, it is evaluated and the results printed.
64365151Seric
64465151SericThis allows you to get information regarding the runtime state of the
64565151Sericdaemon on the fly.  This should not be done too frequently, since
64665151Sericthe process of rewriting may lose memory which will not be recovered.
64765151SericAlso, ruleset 89 may call non-reentrant routines, so there is a small
64865151Sericnon-zero probability that this will cause other problems.  It is
64965151Sericreally only for debugging serious problems.
65065151Seric
65165151SericA typical formulation of ruleset 89 would be:
65265151Seric
65365151Seric	R$*		$@ $>0 some test address
65465151Seric
65565151Seric
65664035Seric+-----------------------------+
65764035Seric| DESCRIPTION OF SOURCE FILES |
65864035Seric+-----------------------------+
65964035Seric
6609881SericThe following list describes the files in this directory:
6615369Seric
66257418SericMakefile	The makefile used here; this version only works with
66357418Seric		the new Berkeley make.
66457418SericMakefile.dist	A trimmed down version of the makefile that works with
66557418Seric		the old make.
6665369SericREAD_ME		This file.
66760565SericTRACEFLAGS	My own personal list of the trace flags -- not guaranteed
66860565Seric		to be particularly up to date.
6695369Sericalias.c		Does name aliasing in all forms.
6709881Sericarpadate.c	A subroutine which creates ARPANET standard dates.
6719881Sericclock.c		Routines to implement real-time oriented functions
6729881Seric		in sendmail -- e.g., timeouts.
6735369Sericcollect.c	The routine that actually reads the mail into a temp
6745369Seric		file.  It also does a certain amount of parsing of
6755369Seric		the header, etc.
6765369Sericconf.c		The configuration file.  This contains information
6775369Seric		that is presumed to be quite static and non-
6785369Seric		controversial, or code compiled in for efficiency
6795369Seric		reasons.  Most of the configuration is in sendmail.cf.
6809881Sericconf.h		Configuration that must be known everywhere.
6815369Sericconvtime.c	A routine to sanely process times.
6829881Sericdaemon.c	Routines to implement daemon mode.  This version is
6839881Seric		specifically for Berkeley 4.1 IPC.
6845369Sericdeliver.c	Routines to deliver mail.
68560565Sericdomain.c	Routines that interface with DNS (the Domain Name
68660565Seric		System).
6875369Sericerr.c		Routines to print error messages.
6889881Sericenvelope.c	Routines to manipulate the envelope structure.
6895369Sericheaders.c	Routines to process message headers.
6905369Sericmacro.c		The macro expander.  This is used internally to
6915369Seric		insert information from the configuration file.
6925369Sericmain.c		The main routine to sendmail.  This file also
6935369Seric		contains some miscellaneous routines.
69460565Sericmap.c		Support for database maps.
69560565Sericmci.c		Routines that handle mail connection information caching.
6969881Sericparseaddr.c	The routines which do address parsing.
6975369Sericqueue.c		Routines to implement message queueing.
6985369Sericreadcf.c	The routine that reads the configuration file and
6995369Seric		translates it to internal form.
7009881Sericrecipient.c	Routines that manipulate the recipient list.
7015369Sericsavemail.c	Routines which save the letter on processing errors.
7025369Sericsendmail.h	Main header file for sendmail.
7035369Sericsrvrsmtp.c	Routines to implement server SMTP.
7045369Sericstab.c		Routines to manage the symbol table.
7055369Sericstats.c		Routines to collect and post the statistics.
7065369Sericsysexits.c	List of error messages associated with error codes
7075369Seric		in sysexits.h.
7089881Serictrace.c		The trace package.  These routines allow setting and
7099881Seric		testing of trace flags with a high granularity.
71060565Sericudb.c		The user database interface module.
7115369Sericusersmtp.c	Routines to implement user SMTP.
7125369Sericutil.c		Some general purpose routines used by sendmail.
71360565Sericversion.c	The version number and information about this
71460565Seric		version of sendmail.  Theoretically, this gets
71560565Seric		modified on every change.
7165369Seric
7175369SericEric Allman
7185369Seric
719*65366Seric(Version 8.44, last update 01/03/94 10:56:36)
720