xref: /csrg-svn/usr.sbin/sendmail/src/READ_ME (revision 64077)
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*64077Seric#	@(#)READ_ME	8.12 (Berkeley) 07/28/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
1657418SericThe Makefile is for the new Berkeley make, available from ftp.uu.net
1757418Sericin the directory /systems/unix/bsd-sources/usr.bin/make.  There is
1857418Sericalso a Makefile.dist which is much less clever, but works on the old
1957418Serictraditional make.  You can use this using:
2057418Seric
2157418Seric	make -f Makefile.dist
2257418Seric
2360565SericThere are a couple of other Makefiles for other systems -- these are
2460584Sericthe ones that I use, they have "Berkeley quirks" in them, and I don't
2560584Sericguarantee that they will work in your environment.  To make it worse,
2660584Sericsome are for the new Berkeley make, and some are for the old make.
2760584SericI provide them for information only.  Still, they may help you get
2860584Sericstarted.  They have names like "Makefile.HPUX".
2957943Seric
3064035Seric
3164035Seric+---------------+
3264035Seric| COMPILE FLAGS |
3364035Seric+---------------+
3464035Seric
3560565SericWhereever possible, I try to make sendmail pull in the correct
3660584Sericcompilation options needed to compile on various environments based on
3760584Sericautomatically defined symbols.  Some machines don't seem to have useful
3860584Sericsymbols availble, requiring the following compilation flags in the
3960584SericMakefile:
4060565Seric
4160565SericSOLARIS		Define this if you are running Solaris 2.0 or higher.
42*64077SericNeXT		Define this if you are on a NeXT box.  (This one may
4364072Seric		be pre-defined for you.)  There are other hacks you
4464072Seric		have to make -- see below.
4560565Seric_AIX3		Define this if you are IBM AIX 3.x.
4663965SericRISCOS		Define this if you are running RISC/os from MIPS.
4760565Seric
4860584SericIf you are a system that sendmail has already been ported to, you
4960584Sericprobably won't have to touch these.  But if you are porting, you may
5063962Serichave to tweak the following compilation flags in conf.h in order to
5163962Sericget it to compile and link properly:
5260565Seric
5360565SericSYSTEM5		Adjust for System V.
5464035SericSYS5SIGNALS	Use System V signal semantics -- the signal handler
5564035Seric		is automatically dropped when the signal is caught.
5664035Seric		If this is not set, use POSIX/BSD semantics, where the
5764035Seric		signal handler stays in force until an exec or an
5864035Seric		explicit delete.  Implied by SYSTEM5.
5964035SericHASFLOCK	Set this if you prefer to use the flock(2) system call
6064035Seric		rather than using fcntl-based locking.  Fcntl locking
6164035Seric		has some semantic gotchas, but many vendor systems
6264035Seric		also interface it to lockd(8) to do NFS-style locking.
6364035Seric		For this reason, this should not be set unless you
6464035Seric		don't have an alternative.
6560565SericHASUNAME	Set if you have the "uname" system call.  Implied by
6660565Seric		SYSTEM5.
6763962SericHASUNSETENV	Define this if your system library has the "unsetenv"
6863962Seric		subroutine.
6960584SericHASSTATFS	Define this if you have the statfs(2) system call.  It's
7060584Seric		not a disaster to get this wrong -- but you do lose the
7160584Seric		queue free space code.
7260584SericHASUSTAT	Define this if you have the ustat(2) system call.  It's
7360584Seric		not a disaster to get this wrong -- but you do lose the
7460584Seric		queue free space code.
7560565SericHASSETSID	Define this if you have the setsid(2) system call.  This
7660565Seric		is implied if your system appears to be POSIX compliant.
7760565SericHASINITGROUPS	Define this if you have the initgroups(3) routine.
7863753SericHASSETVBUF	Define this if you have the setvbuf(3) library call.
7963753Seric		If you don't, setlinebuf will be used instead.  This
8063753Seric		defaults on if your compiler defines __STDC__.
8163902SericHASSETREUID	Define this if you have setreuid(2) ***AND*** root can
8263902Seric		use setreuid to change to an arbitrary user.  This second
8363902Seric		condition is not satisfied on AIX 3.x.  You may find that
8463902Seric		your system has setresuid(2), (for example, on HP-UX) in
8563902Seric		which case you will also have to #define setreuid(r, e)
8663902Seric		to be the appropriate call.  Some systems (such as Solaris)
8763902Seric		have a compatibility routine that doesn't work properly.
8863902Seric		The important thing is that you have a call that will set
8963902Seric		the effective uid independently of the real or saved uid.
9063902Seric		Setting this improves the security somewhat, since
9163902Seric		sendmail doesn't have to read .forward and :include: files
9263902Seric		as root.
9363937SericGIDSET_T	The type of entries in a gidset passed as the second
9463937Seric		argument to getgroups(2).  Historically this has been an
9563937Seric		int, so this is the default, but some systems (such as
9663937Seric		IRIX) pass it as a gid_t, which is an unsigned short.
9763937Seric		This will make a difference, so it is important to get
9863937Seric		this right!  However, it is only an issue if you have
9963937Seric		group sets.
10063968SericSLEEP_T		The type returned by the system sleep() function.
10163968Seric		Defaults to "unsigned int".  Don't worry about this
10263968Seric		if you don't have compilation problems.
10363974SericARBPTR_T	The type of an arbitrary pointer -- defaults to "void *".
10463974Seric		If you are an very old compiler you may need to define
10563974Seric		this to be "char *".
10660584SericLA_TYPE		The type of load average your kernel supports.  These
10760584Seric		can be LA_SUBR (4) if you have the getloadavg(3) routine,
10860584Seric		LA_FLOAT (3) if you read kmem and interpret the value
10960584Seric		as a floating point number, LA_INT (2) to interpret as
11060584Seric		an integer.  These last two have several other parameters
11160584Seric		that they try to divine: the name of your kernel, the name
11260584Seric		of the variable in the kernel to examine, the number of
11360584Seric		bits of precision in a fixed point load average, and so
11460584Seric		forth.  In desparation, use LA_ZERO -- it always returns
11560584Seric		the load average as "zero" (and does so on all architectures).
11660584Seric		The actual code is in conf.c -- it can be tweaked if you
11760584Seric		are brave.
11863962SericERRLIST_PREDEFINED
11963962Seric		If set, assumes that some header file defines sys_errlist.
12063962Seric		This may be needed if you get type conflicts on this
12163962Seric		variable -- otherwise don't worry about it.
12260565Seric
12364035Seric
12464035Seric+-----------------------+
12564035Seric| COMPILE-TIME FEATURES |
12664035Seric+-----------------------+
12764035Seric
12860584SericThere are a bunch of features that you can decide to compile in, such
12960584Sericas selecting various database packages and special protocol support.
13060584SericSeveral are assumed based on other compilation flags -- if you want to
13160584Seric"un-assume" something, you probably need to edit conf.h.  Compilation
13260584Sericflags that add support for special features include:
13360565Seric
13460565SericNDBM		Include support for "new" DBM library for aliases and maps.
13560565SericNEWDB		Include support for Berkeley "db" package (hash & btree)
13660565Seric		for aliases and maps.
13760565SericNIS		Define this to get NIS (YP) support for aliases and maps.
13860565SericYPCOMPAT	Define this to force building of DBM versions of alias
13960565Seric		files even if you have NEWDB defined; this will only
14060565Seric		occur on NIS master machines.  It is independent of NIS.
14160565SericUSERDB		Include support for the User Information Database.  Implied
14260584Seric		by NEWDB conf.h.
14360565SericIDENTPROTO	Define this to get IDENT (RFC 1413) protocol support.
14460565Seric		This is assumed unless you are running on Ultrix or
14560565Seric		HP-UX, both of which have a problem in the UDP
14660565Seric		implementation.
14760565SericMIME		Include support for MIME-encapsulated error messages.
14860565SericFROZENCONFIG	Define this to get support for frozen configuration
14960584Seric		files.  Frozen configurations make sense if your I/O system
15060584Seric		is fast relative to your processor.  At this point this
15160584Seric		is NOT recommended.
15260565SericLOG		Set this to get syslog(3) support.  Defined by default
15360584Seric		in conf.h.  You want this if at all possible.
15460565SericNETINET		Set this to get TCP/IP support.  Defined by default
15560584Seric		in conf.h.  You probably want this.
15660565SericNETISO		Define this to get ISO networking support.
15760565SericSMTP		Define this to get the SMTP code.  Implied by NETINET
15860565Seric		or NETISO.
15960565SericNAMED_BIND	Define this to get DNS (name daemon) support, including
16060565Seric		MX support.  The specs you must use this if you run
16160565Seric		SMTP.  Defined by default in conf.h.
16260565SericQUEUE		Define this to get queueing code.  Implied by NETINET
16360584Seric		or NETISO; required by SMTP.  This gives you other good
16460584Seric		stuff -- it should be on.
16560565SericDAEMON		Define this to get general network support.  Implied by
16660584Seric		NETINET or NETISO.  Defined by default in conf.h.  You
16760584Seric		almost certainly want it on.
16860565SericMATCHGECOS	Permit fuzzy matching of user names against the full
16960565Seric		name (GECOS) field in the /etc/passwd file.  This should
17060565Seric		probably be on, since you can disable it from the config
17160584Seric		file if you want to.  Defined by default in conf.h.
17260565SericSETPROCTITLE	Try to set the string printed by "ps" to something
17360584Seric		informative about what sendmail is doing.  Defined by
17460584Seric		default in conf.h.
17560565Seric
17664035Seric
17764035Seric+-------------------------------------+
17864035Seric| OPERATING SYSTEM AND COMPILE QUIRKS |
17964035Seric+-------------------------------------+
18064035Seric
18160565SericIf you are compiling on SunOS and want to use frozen configuration
18260565Sericfiles, you must use -Bstatic -- if you do not, frozen configuration
18360565Sericfiles fail in bizarre ways and you will open up several security holes.
18460565Seric
18564035SericYou may have to use -lresolv on SunOS.
18664035Seric
18757977SericIf you are compiling on OSF/1 (DEC Alpha), you must use -lmld.
18857977Seric
18963753SericIf you are compiling on NeXT, you will have to create an empty file
19064035Seric"unistd.h" and create a file "dirent.h" containing:
19163753Seric
19264035Seric	#include <sys/dir.h>
19364072Seric	#define dirent	direct
19464035Seric
195*64077Seric(The Makefile.NeXT should try to do both of these for you.)
196*64077Seric
19758709SericIf you use both -DNDBM and -DNEWDB, you must delete the module ndbm.o
19860172Sericfrom libdb.a and delete the file "ndbm.h" from the files that get
19960172Sericinstalled (that is, use the OLD ndbm.h, not the new ndbm.h).  This
20060172Sericcompatibility module maps ndbm calls into DB calls, and breaks things
20160172Sericrather badly.
20257943Seric
20358709Seric
20464035Seric+-----------------------------+
20564035Seric| DESCRIPTION OF SOURCE FILES |
20664035Seric+-----------------------------+
20764035Seric
2089881SericThe following list describes the files in this directory:
2095369Seric
21057418SericMakefile	The makefile used here; this version only works with
21157418Seric		the new Berkeley make.
21257418SericMakefile.dist	A trimmed down version of the makefile that works with
21357418Seric		the old make.
2145369SericREAD_ME		This file.
21560565SericTRACEFLAGS	My own personal list of the trace flags -- not guaranteed
21660565Seric		to be particularly up to date.
2175369Sericalias.c		Does name aliasing in all forms.
2189881Sericarpadate.c	A subroutine which creates ARPANET standard dates.
2199881Sericclock.c		Routines to implement real-time oriented functions
2209881Seric		in sendmail -- e.g., timeouts.
2215369Sericcollect.c	The routine that actually reads the mail into a temp
2225369Seric		file.  It also does a certain amount of parsing of
2235369Seric		the header, etc.
2245369Sericconf.c		The configuration file.  This contains information
2255369Seric		that is presumed to be quite static and non-
2265369Seric		controversial, or code compiled in for efficiency
2275369Seric		reasons.  Most of the configuration is in sendmail.cf.
2289881Sericconf.h		Configuration that must be known everywhere.
2295369Sericconvtime.c	A routine to sanely process times.
2309881Sericdaemon.c	Routines to implement daemon mode.  This version is
2319881Seric		specifically for Berkeley 4.1 IPC.
2325369Sericdeliver.c	Routines to deliver mail.
23360565Sericdomain.c	Routines that interface with DNS (the Domain Name
23460565Seric		System).
2355369Sericerr.c		Routines to print error messages.
2369881Sericenvelope.c	Routines to manipulate the envelope structure.
2375369Sericheaders.c	Routines to process message headers.
2385369Sericmacro.c		The macro expander.  This is used internally to
2395369Seric		insert information from the configuration file.
2405369Sericmain.c		The main routine to sendmail.  This file also
2415369Seric		contains some miscellaneous routines.
24260565Sericmap.c		Support for database maps.
24360565Sericmci.c		Routines that handle mail connection information caching.
2449881Sericparseaddr.c	The routines which do address parsing.
2455369Sericqueue.c		Routines to implement message queueing.
2465369Sericreadcf.c	The routine that reads the configuration file and
2475369Seric		translates it to internal form.
2489881Sericrecipient.c	Routines that manipulate the recipient list.
2495369Sericsavemail.c	Routines which save the letter on processing errors.
2505369Sericsendmail.h	Main header file for sendmail.
2515369Sericsrvrsmtp.c	Routines to implement server SMTP.
2525369Sericstab.c		Routines to manage the symbol table.
2535369Sericstats.c		Routines to collect and post the statistics.
2545369Sericsysexits.c	List of error messages associated with error codes
2555369Seric		in sysexits.h.
2569881Serictrace.c		The trace package.  These routines allow setting and
2579881Seric		testing of trace flags with a high granularity.
25860565Sericudb.c		The user database interface module.
2595369Sericusersmtp.c	Routines to implement user SMTP.
2605369Sericutil.c		Some general purpose routines used by sendmail.
26160565Sericversion.c	The version number and information about this
26260565Seric		version of sendmail.  Theoretically, this gets
26360565Seric		modified on every change.
2645369Seric
2655369SericEric Allman
2665369Seric
267*64077Seric(Version 8.12, last update 07/28/93 08:10:30)
268