xref: /original-bsd/usr.sbin/sendmail/src/READ_ME (revision 3705696b)
1# Copyright (c) 1983 Eric P. Allman
2# Copyright (c) 1988 The Regents of the University of California.
3# All rights reserved.
4#
5# %sccs.include.redist.sh%
6#
7#	@(#)READ_ME	8.10 (Berkeley) 07/26/93
8#
9
10This directory contains the source files for sendmail.
11
12For detailed instructions, please read the document ../doc/op.me:
13
14	eqn ../doc/op.me | pic | ditroff -me
15
16The Makefile is for the new Berkeley make, available from ftp.uu.net
17in the directory /systems/unix/bsd-sources/usr.bin/make.  There is
18also a Makefile.dist which is much less clever, but works on the old
19traditional make.  You can use this using:
20
21	make -f Makefile.dist
22
23There are a couple of other Makefiles for other systems -- these are
24the ones that I use, they have "Berkeley quirks" in them, and I don't
25guarantee that they will work in your environment.  To make it worse,
26some are for the new Berkeley make, and some are for the old make.
27I provide them for information only.  Still, they may help you get
28started.  They have names like "Makefile.HPUX".
29
30
31+---------------+
32| COMPILE FLAGS |
33+---------------+
34
35Whereever possible, I try to make sendmail pull in the correct
36compilation options needed to compile on various environments based on
37automatically defined symbols.  Some machines don't seem to have useful
38symbols availble, requiring the following compilation flags in the
39Makefile:
40
41SOLARIS		Define this if you are running Solaris 2.0 or higher.
42__NeXT__	Define this if you are on a NeXT box.  (This one may
43		be pre-defined for you.)
44_AIX3		Define this if you are IBM AIX 3.x.
45RISCOS		Define this if you are running RISC/os from MIPS.
46
47If you are a system that sendmail has already been ported to, you
48probably won't have to touch these.  But if you are porting, you may
49have to tweak the following compilation flags in conf.h in order to
50get it to compile and link properly:
51
52SYSTEM5		Adjust for System V.
53SYS5SIGNALS	Use System V signal semantics -- the signal handler
54		is automatically dropped when the signal is caught.
55		If this is not set, use POSIX/BSD semantics, where the
56		signal handler stays in force until an exec or an
57		explicit delete.  Implied by SYSTEM5.
58HASFLOCK	Set this if you prefer to use the flock(2) system call
59		rather than using fcntl-based locking.  Fcntl locking
60		has some semantic gotchas, but many vendor systems
61		also interface it to lockd(8) to do NFS-style locking.
62		For this reason, this should not be set unless you
63		don't have an alternative.
64HASUNAME	Set if you have the "uname" system call.  Implied by
65		SYSTEM5.
66HASSETENV	Define this if your system library has the "setenv"
67		call.  If not defined, sendmail defines this in terms
68		of the putenv(3) routine.
69HASUNSETENV	Define this if your system library has the "unsetenv"
70		subroutine.
71HASSTATFS	Define this if you have the statfs(2) system call.  It's
72		not a disaster to get this wrong -- but you do lose the
73		queue free space code.
74HASUSTAT	Define this if you have the ustat(2) system call.  It's
75		not a disaster to get this wrong -- but you do lose the
76		queue free space code.
77HASSETSID	Define this if you have the setsid(2) system call.  This
78		is implied if your system appears to be POSIX compliant.
79HASINITGROUPS	Define this if you have the initgroups(3) routine.
80HASSETVBUF	Define this if you have the setvbuf(3) library call.
81		If you don't, setlinebuf will be used instead.  This
82		defaults on if your compiler defines __STDC__.
83HASSETREUID	Define this if you have setreuid(2) ***AND*** root can
84		use setreuid to change to an arbitrary user.  This second
85		condition is not satisfied on AIX 3.x.  You may find that
86		your system has setresuid(2), (for example, on HP-UX) in
87		which case you will also have to #define setreuid(r, e)
88		to be the appropriate call.  Some systems (such as Solaris)
89		have a compatibility routine that doesn't work properly.
90		The important thing is that you have a call that will set
91		the effective uid independently of the real or saved uid.
92		Setting this improves the security somewhat, since
93		sendmail doesn't have to read .forward and :include: files
94		as root.
95GIDSET_T	The type of entries in a gidset passed as the second
96		argument to getgroups(2).  Historically this has been an
97		int, so this is the default, but some systems (such as
98		IRIX) pass it as a gid_t, which is an unsigned short.
99		This will make a difference, so it is important to get
100		this right!  However, it is only an issue if you have
101		group sets.
102SLEEP_T		The type returned by the system sleep() function.
103		Defaults to "unsigned int".  Don't worry about this
104		if you don't have compilation problems.
105ARBPTR_T	The type of an arbitrary pointer -- defaults to "void *".
106		If you are an very old compiler you may need to define
107		this to be "char *".
108LA_TYPE		The type of load average your kernel supports.  These
109		can be LA_SUBR (4) if you have the getloadavg(3) routine,
110		LA_FLOAT (3) if you read kmem and interpret the value
111		as a floating point number, LA_INT (2) to interpret as
112		an integer.  These last two have several other parameters
113		that they try to divine: the name of your kernel, the name
114		of the variable in the kernel to examine, the number of
115		bits of precision in a fixed point load average, and so
116		forth.  In desparation, use LA_ZERO -- it always returns
117		the load average as "zero" (and does so on all architectures).
118		The actual code is in conf.c -- it can be tweaked if you
119		are brave.
120ERRLIST_PREDEFINED
121		If set, assumes that some header file defines sys_errlist.
122		This may be needed if you get type conflicts on this
123		variable -- otherwise don't worry about it.
124
125
126+-----------------------+
127| COMPILE-TIME FEATURES |
128+-----------------------+
129
130There are a bunch of features that you can decide to compile in, such
131as selecting various database packages and special protocol support.
132Several are assumed based on other compilation flags -- if you want to
133"un-assume" something, you probably need to edit conf.h.  Compilation
134flags that add support for special features include:
135
136NDBM		Include support for "new" DBM library for aliases and maps.
137NEWDB		Include support for Berkeley "db" package (hash & btree)
138		for aliases and maps.
139NIS		Define this to get NIS (YP) support for aliases and maps.
140YPCOMPAT	Define this to force building of DBM versions of alias
141		files even if you have NEWDB defined; this will only
142		occur on NIS master machines.  It is independent of NIS.
143USERDB		Include support for the User Information Database.  Implied
144		by NEWDB conf.h.
145IDENTPROTO	Define this to get IDENT (RFC 1413) protocol support.
146		This is assumed unless you are running on Ultrix or
147		HP-UX, both of which have a problem in the UDP
148		implementation.
149MIME		Include support for MIME-encapsulated error messages.
150FROZENCONFIG	Define this to get support for frozen configuration
151		files.  Frozen configurations make sense if your I/O system
152		is fast relative to your processor.  At this point this
153		is NOT recommended.
154LOG		Set this to get syslog(3) support.  Defined by default
155		in conf.h.  You want this if at all possible.
156NETINET		Set this to get TCP/IP support.  Defined by default
157		in conf.h.  You probably want this.
158NETISO		Define this to get ISO networking support.
159SMTP		Define this to get the SMTP code.  Implied by NETINET
160		or NETISO.
161NAMED_BIND	Define this to get DNS (name daemon) support, including
162		MX support.  The specs you must use this if you run
163		SMTP.  Defined by default in conf.h.
164QUEUE		Define this to get queueing code.  Implied by NETINET
165		or NETISO; required by SMTP.  This gives you other good
166		stuff -- it should be on.
167DAEMON		Define this to get general network support.  Implied by
168		NETINET or NETISO.  Defined by default in conf.h.  You
169		almost certainly want it on.
170MATCHGECOS	Permit fuzzy matching of user names against the full
171		name (GECOS) field in the /etc/passwd file.  This should
172		probably be on, since you can disable it from the config
173		file if you want to.  Defined by default in conf.h.
174SETPROCTITLE	Try to set the string printed by "ps" to something
175		informative about what sendmail is doing.  Defined by
176		default in conf.h.
177
178
179+-------------------------------------+
180| OPERATING SYSTEM AND COMPILE QUIRKS |
181+-------------------------------------+
182
183If you are compiling on SunOS and want to use frozen configuration
184files, you must use -Bstatic -- if you do not, frozen configuration
185files fail in bizarre ways and you will open up several security holes.
186
187You may have to use -lresolv on SunOS.
188
189If you are compiling on OSF/1 (DEC Alpha), you must use -lmld.
190
191If you are compiling on NeXT, you will have to create an empty file
192"unistd.h" and create a file "dirent.h" containing:
193
194	#include <sys/dir.h>
195	#define direct	dirent
196
197If you use both -DNDBM and -DNEWDB, you must delete the module ndbm.o
198from libdb.a and delete the file "ndbm.h" from the files that get
199installed (that is, use the OLD ndbm.h, not the new ndbm.h).  This
200compatibility module maps ndbm calls into DB calls, and breaks things
201rather badly.
202
203
204+-----------------------------+
205| DESCRIPTION OF SOURCE FILES |
206+-----------------------------+
207
208The following list describes the files in this directory:
209
210Makefile	The makefile used here; this version only works with
211		the new Berkeley make.
212Makefile.dist	A trimmed down version of the makefile that works with
213		the old make.
214READ_ME		This file.
215TRACEFLAGS	My own personal list of the trace flags -- not guaranteed
216		to be particularly up to date.
217alias.c		Does name aliasing in all forms.
218arpadate.c	A subroutine which creates ARPANET standard dates.
219clock.c		Routines to implement real-time oriented functions
220		in sendmail -- e.g., timeouts.
221collect.c	The routine that actually reads the mail into a temp
222		file.  It also does a certain amount of parsing of
223		the header, etc.
224conf.c		The configuration file.  This contains information
225		that is presumed to be quite static and non-
226		controversial, or code compiled in for efficiency
227		reasons.  Most of the configuration is in sendmail.cf.
228conf.h		Configuration that must be known everywhere.
229convtime.c	A routine to sanely process times.
230daemon.c	Routines to implement daemon mode.  This version is
231		specifically for Berkeley 4.1 IPC.
232deliver.c	Routines to deliver mail.
233domain.c	Routines that interface with DNS (the Domain Name
234		System).
235err.c		Routines to print error messages.
236envelope.c	Routines to manipulate the envelope structure.
237headers.c	Routines to process message headers.
238macro.c		The macro expander.  This is used internally to
239		insert information from the configuration file.
240main.c		The main routine to sendmail.  This file also
241		contains some miscellaneous routines.
242map.c		Support for database maps.
243mci.c		Routines that handle mail connection information caching.
244parseaddr.c	The routines which do address parsing.
245queue.c		Routines to implement message queueing.
246readcf.c	The routine that reads the configuration file and
247		translates it to internal form.
248recipient.c	Routines that manipulate the recipient list.
249savemail.c	Routines which save the letter on processing errors.
250sendmail.h	Main header file for sendmail.
251srvrsmtp.c	Routines to implement server SMTP.
252stab.c		Routines to manage the symbol table.
253stats.c		Routines to collect and post the statistics.
254sysexits.c	List of error messages associated with error codes
255		in sysexits.h.
256trace.c		The trace package.  These routines allow setting and
257		testing of trace flags with a high granularity.
258udb.c		The user database interface module.
259usersmtp.c	Routines to implement user SMTP.
260util.c		Some general purpose routines used by sendmail.
261version.c	The version number and information about this
262		version of sendmail.  Theoretically, this gets
263		modified on every change.
264
265Eric Allman
266
267(Version 8.10, last update 07/26/93 09:21:53)
268