xref: /csrg-svn/usr.sbin/sendmail/src/READ_ME (revision 65211)
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*65211Seric#	@(#)READ_ME	8.43 (Berkeley) 12/26/93
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
1664262SericThe Makefile is for the new (4.4BSD) Berkeley make, available from
1764262Sericftp.uu.net in the directory /systems/unix/bsd-sources/usr.bin/make.
1864501Seric(Paul Southworth <pauls@umich.edu> published a description of porting
1964501Sericthis make in comp.unix.bsd.)  This Makefile has assumptions about the
2064501Seric4.4 file system layout built in.
2157418Seric
2264501SericThere is also a Makefile.dist which is much less clever, but works on
2364501Sericthe old traditional make.  You can use this using:
2464501Seric
2557418Seric	make -f Makefile.dist
2657418Seric
2765195Seric     <<<<<<<<<<<<<<<<<<<<  IMPORTANT  >>>>>>>>>>>>>>>>>>>>
2864262SericThere are a bunch of other Makefiles for other systems -- these are
2960584Sericthe ones that I use, they have "Berkeley quirks" in them, and I don't
3064262Sericguarantee that they will work unmodified in your environment.  However,
3164262Sericthey are all designed for the old make and can be used to help you get
3264262Sericstarted.  They have names like "Makefile.HPUX".  Many of them include
3364262Seric-I/usr/sww/include/db and -L/usr/sww/lib -- this is Berkeley's
3465000Sericlocation for the new database libraries, described below.  You don't
3565000Serichave to remove these definitions if you don't have these directories.
3665195SericPlease look for an appropriate Makefile before you start trying to
3765195Sericcompile with Makefile or Makefile.dist.
3865195Seric     <<<<<<<<<<<<<<<<<<<<<<<<<<*>>>>>>>>>>>>>>>>>>>>>>>>>>
3957943Seric
4064272SericThere is also a shell script (makesendmail) that tries to be clever
4164272Sericabout using object subdirectories.  It's pretty straightforward, and
4264272Sericmay help if you share a source tree among different architectures.
4364035Seric
4465000Seric**************************************************************************
4565000Seric**  IMPORTANT:  DO NOT USE OPTIMIZATION (``-O'') IF YOU ARE RUNNING	**
4665000Seric**  GCC 2.4.x or 2.5.x.  THERE IS A BUG IN THE GCC OPTIMIZER THAT	**
4765000Seric**  CAUSES SENDMAIL COMPILES TO FAIL MISERABLY.				**
4865000Seric**************************************************************************
4964272Seric
5065000SericJim Wilson of Cygnus believes he has found the problem -- it will
5165000Sericprobably be fixed in GCC 2.5.6 -- but until this is verified, be
5265000Sericvery suspicious of gcc -O.
5364701Seric
5465000Seric**************************************************************************
5565000Seric**  IMPORTANT:  Read the appropriate paragraphs in the section on	**
5665000Seric**  ``Operating System and Compile Quirks''.				**
5765000Seric**************************************************************************
5864718Seric
5965000Seric
6064250Seric+----------------------+
6164250Seric| DATABASE DEFINITIONS |
6264250Seric+----------------------+
6364250Seric
6464250SericThere are several database formats that can be used for the alias files
6564250Sericand for general maps.  When used for alias files they interact in an
6664250Sericattempt to be back compatible.
6764250Seric
6864250SericThe three options are NEWDB (the new Berkeley DB package), NDBM (the
6964250Sericolder DBM implementation -- the very old V7 implementation is no
7064250Sericlonger supported), and NIS (Network Information Services).  Used alone
7164376Sericthese just include the support they indicate.  [If you are using NEWDB,
7264376Sericget the latest version from FTP.CS.Berkeley.EDU in /ucb/4bsd.  DO NOT
7365000Sericuse the version from the Net2 distribution!  However, if you are on
7465000SericBSD/386 or 386BSD-based systems, use the one that already exists
7565000Sericon your system.  You may need to define OLD_NEWDB to do this.]
7664250Seric
7764250SericIf NEWDB and NDBM are defined (but not NIS), then sendmail will read
7864250SericNDBM format alias files, but the next time a newaliases is run the
7964250Sericformat will be converted to NEWDB; that format will be used forever
8064250Sericmore.  This is intended as a transition feature.  [Note however that
8164250Sericthe NEWDB library also catches and maps NDBM calls; you will have to
8264250Sericback out this feature to get this to work.  See ``Quirks'' section
8364250Sericbelow for details.]
8464250Seric
8564250SericIf all three are defined, sendmail operates as described above, and also
8664250Sericlooks for the file /var/yp/Makefile.  If it exists, newaliases will
8764250Sericbuild BOTH the NEWDB and NDBM format alias files.  However, it will
8864250Sericonly use the NEWDB file; the NDBM format file is used only by the
8964250SericNIS subsystem.
9064250Seric
9164250SericIf NDBM and NIS are defined (regardless of the definition of NEWDB
9264250Sericor the existance of /var/yp/Makefile), sendmail adds the special
9364250Serictokens "YP_LAST_MODIFIED" and "YP_MASTER_NAME", both of which are
9464250Sericrequired if the NDBM file is to be used as an NIS map.
9564250Seric
9664250SericAll of -DNEWDB, -DNDBM, and -DNIS are normally defined in the DBMDEF
9764250Sericline in the Makefile.
9864250Seric
9964250Seric
10064035Seric+---------------+
10164035Seric| COMPILE FLAGS |
10264035Seric+---------------+
10364035Seric
10460565SericWhereever possible, I try to make sendmail pull in the correct
10560584Sericcompilation options needed to compile on various environments based on
10660584Sericautomatically defined symbols.  Some machines don't seem to have useful
10760584Sericsymbols availble, requiring the following compilation flags in the
10860584SericMakefile:
10960565Seric
11060565SericSOLARIS		Define this if you are running Solaris 2.0 or higher.
11165000SericSOLARIS_2_3	Define this if you are running Solaris 2.3 or higher.
11265108SericSUNOS403	Define this if you are running SunOS 4.0.3.
11364077SericNeXT		Define this if you are on a NeXT box.  (This one may
11464072Seric		be pre-defined for you.)  There are other hacks you
11564072Seric		have to make -- see below.
11660565Seric_AIX3		Define this if you are IBM AIX 3.x.
11763965SericRISCOS		Define this if you are running RISC/os from MIPS.
11864501Seric_SCO_unix_	Define this if you are on SCO UNIX.
11965095Seric_SCO_unix_4_2	Define this if you are on SCO Open Server 3.2v4.
12060565Seric
12160584SericIf you are a system that sendmail has already been ported to, you
12260584Sericprobably won't have to touch these.  But if you are porting, you may
12363962Serichave to tweak the following compilation flags in conf.h in order to
12463962Sericget it to compile and link properly:
12560565Seric
12665195SericSYSTEM5		Adjust for System V (not necessarily Release 4).
12764035SericSYS5SIGNALS	Use System V signal semantics -- the signal handler
12864035Seric		is automatically dropped when the signal is caught.
12964035Seric		If this is not set, use POSIX/BSD semantics, where the
13064035Seric		signal handler stays in force until an exec or an
13164035Seric		explicit delete.  Implied by SYSTEM5.
13264706SericSYS5SETPGRP	Use System V setpgrp() semantics.  Implied by SYSTEM5.
13364035SericHASFLOCK	Set this if you prefer to use the flock(2) system call
13464035Seric		rather than using fcntl-based locking.  Fcntl locking
13564035Seric		has some semantic gotchas, but many vendor systems
13664035Seric		also interface it to lockd(8) to do NFS-style locking.
13764035Seric		For this reason, this should not be set unless you
13864035Seric		don't have an alternative.
13960565SericHASUNAME	Set if you have the "uname" system call.  Implied by
14060565Seric		SYSTEM5.
14163962SericHASUNSETENV	Define this if your system library has the "unsetenv"
14263962Seric		subroutine.
14360584SericHASSTATFS	Define this if you have the statfs(2) system call.  It's
14460584Seric		not a disaster to get this wrong -- but you do lose the
14560584Seric		queue free space code.
14660584SericHASUSTAT	Define this if you have the ustat(2) system call.  It's
14760584Seric		not a disaster to get this wrong -- but you do lose the
14860584Seric		queue free space code.
14960565SericHASSETSID	Define this if you have the setsid(2) system call.  This
15060565Seric		is implied if your system appears to be POSIX compliant.
15160565SericHASINITGROUPS	Define this if you have the initgroups(3) routine.
15263753SericHASSETVBUF	Define this if you have the setvbuf(3) library call.
15363753Seric		If you don't, setlinebuf will be used instead.  This
15463753Seric		defaults on if your compiler defines __STDC__.
15563902SericHASSETREUID	Define this if you have setreuid(2) ***AND*** root can
15663902Seric		use setreuid to change to an arbitrary user.  This second
15763902Seric		condition is not satisfied on AIX 3.x.  You may find that
15863902Seric		your system has setresuid(2), (for example, on HP-UX) in
15963902Seric		which case you will also have to #define setreuid(r, e)
16063902Seric		to be the appropriate call.  Some systems (such as Solaris)
16165000Seric		have a compatibility routine that doesn't work properly,
16265000Seric		but may have "saved user ids" properly implemented so you
16365000Seric		can ``#define setreuid(r, e) seteuid(e)'' and have it work.
16463902Seric		The important thing is that you have a call that will set
16565000Seric		the effective uid independently of the real or saved uid
16665000Seric		and be able to set the effective uid back again when done.
16765000Seric		There's a test program in ../test/t_setreuid.c that will
16865000Seric		try things on your system.  Setting this improves the
16965000Seric		security, since sendmail doesn't have to read .forward
17065000Seric		and :include: files as root.  There are certain attacks
17165000Seric		that may be unpreventable without this call.
17265000SericHASLSTAT	Define this if you have symbolic links (and thus the
17365000Seric		lstat(2) system call).  This improves security.  Unlike
17465000Seric		most other options, this one is on by default, so you
17565000Seric		need to #undef it in conf.h if you don't have symbolic
17665000Seric		links (these days everyone does).
17765206SericNEEDGETOPT	Define this if you need a reimplementation of getopt(3).
17865206Seric		On some systems, getopt does very odd things if called
17965206Seric		to scan the arguments twice.  This flag will ask sendmail
18065206Seric		to compile in a local version of getopt that works
18165206Seric		properly.
18265206SericNEEDSTRTOL	Define this if your standard C library does not define
18365206Seric		strtol(3).  This will compile in a local version.
18465206SericNEEDVPRINTF	Define this if your standard C library does not define
18565206Seric		vprintf(3).  Note that the resulting fake implementation
18665206Seric		is not very elegant and may not even work on some
18765206Seric		architectures.
188*65211SericHASGETUSERSHELL	Define this to 1 if you have getusershell(3) in your
189*65211Seric		standard C library.  If this is not defined, or is defined
190*65211Seric		to be 0, sendmail will scan the /etc/shells file (no
191*65211Seric		NIS-style support, defaults to /bin/sh and /bin/csh if
192*65211Seric		that file does not exist) to get a list of unrestricted
193*65211Seric		user shells.  This is used to determine whether users
194*65211Seric		are allowed to forward their mail to a program or a file.
19563937SericGIDSET_T	The type of entries in a gidset passed as the second
19663937Seric		argument to getgroups(2).  Historically this has been an
19763937Seric		int, so this is the default, but some systems (such as
19863937Seric		IRIX) pass it as a gid_t, which is an unsigned short.
19963937Seric		This will make a difference, so it is important to get
20063937Seric		this right!  However, it is only an issue if you have
20163937Seric		group sets.
20263968SericSLEEP_T		The type returned by the system sleep() function.
20363968Seric		Defaults to "unsigned int".  Don't worry about this
20463968Seric		if you don't have compilation problems.
20563974SericARBPTR_T	The type of an arbitrary pointer -- defaults to "void *".
20663974Seric		If you are an very old compiler you may need to define
20763974Seric		this to be "char *".
20860584SericLA_TYPE		The type of load average your kernel supports.  These
20960584Seric		can be LA_SUBR (4) if you have the getloadavg(3) routine,
21064376Seric		LA_MACH (5) to use MACH-style load averages (calls
21164376Seric		processor_set_info()), LA_FLOAT (3) if you read kmem and
21264376Seric		interpret the value as a floating point number, LA_INT (2)
21364376Seric		to interpret as a long integer, or LA_SHORT (6) to
21464376Seric		interpret as a short integer.  These last three have
21564376Seric		several other parameters that they try to divine: the
21664376Seric		name of your kernel, the name of the variable in the
21764376Seric		kernel to examine, the number of bits of precision in
21864376Seric		a fixed point load average, and so forth.  In desparation,
21964376Seric		use LA_ZERO (1) -- it always returns the load average as
22064376Seric		"zero" (and does so on all architectures).  The actual
22164376Seric		code is in conf.c -- it can be tweaked if you are brave.
22263962SericERRLIST_PREDEFINED
22363962Seric		If set, assumes that some header file defines sys_errlist.
22463962Seric		This may be needed if you get type conflicts on this
22563962Seric		variable -- otherwise don't worry about it.
22664562SericWAITUNION	The wait(2) routine takes a "union wait" argument instead
22764562Seric		of an integer argument.  This is for compatibility with
22864562Seric		old versions of BSD.
22965000SericSCANF		You can set this to extend the F command to accept a
23065000Seric		scanf string -- this gives you a primitive parser for
23165000Seric		class definitions -- BUT it can make you vulnerable to
23265000Seric		core dumps if the target file is poorly formed.
23365095SericSYSLOG_BUFSIZE	You can define this to be the size of the buffer that
23465095Seric		syslog accepts.  If it is not defined, it assumes a
23565095Seric		1024-byte buffer.  If the buffer is very small (under
23665095Seric		256 bytes) the log message format changes -- each
23765095Seric		e-mail message will log many more messages, since it
23865095Seric		will log each piece of information as a separate line
23965095Seric		in syslog.
24060565Seric
24164035Seric
24264035Seric+-----------------------+
24364035Seric| COMPILE-TIME FEATURES |
24464035Seric+-----------------------+
24564035Seric
24660584SericThere are a bunch of features that you can decide to compile in, such
24760584Sericas selecting various database packages and special protocol support.
24860584SericSeveral are assumed based on other compilation flags -- if you want to
24960584Seric"un-assume" something, you probably need to edit conf.h.  Compilation
25060584Sericflags that add support for special features include:
25160565Seric
25260565SericNDBM		Include support for "new" DBM library for aliases and maps.
25364250Seric		Normally defined in the Makefile.
25460565SericNEWDB		Include support for Berkeley "db" package (hash & btree)
25564250Seric		for aliases and maps.  Normally defined in the Makefile.
25660565SericNIS		Define this to get NIS (YP) support for aliases and maps.
25764250Seric		Normally defined in the Makefile.
25860565SericUSERDB		Include support for the User Information Database.  Implied
25964250Seric		by NEWDB in conf.h.
26065000SericIDENTPROTO	Define this as 1 to get IDENT (RFC 1413) protocol support.
26160565Seric		This is assumed unless you are running on Ultrix or
26260565Seric		HP-UX, both of which have a problem in the UDP
26365000Seric		implementation.  You can define it to be 0 to explicitly
26465000Seric		turn off IDENT protocol support.
26560565SericMIME		Include support for MIME-encapsulated error messages.
26660565SericLOG		Set this to get syslog(3) support.  Defined by default
26760584Seric		in conf.h.  You want this if at all possible.
26860565SericNETINET		Set this to get TCP/IP support.  Defined by default
26960584Seric		in conf.h.  You probably want this.
27060565SericNETISO		Define this to get ISO networking support.
27160565SericSMTP		Define this to get the SMTP code.  Implied by NETINET
27260565Seric		or NETISO.
27360565SericNAMED_BIND	Define this to get DNS (name daemon) support, including
27460565Seric		MX support.  The specs you must use this if you run
27560565Seric		SMTP.  Defined by default in conf.h.
27660565SericQUEUE		Define this to get queueing code.  Implied by NETINET
27760584Seric		or NETISO; required by SMTP.  This gives you other good
27860584Seric		stuff -- it should be on.
27960565SericDAEMON		Define this to get general network support.  Implied by
28060584Seric		NETINET or NETISO.  Defined by default in conf.h.  You
28160584Seric		almost certainly want it on.
28260565SericMATCHGECOS	Permit fuzzy matching of user names against the full
28360565Seric		name (GECOS) field in the /etc/passwd file.  This should
28460565Seric		probably be on, since you can disable it from the config
28560584Seric		file if you want to.  Defined by default in conf.h.
28660565SericSETPROCTITLE	Try to set the string printed by "ps" to something
28760584Seric		informative about what sendmail is doing.  Defined by
28860584Seric		default in conf.h.
28960565Seric
29064035Seric
29165000Seric+---------------------+
29265000Seric| DNS/RESOLVER ISSUES |
29365000Seric+---------------------+
29465000Seric
29565000SericMany systems have old versions of the resolver library.  At a minimum,
29665000Sericyou should be running BIND 4.8.3; older versions may compile, but they
29765000Serichave known bugs that should give you pause.
29865000Seric
29965000SericCommon problems in old versions include "undefined" errors for
30065000Sericdn_skipname.
30165000Seric
30265000SericSome people have had a problem with BIND 4.9; it uses some routines
30365000Sericthat it expects to be externally defined such as strerror().  It may
30465000Serichelp to link with "-l44bsd" to solve this problem.
30565000Seric
30665095Seric!PLEASE! be sure to link with the same version of the resolver as
30765095Sericthe header files you used -- some people have used the 4.9 headers
30865095Sericand linked with BIND 4.8 or vice versa, and it doesn't work.
30965095SericUnfortunately, it doesn't fail in an obvious way -- things just
31065095Sericsubtlely don't work.
31165000Seric
31265095Seric
31364035Seric+-------------------------------------+
31464035Seric| OPERATING SYSTEM AND COMPILE QUIRKS |
31564035Seric+-------------------------------------+
31664035Seric
31765095SericGCC 2.5.x problems  *** IMPORTANT ***
31865095Seric	Date: Mon, 29 Nov 93 19:08:44 PST
31965095Seric	From: wilson@cygnus.com (Jim Wilson)
32065095Seric	Message-Id: <9311300308.AA04608@cygnus.com>
32165095Seric	To: kenner@vlsi1.ultra.nyu.edu
32265095Seric	Subject: [cattelan@thebarn.com: gcc 2.5.4-2.5.5 -O bug]
32365095Seric	Cc: cattelan@thebarn.com, rms@gnu.ai.mit.edu, sendmail@cs.berkeley.edu
32465095Seric
32565095Seric	This fixes a problem that occurs when gcc 2.5.5 is used to compile
32665095Seric	sendmail 8.6.4 with optimization on a sparc.
32765095Seric
32865095Seric	Mon Nov 29 19:00:14 1993  Jim Wilson  (wilson@sphagnum.cygnus.com)
32965095Seric
33065095Seric		* reload.c (find_reloads_toplev): Replace obsolete reference to
33165095Seric		BYTE_LOADS_*_EXTEND with LOAD_EXTEND_OP.
33265095Seric
33365095Seric	*** clean-ss-931128/reload.c    Sun Nov 14 16:20:01 1993
33465095Seric	--- ss-931128/reload.c  Mon Nov 29 18:52:55 1993
33565095Seric	*************** find_reloads_toplev (x, opnum, type, ind
33665095Seric	*** 3888,3894 ****
33765095Seric		 force a reload in that case.  So we should not do anything here.  */
33865095Seric
33965095Seric		else if (regno >= FIRST_PSEUDO_REGISTER
34065095Seric	! #if defined(BYTE_LOADS_ZERO_EXTEND) || defined(BYTE_LOADS_SIGN_EXTEND)
34165095Seric		       && (GET_MODE_SIZE (GET_MODE (x))
34265095Seric			   <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
34365095Seric	  #endif
34465095Seric	--- 3888,3894 ----
34565095Seric		 force a reload in that case.  So we should not do anything here.  */
34665095Seric
34765095Seric		else if (regno >= FIRST_PSEUDO_REGISTER
34865095Seric	! #ifdef LOAD_EXTEND_OP
34965095Seric		       && (GET_MODE_SIZE (GET_MODE (x))
35065095Seric			   <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
35165095Seric	  #endif
35265095Seric
35365095Seric
35464376SericSunOS 4.x (Solaris 1.x)
35564376Seric	You may have to use -lresolv on SunOS.  However, beware that
35664376Seric	this links in a new version of gethostbyname that does not
35764376Seric	understand NIS, so you must have all of your hosts in DNS.
35864035Seric
35964798Seric	Some people have reported problems with the SunOS version of
36064798Seric	-lresolv and/or in.named, and suggest that you get a newer
36164798Seric	version.  The symptoms are delays when you connect to the
36265000Seric	SMTP server on a SunOS machine or having your domain added to
36365000Seric	addresses inappropriately.  There is a version of BIND
36464798Seric	version 4.9 on gatekeeper.DEC.COM in pub/BSD/bind/4.9.
36564798Seric
36664400Seric	There is substantial disagreement about whether you can make
36764400Seric	this work with resolv+, which allows you to specify a search-path
36864400Seric	of services.  Some people report that it works fine, others
36964400Seric	claim it doesn't work at all (including causing sendmail to
37064400Seric	drop core when it tries to do multiple resolv+ lookups for a
37164400Seric	single job).  I haven't tried resolv+, as we use DNS exclusively.
37264400Seric
37364400Seric	Should you want to try resolv+, it is on ftp.uu.net in
37464400Seric	/networking/ip/dns.
37564400Seric
37664376SericSolaris 2.x (SunOS 5.x)
37764376Seric	To compile for Solaris, be sure you use -DSOLARIS.
37864376Seric
37964364Seric	From a correspondent:
38064364Seric
38164364Seric	   For solaris 2.2, I have
38264364Seric
38364364Seric		hosts:      files dns
38464364Seric
38564364Seric	   in /etc/nsswitch.conf and /etc/hosts has to have the fully
38664364Seric	   qualified host name. I think "files" has to be before "dns"
38764364Seric	   in /etc/nsswitch.conf during bootup.
38864364Seric
38964376Seric	To the best of my knowledge, Solaris does not have the
39064376Seric	gethostbyname problem described above.
39164376Seric
39264385Seric	The Solaris "syslog" function is apparently limited to something
39364385Seric	about 90 characters because of a kernel limitation.  If you have
39465000Seric	source code, you can probably up this number.  The syslogd patch
39565000Seric	is included in kernel jumbo patch for Solaris 2.2 as of revision
39665000Seric	-39 or so.  At least one person is running with patch 100999-45
39765166Seric	and their long lost sendmail logging is finally showing up.  At
39865166Seric	least one other person is running with patch 101318 installed
39965166Seric	under Solaris 2.3 with success.
40064385Seric
40164250SericOSF/1
40265000Seric	If you are compiling on OSF/1 (DEC Alpha), you must use
40365000Seric	-non_shared (otherwise it core dumps on startup).  You may also
40465000Seric	need -mld to get the nlist() function, although some versions
40565000Seric	apparently don't need this.
40665000Seric
40765000Seric	Also, the enclosed makefile removed /usr/sbin/smtpd; if you need
40865000Seric	it, just create the link to the sendmail binary.
40957977Seric
41064250SericNeXT
41164250Seric	If you are compiling on NeXT, you will have to create an empty
41264250Seric	file "unistd.h" and create a file "dirent.h" containing:
41363753Seric
41464250Seric		#include <sys/dir.h>
41564250Seric		#define dirent	direct
41664035Seric
41764250Seric	(The Makefile.NeXT should try to do both of these for you.)
41864077Seric
41964364Seric	Apparently, there is a bug in getservbyname on Nextstep 3.0
42064364Seric	that causes it to fail under some circumstances with the
42164364Seric	message "SYSERR: service "smtp" unknown" logged.  You should
42264364Seric	be able to work around this by including the line:
42364364Seric
42464670Seric		OOPort=25
42564364Seric
42664364Seric	in your .cf file.
42764364Seric
42864376Seric	You may have to use -DNeXT.
42964376Seric
43065000SericBSDI (BSD/386) 1.0, NetBSD 0.9, FreeBSD 1.0
43165000Seric	The "m4" from BSDI won't handle the config files properly.
43265000Seric	I haven't had a chance to test this myself.
43357943Seric
43465000Seric	The M4 shipped in FreeBSD and NetBSD 0.9 don't handle the config
43565000Seric	files properly. One must use either GNU m4 1.1 or the PD-M4
43665000Seric	recently posted in comp.os.386bsd.bugs (and maybe others).
43765000Seric	NetBSD-current includes the PD-M4 (as stated in the NetBSD file
43865000Seric	CHANGES).
43965000Seric
44065000Seric	FreeBSD 1.0 RELEASE has uname(2) now. Use -DUSEUNAME in order to
44165000Seric	use it (look into Makefile.FreeBSD). NetBSD-current may have
44265000Seric	it too but it has not been verified.
44365000Seric
44465000Seric	You cannot port the latest version of the Berkeley db library
44565000Seric	and use it with sendmail without recompiling the world.  This
44665000Seric	is because C library routines use the older version which have
44765000Seric	incompatible header files -- the result is that it can't read
44865000Seric	other system files, such as /etc/passwd, unless you use the
44965000Seric	new db format throughout your system.  You should normally just
45065000Seric	use the version of db supplied in your release.  You may need
45165000Seric	to use -DOLD_NEWDB to make this work -- this turns off some
45265000Seric	new interface calls (for file locking) that are not in older
45365000Seric	versions of db.  You'll get compile errors if you need this
45465000Seric	flag and don't have it set.
45565000Seric
45664364Seric4.3BSD
45764364Seric	If you are running a "virgin" version of 4.3BSD, you'll have
45864364Seric	a very old resolver and be missing some header files.  The
45964364Seric	header files are simple -- create empty versions and everything
46064364Seric	will work fine.  For the resolver you should really port a new
46164364Seric	version (4.8.3 or later) of the resolver; 4.9 is available on
46264364Seric	gatekeeper.DEC.COM in pub/BSD/bind/4.9.  If you are really
46364364Seric	determined to continue to use your old, buggy version (or as
46464364Seric	a shortcut to get sendmail working -- I'm sure you have the
46564364Seric	best intentions to port a modern version of BIND), you can
46664364Seric	copy ../contrib/oldbind.compat.c into src and add
46764364Seric	oldbind.compat.o to OBJADD in the Makefile.
46864364Seric
46964718SericA/UX
47064718Seric	Date: Tue, 12 Oct 1993 18:28:28 -0400 (EDT)
47164718Seric	From: "Eric C. Hagberg" <hagberg@med.cornell.edu>
47264718Seric	Subject: Fix for A/UX ndbm
47364718Seric
47464718Seric	I guess this isn't really a sendmail bug, however, it is something
47564718Seric	that A/UX users should be aware of when compiling sendmail 8.6.
47664718Seric
47764718Seric	Apparently, the calls that sendmail is using to the ndbm routines
47864718Seric	in A/UX 3.0.x contain calls to "broken" routines, in that the
47964718Seric	aliases database will break when it gets "just a little big"
48064718Seric	(sorry I don't have exact numbers here, but it broke somewhere
48164718Seric	around 20-25 aliases for me.), making all aliases non-functional
48264718Seric	after exceeding this point.
48364718Seric
48464718Seric	What I did was to get the gnu-dbm-1.6 package, compile it, and
48564718Seric	then re-compile sendmail with "-lgdbm", "-DNDBM", and using the
48664718Seric	ndbm.h header file that comes with the gnu-package. This makes
48764718Seric	things behave properly.
48864718Seric
48964718Seric	I suppose porting the New Berkeley db package is another route,
49064718Seric	however, I made a quick attempt at it, and found it difficult
49164718Seric	(not easy at least); the gnu-dbm package "configured" and
49264718Seric	compiled easily.
49364718Seric
49464718SericDG/UX
49564718Seric	Apparently, /bin/mail doesn't work properly for delivery on
49664718Seric	DG/UX -- the person who has this working, Douglas Anderson
49764718Seric	<dlander@afterlife.ncsc.mil>, used procmail instead.
49864718Seric
49965195SericSystem V Release 4 Based Systems
50065195Seric	There is a single Makefile that is intended for all SVR4-based
50165195Seric	systems (called Makefile.SVR4).  It defines __svr4__, which is
50265195Seric	predefined by some compilers.  If your compiler already defines
50365195Seric	this compile variable, you can delete the definition from the
50465195Seric	Makefile.
50565195Seric
50665195Seric	It's been tested on Dell Issue 2.2.
50765195Seric
50865095SericDELL SVR4
50965095Seric	Date:      Mon, 06 Dec 1993 10:42:29 EST
51065095Seric	From: "Kimmo Suominen" <kim@grendel.lut.fi>
51165095Seric	Message-ID: <2d0352f9.lento29@lento29.UUCP>
51265095Seric	To: eric@cs.berkeley.edu
51365166Seric	Cc: sendmail@cs.berkeley.edu
51465095Seric	Subject:   Notes for DELL SVR4
51565095Seric
51665095Seric	Eric,
51765095Seric
51865095Seric	Here are some notes for compiling Sendmail 8.6.4 on DELL SVR4.  I ran
51965095Seric	across these things when helping out some people who contacted me by
52065095Seric	e-mail.
52165095Seric
52265095Seric	1) Use gcc 2.4.5 (or later?).  Dell distributes gcc 2.1 with their
52365095Seric	   Issue 2.2 Unix.  It is too old, and gives you problems with
52465095Seric	   clock.c, because sigset_t won't get defined in <sys/signal.h>.
52565095Seric	   This is due to a problematic protection rule in there, and is
52665095Seric	   fixed with gcc 2.4.5.
52765095Seric
52865095Seric	2) If you don't use the new Berkeley DB (-DNEWDB), then you need
52965095Seric	   to add "-lc -lucb" to the libraries to link with.  This is because
53065095Seric	   the -ldbm distributed by Dell needs the bcopy, bcmp and bzero
53165095Seric	   functions.  It is important that you specify both libraries in
53265095Seric	   the given order to be sure you only get the BSTRING functions
53365095Seric	   from the UCB library (and not the signal routines etc.).
53465095Seric
53565095Seric	3) Don't leave out "-lelf" even if compiling with "-lc -lucb".
53665095Seric	   The UCB library also has another copy of the nlist routines,
53765095Seric	   but we do want the ones from "-lelf".
53865095Seric
53965095Seric	If anyone needs a compiled gcc 2.4.5 and/or a ported DB library, they
54065095Seric	can use anonymous ftp to fetch them from lut.fi in the /kim directory.
54165095Seric	They are copies of what I use on grendel.lut.fi, and offering them
54265095Seric	does not imply that I would also support them.  I have sent the DB
54365095Seric	port for SVR4 back to Keith Bostic for inclusion in the official
54465095Seric	distribution, but I haven't heard anything from him as of today.
54565095Seric
54665095Seric	- gcc-2.4.5-svr4.tar.gz	(gcc 2.4.5 and the corresponding libg++)
54765095Seric	- db-1.72.tar.gz	(with source, objects and a installed copy)
54865095Seric
54965095Seric	Cheers
55065095Seric	+ Kim
55165095Seric	--
55265095Seric	 *  Kimmo.Suominen@lut.fi  *  SysVr4 enthusiast at GRENDEL.LUT.FI  *
55365095Seric	*    KIM@FINFILES.BITNET   *  Postmaster and Hostmaster at LUT.FI   *
55465095Seric	 *    + 358 200 865 718    *  Unix area moderator at NIC.FUNET.FI  *
55565095Seric
55665095Seric
55764718SericNon-DNS based sites
55864718Seric	This version of sendmail always tries to connect to the Domain
55964718Seric	Name System (DNS) to resolve names, regardless of the setting
56064718Seric	of the `I' option.  On most systems that are not running DNS,
56164718Seric	this will fail quickly and sendmail will continue, but on some
56264718Seric	systems it has a long timeout.  If you have this problem, you
56364718Seric	will have to recompile without NAMED_BIND.  Some people have
56464718Seric	claimed that they have successfully used "OI+USEVC" to force
56564718Seric	sendmail to use a virtual circuit -- this will always time out
56664718Seric	quickly, but also tells sendmail that a failed connection
56764718Seric	should requeue the message (probably not what you intended).
56864718Seric	A future release of sendmail will correct this problem.
56964718Seric
57064250SericBoth NEWDB and NDBM
57164250Seric	If you use both -DNDBM and -DNEWDB, you must delete the module
57264250Seric	ndbm.o from libdb.a and delete the file "ndbm.h" from the files
57364250Seric	that get installed (that is, use the OLD ndbm.h, not the new
57464250Seric	ndbm.h).  This compatibility module maps ndbm calls into DB
57564250Seric	calls, and breaks things rather badly.
57658709Seric
57764559SericGNU getopt
57864559Seric	I'm told that GNU getopt has a problem in that it gets confused
57964559Seric	by the double call.  Use the version in conf.c instead.
58064250Seric
58164559Seric
58264820Seric+--------------+
58364820Seric| MANUAL PAGES |
58464820Seric+--------------+
58564820Seric
58664820SericThe manual pages have been written against the -mandoc macros
58764820Sericinstead of the -man macros.  The latest version of groff has them
58864820Sericincluded.  You can also get a copy from FTP.UU.NET in directory
58964820Seric/systems/unix/bsd-sources/share/tmac.
59064820Seric
59164820Seric
59265151Seric+-----------------+
59365151Seric| DEBUGGING HOOKS |
59465151Seric+-----------------+
59565151Seric
59665151SericAs of 8.6.5, sendmail daemons will catch a SIGUSR1 signal and log
59765151Sericsome debugging output (logged at LOG_DEBUG severity).  The
59865151Sericinformation dumped is:
59965151Seric
60065151Seric * The value of the $j macro.
60165151Seric * A warning if $j is not in the set $=w.
60265151Seric * A list of the open file descriptors.
60365151Seric * The contents of the connection cache.
60465151Seric * If ruleset 89 is defined, it is evaluated and the results printed.
60565151Seric
60665151SericThis allows you to get information regarding the runtime state of the
60765151Sericdaemon on the fly.  This should not be done too frequently, since
60865151Sericthe process of rewriting may lose memory which will not be recovered.
60965151SericAlso, ruleset 89 may call non-reentrant routines, so there is a small
61065151Sericnon-zero probability that this will cause other problems.  It is
61165151Sericreally only for debugging serious problems.
61265151Seric
61365151SericA typical formulation of ruleset 89 would be:
61465151Seric
61565151Seric	R$*		$@ $>0 some test address
61665151Seric
61765151Seric
61864035Seric+-----------------------------+
61964035Seric| DESCRIPTION OF SOURCE FILES |
62064035Seric+-----------------------------+
62164035Seric
6229881SericThe following list describes the files in this directory:
6235369Seric
62457418SericMakefile	The makefile used here; this version only works with
62557418Seric		the new Berkeley make.
62657418SericMakefile.dist	A trimmed down version of the makefile that works with
62757418Seric		the old make.
6285369SericREAD_ME		This file.
62960565SericTRACEFLAGS	My own personal list of the trace flags -- not guaranteed
63060565Seric		to be particularly up to date.
6315369Sericalias.c		Does name aliasing in all forms.
6329881Sericarpadate.c	A subroutine which creates ARPANET standard dates.
6339881Sericclock.c		Routines to implement real-time oriented functions
6349881Seric		in sendmail -- e.g., timeouts.
6355369Sericcollect.c	The routine that actually reads the mail into a temp
6365369Seric		file.  It also does a certain amount of parsing of
6375369Seric		the header, etc.
6385369Sericconf.c		The configuration file.  This contains information
6395369Seric		that is presumed to be quite static and non-
6405369Seric		controversial, or code compiled in for efficiency
6415369Seric		reasons.  Most of the configuration is in sendmail.cf.
6429881Sericconf.h		Configuration that must be known everywhere.
6435369Sericconvtime.c	A routine to sanely process times.
6449881Sericdaemon.c	Routines to implement daemon mode.  This version is
6459881Seric		specifically for Berkeley 4.1 IPC.
6465369Sericdeliver.c	Routines to deliver mail.
64760565Sericdomain.c	Routines that interface with DNS (the Domain Name
64860565Seric		System).
6495369Sericerr.c		Routines to print error messages.
6509881Sericenvelope.c	Routines to manipulate the envelope structure.
6515369Sericheaders.c	Routines to process message headers.
6525369Sericmacro.c		The macro expander.  This is used internally to
6535369Seric		insert information from the configuration file.
6545369Sericmain.c		The main routine to sendmail.  This file also
6555369Seric		contains some miscellaneous routines.
65660565Sericmap.c		Support for database maps.
65760565Sericmci.c		Routines that handle mail connection information caching.
6589881Sericparseaddr.c	The routines which do address parsing.
6595369Sericqueue.c		Routines to implement message queueing.
6605369Sericreadcf.c	The routine that reads the configuration file and
6615369Seric		translates it to internal form.
6629881Sericrecipient.c	Routines that manipulate the recipient list.
6635369Sericsavemail.c	Routines which save the letter on processing errors.
6645369Sericsendmail.h	Main header file for sendmail.
6655369Sericsrvrsmtp.c	Routines to implement server SMTP.
6665369Sericstab.c		Routines to manage the symbol table.
6675369Sericstats.c		Routines to collect and post the statistics.
6685369Sericsysexits.c	List of error messages associated with error codes
6695369Seric		in sysexits.h.
6709881Serictrace.c		The trace package.  These routines allow setting and
6719881Seric		testing of trace flags with a high granularity.
67260565Sericudb.c		The user database interface module.
6735369Sericusersmtp.c	Routines to implement user SMTP.
6745369Sericutil.c		Some general purpose routines used by sendmail.
67560565Sericversion.c	The version number and information about this
67660565Seric		version of sendmail.  Theoretically, this gets
67760565Seric		modified on every change.
6785369Seric
6795369SericEric Allman
6805369Seric
681*65211Seric(Version 8.43, last update 12/26/93 06:07:47)
682