xref: /csrg-svn/usr.sbin/sendmail/src/READ_ME (revision 67436)
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*67436Seric#	@(#)READ_ME	8.68 (Berkeley) 06/19/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
1665366SericThe Makefile is for the new (4.4BSD) Berkeley make and uses syntax
1765366Sericthat is not recognized by older makes.  It also has assumptions
1865366Sericabout the 4.4 file system layout built in.  See below for details
1965366Sericabout 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
2665366Seric**************************************************
2765366Seric**  Read below for more details of Makefiles.	**
2865366Seric**************************************************
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
5065366Seric+-----------+
5165366Seric| MAKEFILES |
5265366Seric+-----------+
5365366Seric
5465366SericThe "Makefile"s in these directories are from 4.4 BSD, and hence
5565366Sericreally only work properly if you are on a 4.4 system.  In particular,
5665366Sericthey use new syntax that will not be recognized on old make programs,
5765366Sericand some of them do things like ``.include ../../Makefile.inc'' to
5865366Sericpick up some system defines.  If you are getting sendmail separately,
5965366Sericthese files won't be included in the distribution, as they are
6065366Sericoutside of the sendmail tree.
6165366Seric
6265366SericInstead, you should use one of the other Makefiles, such as
6365366SericMakefile.SunOS for a SunOS system, and so forth.  These should
6465366Sericwork with the version of make that is appropriate for that
6565366Sericsystem.
6665366Seric
6765366SericThere are a bunch of other Makefiles for other systems with names
6865366Sericlike Makefile.HPUX for an HP-UX system.  They use the version of
6965366Sericmake that is native for that system.  These are the Makefiles that
7065366SericI use, and they have "Berkeley quirks" in them.  I can't guarantee
7165366Sericthat they will work unmodified in your environment.  Many of them
7265366Sericinclude -I/usr/sww/include/db and -L/usr/sww/lib -- this is Berkeley's
7365366Sericlocation (the ``Software Warehouse'') for the new database libraries,
7465366Sericdescribed below.  You don't have to remove these definitions if you
7565366Sericdon't have these directories.
7665366Seric
7765366SericPlease look for an appropriate Makefile before you start trying to
7865366Sericcompile with Makefile or Makefile.dist.
7965366Seric
8065366SericIf you want to port the new Berkeley make, you can get it from
8165366Sericftp.uu.net in the directory /systems/unix/bsd-sources/usr.bin/make.
8265366SericDiffs and instructions for building this version of make under
8365366SericSunOS 4.1.x are available on ftp.css.itd.umich.edu in
8465366Seric/pub/systems/sun/Net2-make.sun4.diff.Z.  Diffs and instructions
8565366Sericfor building this version of make under IBM AIX 3.2.4 are available
8665366Sericon ftp.uni-stuttgart.de in /sw/src/patches/bsd-make-rus-patches.
8765366SericPaul Southworth <pauls@umich.edu> published a description of porting
8865366Sericthis make in comp.unix.bsd.
8965366Seric
9065366SericThe complete text of the Makefile.inc that is in the parent of the
9165366Sericsendmail directory is:
9265366Seric
9365366Seric	#	@(#)Makefile.inc	8.1 (Berkeley) 6/6/93
9465366Seric
9565366Seric	BINDIR?=	/usr/sbin
9665366Seric
9765366Seric
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
11366843Sericon your system.  You may need to #define OLD_NEWDB 1 to do this.]
11464250Seric
11565910Seric[NOTE WELL: it is CRITICAL that you remove ndbm.o from libdb.a and
11665910Sericndbm.h from the appropriate include directories if you want to get
11765910Sericndbm support.  These files OVERRIDE calls to ndbm routines -- in
11865910Sericparticular, if you leave ndbm.h in, you can find yourself using
11965910Sericthe new db package even if you don't define NEWDB.]
12065910Seric
12164250SericIf NEWDB and NDBM are defined (but not NIS), then sendmail will read
12264250SericNDBM format alias files, but the next time a newaliases is run the
12364250Sericformat will be converted to NEWDB; that format will be used forever
12464250Sericmore.  This is intended as a transition feature.  [Note however that
12564250Sericthe NEWDB library also catches and maps NDBM calls; you will have to
12664250Sericback out this feature to get this to work.  See ``Quirks'' section
12764250Sericbelow for details.]
12864250Seric
12964250SericIf all three are defined, sendmail operates as described above, and also
13064250Sericlooks for the file /var/yp/Makefile.  If it exists, newaliases will
13164250Sericbuild BOTH the NEWDB and NDBM format alias files.  However, it will
13264250Sericonly use the NEWDB file; the NDBM format file is used only by the
13364250SericNIS subsystem.
13464250Seric
13564250SericIf NDBM and NIS are defined (regardless of the definition of NEWDB
13664250Sericor the existance of /var/yp/Makefile), sendmail adds the special
13764250Serictokens "YP_LAST_MODIFIED" and "YP_MASTER_NAME", both of which are
13864250Sericrequired if the NDBM file is to be used as an NIS map.
13964250Seric
14064250SericAll of -DNEWDB, -DNDBM, and -DNIS are normally defined in the DBMDEF
14164250Sericline in the Makefile.
14264250Seric
14364250Seric
14464035Seric+---------------+
14564035Seric| COMPILE FLAGS |
14664035Seric+---------------+
14764035Seric
14860565SericWhereever possible, I try to make sendmail pull in the correct
14960584Sericcompilation options needed to compile on various environments based on
15060584Sericautomatically defined symbols.  Some machines don't seem to have useful
15160584Sericsymbols availble, requiring the following compilation flags in the
15260584SericMakefile:
15360565Seric
15460565SericSOLARIS		Define this if you are running Solaris 2.0 or higher.
15565000SericSOLARIS_2_3	Define this if you are running Solaris 2.3 or higher.
15665108SericSUNOS403	Define this if you are running SunOS 4.0.3.
15764077SericNeXT		Define this if you are on a NeXT box.  (This one may
15864072Seric		be pre-defined for you.)  There are other hacks you
15964072Seric		have to make -- see below.
16060565Seric_AIX3		Define this if you are IBM AIX 3.x.
16163965SericRISCOS		Define this if you are running RISC/os from MIPS.
16266335SericIRIX		Define this if you are running IRIX from SGI.
16364501Seric_SCO_unix_	Define this if you are on SCO UNIX.
16465095Seric_SCO_unix_4_2	Define this if you are on SCO Open Server 3.2v4.
16567427SericDGUX		Define this if you are on DG/UX 5.4.3 or later
16667427SericDGUX_5_4_2	Define this if you are on DG/UX systems prior to 5.4.3.
16767434SericNonStop_UX_BXX	Define this if you are on a Tandem NonStop-UX release
16867434Seric		Bxx system.
16960565Seric
17060584SericIf you are a system that sendmail has already been ported to, you
17160584Sericprobably won't have to touch these.  But if you are porting, you may
17263962Serichave to tweak the following compilation flags in conf.h in order to
17363962Sericget it to compile and link properly:
17460565Seric
17565195SericSYSTEM5		Adjust for System V (not necessarily Release 4).
17664035SericSYS5SIGNALS	Use System V signal semantics -- the signal handler
17764035Seric		is automatically dropped when the signal is caught.
17864035Seric		If this is not set, use POSIX/BSD semantics, where the
17964035Seric		signal handler stays in force until an exec or an
18064035Seric		explicit delete.  Implied by SYSTEM5.
18164706SericSYS5SETPGRP	Use System V setpgrp() semantics.  Implied by SYSTEM5.
18264035SericHASFLOCK	Set this if you prefer to use the flock(2) system call
18364035Seric		rather than using fcntl-based locking.  Fcntl locking
18464035Seric		has some semantic gotchas, but many vendor systems
18564035Seric		also interface it to lockd(8) to do NFS-style locking.
18664035Seric		For this reason, this should not be set unless you
18764035Seric		don't have an alternative.
18860565SericHASUNAME	Set if you have the "uname" system call.  Implied by
18960565Seric		SYSTEM5.
19063962SericHASUNSETENV	Define this if your system library has the "unsetenv"
19163962Seric		subroutine.
19260565SericHASSETSID	Define this if you have the setsid(2) system call.  This
19360565Seric		is implied if your system appears to be POSIX compliant.
19460565SericHASINITGROUPS	Define this if you have the initgroups(3) routine.
19563753SericHASSETVBUF	Define this if you have the setvbuf(3) library call.
19663753Seric		If you don't, setlinebuf will be used instead.  This
19763753Seric		defaults on if your compiler defines __STDC__.
19863902SericHASSETREUID	Define this if you have setreuid(2) ***AND*** root can
19963902Seric		use setreuid to change to an arbitrary user.  This second
20063902Seric		condition is not satisfied on AIX 3.x.  You may find that
20163902Seric		your system has setresuid(2), (for example, on HP-UX) in
20263902Seric		which case you will also have to #define setreuid(r, e)
20363902Seric		to be the appropriate call.  Some systems (such as Solaris)
20465000Seric		have a compatibility routine that doesn't work properly,
20565000Seric		but may have "saved user ids" properly implemented so you
20665000Seric		can ``#define setreuid(r, e) seteuid(e)'' and have it work.
20763902Seric		The important thing is that you have a call that will set
20865000Seric		the effective uid independently of the real or saved uid
20965000Seric		and be able to set the effective uid back again when done.
21065000Seric		There's a test program in ../test/t_setreuid.c that will
21165000Seric		try things on your system.  Setting this improves the
21265000Seric		security, since sendmail doesn't have to read .forward
21365000Seric		and :include: files as root.  There are certain attacks
21465000Seric		that may be unpreventable without this call.
21565000SericHASLSTAT	Define this if you have symbolic links (and thus the
21665000Seric		lstat(2) system call).  This improves security.  Unlike
21765000Seric		most other options, this one is on by default, so you
21865000Seric		need to #undef it in conf.h if you don't have symbolic
21965000Seric		links (these days everyone does).
22067430SericHASSETRLIMIT	Define this to 1 if you have the setrlimit(2) syscall.
22167430Seric		You can define it to 0 to force it off.  It is assumed
22267430Seric		if you are running a BSD-like system.
22367430SericHASULIMIT	Define this if you have the ulimit(2) syscall (System V
22467430Seric		style systems).  HASSETRLIMIT overrides, as it is more
22567430Seric		general.
22665206SericNEEDGETOPT	Define this if you need a reimplementation of getopt(3).
22765206Seric		On some systems, getopt does very odd things if called
22865206Seric		to scan the arguments twice.  This flag will ask sendmail
22965206Seric		to compile in a local version of getopt that works
23065206Seric		properly.
23165206SericNEEDSTRTOL	Define this if your standard C library does not define
23265206Seric		strtol(3).  This will compile in a local version.
23365206SericNEEDVPRINTF	Define this if your standard C library does not define
23465206Seric		vprintf(3).  Note that the resulting fake implementation
23565206Seric		is not very elegant and may not even work on some
23665206Seric		architectures.
23766792SericNEEDFSYNC	Define this if your standard C library does not define
23866792Seric		fsync(2).  This will try to simulate the operation using
23966792Seric		fcntl(2); if that is not available it does nothing, which
24066792Seric		isn't great, but at least it compiles and runs.
24165211SericHASGETUSERSHELL	Define this to 1 if you have getusershell(3) in your
24265211Seric		standard C library.  If this is not defined, or is defined
24365211Seric		to be 0, sendmail will scan the /etc/shells file (no
24465211Seric		NIS-style support, defaults to /bin/sh and /bin/csh if
24565211Seric		that file does not exist) to get a list of unrestricted
24665211Seric		user shells.  This is used to determine whether users
24765211Seric		are allowed to forward their mail to a program or a file.
24863937SericGIDSET_T	The type of entries in a gidset passed as the second
24963937Seric		argument to getgroups(2).  Historically this has been an
25063937Seric		int, so this is the default, but some systems (such as
25163937Seric		IRIX) pass it as a gid_t, which is an unsigned short.
25263937Seric		This will make a difference, so it is important to get
25363937Seric		this right!  However, it is only an issue if you have
25463937Seric		group sets.
25563968SericSLEEP_T		The type returned by the system sleep() function.
25663968Seric		Defaults to "unsigned int".  Don't worry about this
25763968Seric		if you don't have compilation problems.
25863974SericARBPTR_T	The type of an arbitrary pointer -- defaults to "void *".
25963974Seric		If you are an very old compiler you may need to define
26063974Seric		this to be "char *".
26160584SericLA_TYPE		The type of load average your kernel supports.  These
26266301Seric		can be one of:
26366301Seric		LA_ZERO (1) -- it always returns the load average as
26466301Seric			"zero" (and does so on all architectures).
26566301Seric		LA_SUBR (4) if you have the getloadavg(3) routine,
26664376Seric		LA_MACH (5) to use MACH-style load averages (calls
26766301Seric			processor_set_info()),
26866301Seric		LA_PROCSTR (7) to read /proc/loadavg and interpret it
26966301Seric			as a string representing a floating-point
27066301Seric			number (Linux-style),
27166301Seric		LA_FLOAT (3) if you read kmem and interpret the value
27266301Seric			as a floating point number,
27366301Seric		LA_INT (2) to interpret as a long integer,
27466301Seric		LA_SHORT (6) to interpret as a short integer.
27566301Seric		These last three have several other parameters that they
27666301Seric		try to divine: the name of your kernel, the name of the
27766301Seric		variable in the kernel to examine, the number of bits of
27866301Seric		precision in a fixed point load average, and so forth.
27966301Seric		In desperation, use LA_ZERO.  The actual code is in
28066301Seric		conf.c -- it can be tweaked if you are brave.
28165752SericSFS_TYPE	Encodes how your kernel can locate the amount of free
28265752Seric		space on a disk partition.  This can be set to SFS_NONE
28365752Seric		(0) if you have no way of getting this information,
28465752Seric		SFS_USTAT (1) if you have the ustat(2) system call,
28565752Seric		SFS_4ARGS (2) if you have a four-argument statfs(2)
28665752Seric		system call (and the include file is <sys/statfs.h>),
28767161Seric		SFS_VFS (3), SFS_MOUNT (4), SFS_STATFS (5) if you have
28867161Seric		the two-argument statfs(2) system call with includes in
28967161Seric		<sys/vfs.h>, <sys/mount.h>, or <sys/statfs.h> respectively,
29067161Seric		or SFS_STATVFS (6) if you have the two-argument statvfs(2)
29167161Seric		call.  The default if nothing is defined is SFS_NONE.
29263962SericERRLIST_PREDEFINED
29363962Seric		If set, assumes that some header file defines sys_errlist.
29463962Seric		This may be needed if you get type conflicts on this
29563962Seric		variable -- otherwise don't worry about it.
29664562SericWAITUNION	The wait(2) routine takes a "union wait" argument instead
29764562Seric		of an integer argument.  This is for compatibility with
29864562Seric		old versions of BSD.
29965000SericSCANF		You can set this to extend the F command to accept a
30065000Seric		scanf string -- this gives you a primitive parser for
30165000Seric		class definitions -- BUT it can make you vulnerable to
30265000Seric		core dumps if the target file is poorly formed.
30365095SericSYSLOG_BUFSIZE	You can define this to be the size of the buffer that
30465095Seric		syslog accepts.  If it is not defined, it assumes a
30565095Seric		1024-byte buffer.  If the buffer is very small (under
30665095Seric		256 bytes) the log message format changes -- each
30765095Seric		e-mail message will log many more messages, since it
30865095Seric		will log each piece of information as a separate line
30965095Seric		in syslog.
31066318SericBROKEN_RES_SEARCH
31166318Seric		On Ultrix (and maybe other systems?) if you use the
31266318Seric		res_search routine with an unknown host name, it returns
31366318Seric		-1 but sets h_errno to 0 instead of HOST_NOT_FOUND.  If
31466318Seric		you set this, sendmail considers 0 to be the same as
31566318Seric		HOST_NOT_FOUND.
316*67436SericNAMELISTMASK	If defined, values returned by nlist(3) are masked
317*67436Seric		against this value before use -- a common value is
318*67436Seric		0x7fffffff to strip off the top bit.
31960565Seric
32064035Seric
321*67436Seric
32264035Seric+-----------------------+
32364035Seric| COMPILE-TIME FEATURES |
32464035Seric+-----------------------+
32564035Seric
32660584SericThere are a bunch of features that you can decide to compile in, such
32760584Sericas selecting various database packages and special protocol support.
32860584SericSeveral are assumed based on other compilation flags -- if you want to
32960584Seric"un-assume" something, you probably need to edit conf.h.  Compilation
33060584Sericflags that add support for special features include:
33160565Seric
33260565SericNDBM		Include support for "new" DBM library for aliases and maps.
33364250Seric		Normally defined in the Makefile.
33460565SericNEWDB		Include support for Berkeley "db" package (hash & btree)
33564250Seric		for aliases and maps.  Normally defined in the Makefile.
33666843SericOLD_NEWDB	If non-zero, the version of NEWDB you have is the old
33766843Seric		one that does not include the "fd" call.  This call was
33866843Seric		added in version 1.5 of the Berkeley DB code.  If you
33966843Seric		use -DOLD_NEWDB=0 it forces you to use the new interface.
34060565SericNIS		Define this to get NIS (YP) support for aliases and maps.
34164250Seric		Normally defined in the Makefile.
34260565SericUSERDB		Include support for the User Information Database.  Implied
34364250Seric		by NEWDB in conf.h.
34465000SericIDENTPROTO	Define this as 1 to get IDENT (RFC 1413) protocol support.
34560565Seric		This is assumed unless you are running on Ultrix or
34660565Seric		HP-UX, both of which have a problem in the UDP
34765000Seric		implementation.  You can define it to be 0 to explicitly
34865000Seric		turn off IDENT protocol support.
34960565SericMIME		Include support for MIME-encapsulated error messages.
35060565SericLOG		Set this to get syslog(3) support.  Defined by default
35160584Seric		in conf.h.  You want this if at all possible.
35260565SericNETINET		Set this to get TCP/IP support.  Defined by default
35360584Seric		in conf.h.  You probably want this.
35460565SericNETISO		Define this to get ISO networking support.
35560565SericSMTP		Define this to get the SMTP code.  Implied by NETINET
35660565Seric		or NETISO.
35760565SericNAMED_BIND	Define this to get DNS (name daemon) support, including
35860565Seric		MX support.  The specs you must use this if you run
35960565Seric		SMTP.  Defined by default in conf.h.
36060565SericQUEUE		Define this to get queueing code.  Implied by NETINET
36160584Seric		or NETISO; required by SMTP.  This gives you other good
36260584Seric		stuff -- it should be on.
36360565SericDAEMON		Define this to get general network support.  Implied by
36460584Seric		NETINET or NETISO.  Defined by default in conf.h.  You
36560584Seric		almost certainly want it on.
36660565SericMATCHGECOS	Permit fuzzy matching of user names against the full
36760565Seric		name (GECOS) field in the /etc/passwd file.  This should
36860565Seric		probably be on, since you can disable it from the config
36960584Seric		file if you want to.  Defined by default in conf.h.
37060565SericSETPROCTITLE	Try to set the string printed by "ps" to something
37160584Seric		informative about what sendmail is doing.  Defined by
37260584Seric		default in conf.h.
37360565Seric
37464035Seric
37565000Seric+---------------------+
37665000Seric| DNS/RESOLVER ISSUES |
37765000Seric+---------------------+
37865000Seric
37965000SericMany systems have old versions of the resolver library.  At a minimum,
38065000Sericyou should be running BIND 4.8.3; older versions may compile, but they
38165000Serichave known bugs that should give you pause.
38265000Seric
38365000SericCommon problems in old versions include "undefined" errors for
38465000Sericdn_skipname.
38565000Seric
38665000SericSome people have had a problem with BIND 4.9; it uses some routines
38765000Sericthat it expects to be externally defined such as strerror().  It may
38865000Serichelp to link with "-l44bsd" to solve this problem.
38965000Seric
39065095Seric!PLEASE! be sure to link with the same version of the resolver as
39165095Sericthe header files you used -- some people have used the 4.9 headers
39265095Sericand linked with BIND 4.8 or vice versa, and it doesn't work.
39365095SericUnfortunately, it doesn't fail in an obvious way -- things just
39465954Sericsubtly don't work.
39565000Seric
39665095Seric
39764035Seric+-------------------------------------+
39864035Seric| OPERATING SYSTEM AND COMPILE QUIRKS |
39964035Seric+-------------------------------------+
40064035Seric
40165095SericGCC 2.5.x problems  *** IMPORTANT ***
40265095Seric	Date: Mon, 29 Nov 93 19:08:44 PST
40365095Seric	From: wilson@cygnus.com (Jim Wilson)
40465095Seric	Message-Id: <9311300308.AA04608@cygnus.com>
40565095Seric	To: kenner@vlsi1.ultra.nyu.edu
40665095Seric	Subject: [cattelan@thebarn.com: gcc 2.5.4-2.5.5 -O bug]
40765095Seric	Cc: cattelan@thebarn.com, rms@gnu.ai.mit.edu, sendmail@cs.berkeley.edu
40865095Seric
40965095Seric	This fixes a problem that occurs when gcc 2.5.5 is used to compile
41065095Seric	sendmail 8.6.4 with optimization on a sparc.
41165095Seric
41265095Seric	Mon Nov 29 19:00:14 1993  Jim Wilson  (wilson@sphagnum.cygnus.com)
41365095Seric
41465095Seric		* reload.c (find_reloads_toplev): Replace obsolete reference to
41565095Seric		BYTE_LOADS_*_EXTEND with LOAD_EXTEND_OP.
41665095Seric
41765095Seric	*** clean-ss-931128/reload.c    Sun Nov 14 16:20:01 1993
41865095Seric	--- ss-931128/reload.c  Mon Nov 29 18:52:55 1993
41965095Seric	*************** find_reloads_toplev (x, opnum, type, ind
42065095Seric	*** 3888,3894 ****
42165095Seric		 force a reload in that case.  So we should not do anything here.  */
42265095Seric
42365095Seric		else if (regno >= FIRST_PSEUDO_REGISTER
42465095Seric	! #if defined(BYTE_LOADS_ZERO_EXTEND) || defined(BYTE_LOADS_SIGN_EXTEND)
42565095Seric		       && (GET_MODE_SIZE (GET_MODE (x))
42665095Seric			   <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
42765095Seric	  #endif
42865095Seric	--- 3888,3894 ----
42965095Seric		 force a reload in that case.  So we should not do anything here.  */
43065095Seric
43165095Seric		else if (regno >= FIRST_PSEUDO_REGISTER
43265095Seric	! #ifdef LOAD_EXTEND_OP
43365095Seric		       && (GET_MODE_SIZE (GET_MODE (x))
43465095Seric			   <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
43565095Seric	  #endif
43665095Seric
43765095Seric
43864376SericSunOS 4.x (Solaris 1.x)
43964376Seric	You may have to use -lresolv on SunOS.  However, beware that
44064376Seric	this links in a new version of gethostbyname that does not
44164376Seric	understand NIS, so you must have all of your hosts in DNS.
44264035Seric
44364798Seric	Some people have reported problems with the SunOS version of
44464798Seric	-lresolv and/or in.named, and suggest that you get a newer
44564798Seric	version.  The symptoms are delays when you connect to the
44665000Seric	SMTP server on a SunOS machine or having your domain added to
44765000Seric	addresses inappropriately.  There is a version of BIND
44864798Seric	version 4.9 on gatekeeper.DEC.COM in pub/BSD/bind/4.9.
44964798Seric
45064400Seric	There is substantial disagreement about whether you can make
45164400Seric	this work with resolv+, which allows you to specify a search-path
45264400Seric	of services.  Some people report that it works fine, others
45364400Seric	claim it doesn't work at all (including causing sendmail to
45464400Seric	drop core when it tries to do multiple resolv+ lookups for a
45564400Seric	single job).  I haven't tried resolv+, as we use DNS exclusively.
45664400Seric
45764400Seric	Should you want to try resolv+, it is on ftp.uu.net in
45864400Seric	/networking/ip/dns.
45964400Seric
46067161Seric	Apparently getservbyname() can fail under moderate to high
46167161Seric	load under some circumstances.  This will exhibit itself as
46267161Seric	the message ``554 makeconnection: service "smtp" unknown''.
46367161Seric	The problem has been traced to one or more blank lines in
46467161Seric	/etc/services on the NIS server machine.  Delete these
46567161Seric	and it should work.  This info is thanks to Brian Bartholomew
46667161Seric	<bb@math.ufl.edu> of I-Kinetics, Inc.
46767161Seric
46864376SericSolaris 2.x (SunOS 5.x)
46964376Seric	To compile for Solaris, be sure you use -DSOLARIS.
47064376Seric
47166329Seric	To the best of my knowledge, Solaris does not have the
47266329Seric	gethostbyname problem described above.  However, it does
47366329Seric	have another one:
47466329Seric
47564364Seric	From a correspondent:
47664364Seric
47764364Seric	   For solaris 2.2, I have
47864364Seric
47964364Seric		hosts:      files dns
48064364Seric
48164364Seric	   in /etc/nsswitch.conf and /etc/hosts has to have the fully
48264364Seric	   qualified host name. I think "files" has to be before "dns"
48364364Seric	   in /etc/nsswitch.conf during bootup.
48464364Seric
48566329Seric	From another correspondent:
48664376Seric
48766329Seric	   When running sendmail under Solaris, the gethostbyname()
48866329Seric	   hack in conf.c which should perform proper canonicalization
48966329Seric	   of host names could fail.  Result: the host name is not
49066329Seric	   canonicalized despite the hack, and you'll have to define $j
49166329Seric	   and $m in sendmail.cf somewhere.
49266329Seric
49366329Seric	   The reason could be that /etc/nsswitch.conf is improperly
49466329Seric	   configured (at least from sendmail's point of view).  For
49566329Seric	   example, the line
49666329Seric
49766329Seric		hosts:      files nisplus dns
49866329Seric
49966329Seric	   will make gethostbyname() look in /etc/hosts first, then ask
50066329Seric	   nisplus, then dns.  However, if /etc/hosts does not contain
50166329Seric	   the full canonicalized hostname, then no amount of
50266329Seric	   gethostbyname()s will work.
50366329Seric
50466329Seric	   Solution (or rather, a workaround): Ask nisplus first, then
50566329Seric	   dns, then local files:
50666329Seric
50766329Seric		hosts:      nisplus dns [NOTFOUND=return] files
50866329Seric
50964385Seric	The Solaris "syslog" function is apparently limited to something
51064385Seric	about 90 characters because of a kernel limitation.  If you have
51166023Seric	source code, you can probably up this number.  You can get patches
51266023Seric	that fix this problem: the patch ids are:
51364385Seric
51466023Seric		Solaris 2.1	100834
51566023Seric		Solaris 2.2	100999
51666024Seric		Solaris 2.3	101318
51766023Seric
51866023Seric	Be sure you have the appropriate patch installed or you won't
51966023Seric	see system logging.
52066023Seric
52164250SericOSF/1
52265000Seric	If you are compiling on OSF/1 (DEC Alpha), you must use
52365616Seric	-L/usr/shlib (otherwise it core dumps on startup).  You may also
52465000Seric	need -mld to get the nlist() function, although some versions
52565000Seric	apparently don't need this.
52665000Seric
52765000Seric	Also, the enclosed makefile removed /usr/sbin/smtpd; if you need
52865000Seric	it, just create the link to the sendmail binary.
52957977Seric
53066335SericIRIX
53166335Seric	The header files on SGI IRIX are completely prototyped, and as
53266335Seric	a result you can sometimes get some warning messages during
53366335Seric	compilation.  These can be ignored.  There are two errors in
53466335Seric	deliver only if you are using gcc, both of the form ``warning:
53566335Seric	passing arg N of `execve' from incompatible pointer type''.
53666335Seric	Also, if you compile with -DNIS, you will get a complaint
53766335Seric	about a declaration of struct dom_binding in a prototype
53866335Seric	when compiling map.c; this is not important because the
53966335Seric	function being prototyped is not used in that file.
54066335Seric
54164250SericNeXT
54264250Seric	If you are compiling on NeXT, you will have to create an empty
54364250Seric	file "unistd.h" and create a file "dirent.h" containing:
54463753Seric
54564250Seric		#include <sys/dir.h>
54664250Seric		#define dirent	direct
54764035Seric
54864250Seric	(The Makefile.NeXT should try to do both of these for you.)
54964077Seric
55064364Seric	Apparently, there is a bug in getservbyname on Nextstep 3.0
55164364Seric	that causes it to fail under some circumstances with the
55264364Seric	message "SYSERR: service "smtp" unknown" logged.  You should
55364364Seric	be able to work around this by including the line:
55464364Seric
55564670Seric		OOPort=25
55664364Seric
55764364Seric	in your .cf file.
55864364Seric
55964376Seric	You may have to use -DNeXT.
56064376Seric
56165000SericBSDI (BSD/386) 1.0, NetBSD 0.9, FreeBSD 1.0
56265000Seric	The "m4" from BSDI won't handle the config files properly.
56365000Seric	I haven't had a chance to test this myself.
56457943Seric
56565000Seric	The M4 shipped in FreeBSD and NetBSD 0.9 don't handle the config
56665000Seric	files properly. One must use either GNU m4 1.1 or the PD-M4
56765000Seric	recently posted in comp.os.386bsd.bugs (and maybe others).
56865000Seric	NetBSD-current includes the PD-M4 (as stated in the NetBSD file
56965000Seric	CHANGES).
57065000Seric
57165000Seric	FreeBSD 1.0 RELEASE has uname(2) now. Use -DUSEUNAME in order to
57265000Seric	use it (look into Makefile.FreeBSD). NetBSD-current may have
57365000Seric	it too but it has not been verified.
57465000Seric
57565000Seric	You cannot port the latest version of the Berkeley db library
57665000Seric	and use it with sendmail without recompiling the world.  This
57765000Seric	is because C library routines use the older version which have
57865000Seric	incompatible header files -- the result is that it can't read
57965000Seric	other system files, such as /etc/passwd, unless you use the
58065000Seric	new db format throughout your system.  You should normally just
58165000Seric	use the version of db supplied in your release.  You may need
58266843Seric	to use -DOLD_NEWDB=1 to make this work -- this turns off some
58365000Seric	new interface calls (for file locking) that are not in older
58465000Seric	versions of db.  You'll get compile errors if you need this
58565000Seric	flag and don't have it set.
58665000Seric
58764364Seric4.3BSD
58864364Seric	If you are running a "virgin" version of 4.3BSD, you'll have
58964364Seric	a very old resolver and be missing some header files.  The
59064364Seric	header files are simple -- create empty versions and everything
59164364Seric	will work fine.  For the resolver you should really port a new
59264364Seric	version (4.8.3 or later) of the resolver; 4.9 is available on
59364364Seric	gatekeeper.DEC.COM in pub/BSD/bind/4.9.  If you are really
59464364Seric	determined to continue to use your old, buggy version (or as
59564364Seric	a shortcut to get sendmail working -- I'm sure you have the
59664364Seric	best intentions to port a modern version of BIND), you can
59764364Seric	copy ../contrib/oldbind.compat.c into src and add
59864364Seric	oldbind.compat.o to OBJADD in the Makefile.
59964364Seric
60064718SericA/UX
60164718Seric	Date: Tue, 12 Oct 1993 18:28:28 -0400 (EDT)
60264718Seric	From: "Eric C. Hagberg" <hagberg@med.cornell.edu>
60364718Seric	Subject: Fix for A/UX ndbm
60464718Seric
60564718Seric	I guess this isn't really a sendmail bug, however, it is something
60664718Seric	that A/UX users should be aware of when compiling sendmail 8.6.
60764718Seric
60864718Seric	Apparently, the calls that sendmail is using to the ndbm routines
60964718Seric	in A/UX 3.0.x contain calls to "broken" routines, in that the
61064718Seric	aliases database will break when it gets "just a little big"
61164718Seric	(sorry I don't have exact numbers here, but it broke somewhere
61264718Seric	around 20-25 aliases for me.), making all aliases non-functional
61364718Seric	after exceeding this point.
61464718Seric
61564718Seric	What I did was to get the gnu-dbm-1.6 package, compile it, and
61664718Seric	then re-compile sendmail with "-lgdbm", "-DNDBM", and using the
61764718Seric	ndbm.h header file that comes with the gnu-package. This makes
61864718Seric	things behave properly.
61964718Seric
62064718Seric	I suppose porting the New Berkeley db package is another route,
62164718Seric	however, I made a quick attempt at it, and found it difficult
62264718Seric	(not easy at least); the gnu-dbm package "configured" and
62364718Seric	compiled easily.
62464718Seric
62564718SericDG/UX
62664718Seric	Apparently, /bin/mail doesn't work properly for delivery on
62764718Seric	DG/UX -- the person who has this working, Douglas Anderson
62867427Seric	<dlander@afterlife.ncsc.mil>, used procmail instead.  The
62967427Seric	problem is that DG/UX /bin/mail requires that an environment
63067427Seric	variable be set (_FORCE_MAIL_LOCAL_=yes); sendmail has no
63167427Seric	mechanism for this.  Several people report that procmail works
63267427Seric	beautifully.
63364718Seric
63465820SericApollo DomainOS
63565820Seric	If you are compiling on Apollo, you will have to create an empty
63665820Seric	file "unistd.h" and create a file "dirent.h" containing:
63765820Seric
63865820Seric		#include <sys/dir.h>
63965820Seric		#define dirent	direct
64065820Seric
64165820Seric	(The Makefile.DomainOS will attempt to do both of these for you.)
64265820Seric
64365910SericHP-UX 8.00
64465910Seric	Date: Mon, 24 Jan 1994 13:25:45 +0200
64565910Seric	From: Kimmo Suominen <Kimmo.Suominen@lut.fi>
64665910Seric	Subject: 8.6.5 w/ HP-UX 8.00 on s300
64765910Seric
64865910Seric	Just compiled and fought with sendmail 8.6.5 on a HP9000/360 (ie. a
64965910Seric	series 300 machine) running HP-UX 8.00.
65065910Seric
65165910Seric	I was getting segmentation fault when delivering to a local user.
65265910Seric	With debugging I saw it was faulting when doing _free@libc... *sigh*
65365910Seric	It seems the new implementation of malloc on s300 is buggy as of 8.0,
65465910Seric	so I tried out the one in -lmalloc (malloc(3X)).  With that it seems
65565910Seric	to work just dandy.
65665910Seric
65765910Seric	When linking, you will get the following error:
65865910Seric
65965910Seric	ld: multiply defined symbol _freespace in file /usr/lib/libmalloc.a
66065910Seric
66165910Seric	but you can just ignore it.  You might want to add this info to the
66265910Seric	README file for the future...
66365910Seric
66465910SericLinux
66565910Seric	Something broke between versions 0.99.13 and 0.99.14 of Linux:
66665910Seric	the flock() system call gives errors.  If you are running .14,
66765910Seric	you must not use flock.  You can do this with -DHASFLOCK=0.
66865910Seric
66965910SericAIX
67065910Seric	This version of sendmail does not support MB, MG, and MR resource
67165910Seric	records, which are supported by AIX sendmail.
67265910Seric
67366335SericRISC/os
67466335Seric	RISC/os from MIPS is a merged AT&T/Berkeley system.  When you
67566335Seric	compile on that platform you will get duplicate definitions
67666335Seric	on many files.  You can ignore these.
67766335Seric
67865195SericSystem V Release 4 Based Systems
67965195Seric	There is a single Makefile that is intended for all SVR4-based
68065195Seric	systems (called Makefile.SVR4).  It defines __svr4__, which is
68165195Seric	predefined by some compilers.  If your compiler already defines
68265195Seric	this compile variable, you can delete the definition from the
68365195Seric	Makefile.
68465195Seric
68565195Seric	It's been tested on Dell Issue 2.2.
68665195Seric
68765095SericDELL SVR4
68865095Seric	Date:      Mon, 06 Dec 1993 10:42:29 EST
68965095Seric	From: "Kimmo Suominen" <kim@grendel.lut.fi>
69065095Seric	Message-ID: <2d0352f9.lento29@lento29.UUCP>
69165095Seric	To: eric@cs.berkeley.edu
69265166Seric	Cc: sendmail@cs.berkeley.edu
69365095Seric	Subject:   Notes for DELL SVR4
69465095Seric
69565095Seric	Eric,
69665095Seric
69765095Seric	Here are some notes for compiling Sendmail 8.6.4 on DELL SVR4.  I ran
69865095Seric	across these things when helping out some people who contacted me by
69965095Seric	e-mail.
70065095Seric
70165095Seric	1) Use gcc 2.4.5 (or later?).  Dell distributes gcc 2.1 with their
70265095Seric	   Issue 2.2 Unix.  It is too old, and gives you problems with
70365095Seric	   clock.c, because sigset_t won't get defined in <sys/signal.h>.
70465095Seric	   This is due to a problematic protection rule in there, and is
70565095Seric	   fixed with gcc 2.4.5.
70665095Seric
70765095Seric	2) If you don't use the new Berkeley DB (-DNEWDB), then you need
70865095Seric	   to add "-lc -lucb" to the libraries to link with.  This is because
70965095Seric	   the -ldbm distributed by Dell needs the bcopy, bcmp and bzero
71065095Seric	   functions.  It is important that you specify both libraries in
71165095Seric	   the given order to be sure you only get the BSTRING functions
71265095Seric	   from the UCB library (and not the signal routines etc.).
71365095Seric
71465095Seric	3) Don't leave out "-lelf" even if compiling with "-lc -lucb".
71565095Seric	   The UCB library also has another copy of the nlist routines,
71665095Seric	   but we do want the ones from "-lelf".
71765095Seric
71865095Seric	If anyone needs a compiled gcc 2.4.5 and/or a ported DB library, they
71965095Seric	can use anonymous ftp to fetch them from lut.fi in the /kim directory.
72065095Seric	They are copies of what I use on grendel.lut.fi, and offering them
72165095Seric	does not imply that I would also support them.  I have sent the DB
72265095Seric	port for SVR4 back to Keith Bostic for inclusion in the official
72365095Seric	distribution, but I haven't heard anything from him as of today.
72465095Seric
72565095Seric	- gcc-2.4.5-svr4.tar.gz	(gcc 2.4.5 and the corresponding libg++)
72665095Seric	- db-1.72.tar.gz	(with source, objects and a installed copy)
72765095Seric
72865095Seric	Cheers
72965095Seric	+ Kim
73065095Seric	--
73165095Seric	 *  Kimmo.Suominen@lut.fi  *  SysVr4 enthusiast at GRENDEL.LUT.FI  *
73265095Seric	*    KIM@FINFILES.BITNET   *  Postmaster and Hostmaster at LUT.FI   *
73365095Seric	 *    + 358 200 865 718    *  Unix area moderator at NIC.FUNET.FI  *
73465095Seric
73567267SericConvexOS 10.1 and below
73667267Seric	In order to use the name server, you must create the file
73767267Seric	/etc/use_nameserver.  If this file does not exist, the call
73867267Seric	to res_init() will fail and you will have absolutely no
73967267Seric	access to DNS, including MX records.
74065095Seric
74164718SericNon-DNS based sites
74264718Seric	This version of sendmail always tries to connect to the Domain
74364718Seric	Name System (DNS) to resolve names, regardless of the setting
74464718Seric	of the `I' option.  On most systems that are not running DNS,
74564718Seric	this will fail quickly and sendmail will continue, but on some
74664718Seric	systems it has a long timeout.  If you have this problem, you
74764718Seric	will have to recompile without NAMED_BIND.  Some people have
74864718Seric	claimed that they have successfully used "OI+USEVC" to force
74964718Seric	sendmail to use a virtual circuit -- this will always time out
75064718Seric	quickly, but also tells sendmail that a failed connection
75164718Seric	should requeue the message (probably not what you intended).
75264718Seric	A future release of sendmail will correct this problem.
75364718Seric
75464250SericBoth NEWDB and NDBM
75564250Seric	If you use both -DNDBM and -DNEWDB, you must delete the module
75664250Seric	ndbm.o from libdb.a and delete the file "ndbm.h" from the files
75764250Seric	that get installed (that is, use the OLD ndbm.h, not the new
75864250Seric	ndbm.h).  This compatibility module maps ndbm calls into DB
75964250Seric	calls, and breaks things rather badly.
76058709Seric
76164559SericGNU getopt
76264559Seric	I'm told that GNU getopt has a problem in that it gets confused
76364559Seric	by the double call.  Use the version in conf.c instead.
76464250Seric
76566350SericBIND 4.9.2 and Ultrix
76667206Seric	If you are running on Ultrix, be sure you read conf/Info.Ultrix
76767206Seric	in the BIND distribution very carefully -- there is information
76867206Seric	in there that you need to know in order to avoid errors of the
76967206Seric	form:
77064559Seric
77166350Seric		/lib/libc.a(gethostent.o): sethostent: multiply defined
77266350Seric		/lib/libc.a(gethostent.o): endhostent: multiply defined
77366350Seric		/lib/libc.a(gethostent.o): gethostbyname: multiply defined
77466350Seric		/lib/libc.a(gethostent.o): gethostbyaddr: multiply defined
77566350Seric
77666350Seric	during the link stage.
77766350Seric
77866350Seric
77964820Seric+--------------+
78064820Seric| MANUAL PAGES |
78164820Seric+--------------+
78264820Seric
78364820SericThe manual pages have been written against the -mandoc macros
78464820Sericinstead of the -man macros.  The latest version of groff has them
78564820Sericincluded.  You can also get a copy from FTP.UU.NET in directory
78664820Seric/systems/unix/bsd-sources/share/tmac.
78764820Seric
78864820Seric
78965151Seric+-----------------+
79065151Seric| DEBUGGING HOOKS |
79165151Seric+-----------------+
79265151Seric
79365151SericAs of 8.6.5, sendmail daemons will catch a SIGUSR1 signal and log
79465151Sericsome debugging output (logged at LOG_DEBUG severity).  The
79565151Sericinformation dumped is:
79665151Seric
79765151Seric * The value of the $j macro.
79865151Seric * A warning if $j is not in the set $=w.
79965151Seric * A list of the open file descriptors.
80065151Seric * The contents of the connection cache.
80165151Seric * If ruleset 89 is defined, it is evaluated and the results printed.
80265151Seric
80365151SericThis allows you to get information regarding the runtime state of the
80465151Sericdaemon on the fly.  This should not be done too frequently, since
80565151Sericthe process of rewriting may lose memory which will not be recovered.
80665151SericAlso, ruleset 89 may call non-reentrant routines, so there is a small
80765151Sericnon-zero probability that this will cause other problems.  It is
80865151Sericreally only for debugging serious problems.
80965151Seric
81065151SericA typical formulation of ruleset 89 would be:
81165151Seric
81265151Seric	R$*		$@ $>0 some test address
81365151Seric
81465151Seric
81564035Seric+-----------------------------+
81664035Seric| DESCRIPTION OF SOURCE FILES |
81764035Seric+-----------------------------+
81864035Seric
8199881SericThe following list describes the files in this directory:
8205369Seric
82157418SericMakefile	The makefile used here; this version only works with
82257418Seric		the new Berkeley make.
82357418SericMakefile.dist	A trimmed down version of the makefile that works with
82457418Seric		the old make.
8255369SericREAD_ME		This file.
82660565SericTRACEFLAGS	My own personal list of the trace flags -- not guaranteed
82760565Seric		to be particularly up to date.
8285369Sericalias.c		Does name aliasing in all forms.
8299881Sericarpadate.c	A subroutine which creates ARPANET standard dates.
8309881Sericclock.c		Routines to implement real-time oriented functions
8319881Seric		in sendmail -- e.g., timeouts.
8325369Sericcollect.c	The routine that actually reads the mail into a temp
8335369Seric		file.  It also does a certain amount of parsing of
8345369Seric		the header, etc.
8355369Sericconf.c		The configuration file.  This contains information
8365369Seric		that is presumed to be quite static and non-
8375369Seric		controversial, or code compiled in for efficiency
8385369Seric		reasons.  Most of the configuration is in sendmail.cf.
8399881Sericconf.h		Configuration that must be known everywhere.
8405369Sericconvtime.c	A routine to sanely process times.
8419881Sericdaemon.c	Routines to implement daemon mode.  This version is
8429881Seric		specifically for Berkeley 4.1 IPC.
8435369Sericdeliver.c	Routines to deliver mail.
84460565Sericdomain.c	Routines that interface with DNS (the Domain Name
84560565Seric		System).
8465369Sericerr.c		Routines to print error messages.
8479881Sericenvelope.c	Routines to manipulate the envelope structure.
8485369Sericheaders.c	Routines to process message headers.
8495369Sericmacro.c		The macro expander.  This is used internally to
8505369Seric		insert information from the configuration file.
8515369Sericmain.c		The main routine to sendmail.  This file also
8525369Seric		contains some miscellaneous routines.
85360565Sericmap.c		Support for database maps.
85460565Sericmci.c		Routines that handle mail connection information caching.
8559881Sericparseaddr.c	The routines which do address parsing.
8565369Sericqueue.c		Routines to implement message queueing.
8575369Sericreadcf.c	The routine that reads the configuration file and
8585369Seric		translates it to internal form.
8599881Sericrecipient.c	Routines that manipulate the recipient list.
8605369Sericsavemail.c	Routines which save the letter on processing errors.
8615369Sericsendmail.h	Main header file for sendmail.
8625369Sericsrvrsmtp.c	Routines to implement server SMTP.
8635369Sericstab.c		Routines to manage the symbol table.
8645369Sericstats.c		Routines to collect and post the statistics.
8655369Sericsysexits.c	List of error messages associated with error codes
8665369Seric		in sysexits.h.
8679881Serictrace.c		The trace package.  These routines allow setting and
8689881Seric		testing of trace flags with a high granularity.
86960565Sericudb.c		The user database interface module.
8705369Sericusersmtp.c	Routines to implement user SMTP.
8715369Sericutil.c		Some general purpose routines used by sendmail.
87260565Sericversion.c	The version number and information about this
87360565Seric		version of sendmail.  Theoretically, this gets
87460565Seric		modified on every change.
8755369Seric
8765369SericEric Allman
8775369Seric
878*67436Seric(Version 8.68, last update 06/19/94 11:41:27)
879