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*63974Seric# @(#)READ_ME 8.9 (Berkeley) 07/21/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 3060565SericWhereever possible, I try to make sendmail pull in the correct 3160584Sericcompilation options needed to compile on various environments based on 3260584Sericautomatically defined symbols. Some machines don't seem to have useful 3360584Sericsymbols availble, requiring the following compilation flags in the 3460584SericMakefile: 3560565Seric 3660565SericSOLARIS Define this if you are running Solaris 2.0 or higher. 3763753Seric__NeXT__ Define this if you are on a NeXT box. (This one may 3863753Seric be pre-defined for you.) 3960565Seric_AIX3 Define this if you are IBM AIX 3.x. 4063965SericRISCOS Define this if you are running RISC/os from MIPS. 4160565Seric 4260584SericIf you are a system that sendmail has already been ported to, you 4360584Sericprobably won't have to touch these. But if you are porting, you may 4463962Serichave to tweak the following compilation flags in conf.h in order to 4563962Sericget it to compile and link properly: 4660565Seric 4760565SericSYSTEM5 Adjust for System V. 4860565SericLOCKF Set this if you do not have the flock system call -- it 4960565Seric will revert to System V file locking. There are some 5060565Seric semantic gotchas, so flock is preferred. Implied by 5160565Seric SYSTEM5. 5260565SericHASUNAME Set if you have the "uname" system call. Implied by 5360565Seric SYSTEM5. 5463962SericHASSETENV Define this if your system library has the "setenv" 5563962Seric call. If not defined, sendmail defines this in terms 5663962Seric of the putenv(3) routine. 5763962SericHASUNSETENV Define this if your system library has the "unsetenv" 5863962Seric subroutine. 5960584SericHASSTATFS Define this if you have the statfs(2) system call. It's 6060584Seric not a disaster to get this wrong -- but you do lose the 6160584Seric queue free space code. 6260584SericHASUSTAT Define this if you have the ustat(2) system call. It's 6360584Seric not a disaster to get this wrong -- but you do lose the 6460584Seric queue free space code. 6560565SericHASSETSID Define this if you have the setsid(2) system call. This 6660565Seric is implied if your system appears to be POSIX compliant. 6760565SericHASINITGROUPS Define this if you have the initgroups(3) routine. 6863753SericHASSETVBUF Define this if you have the setvbuf(3) library call. 6963753Seric If you don't, setlinebuf will be used instead. This 7063753Seric defaults on if your compiler defines __STDC__. 7163902SericHASSETREUID Define this if you have setreuid(2) ***AND*** root can 7263902Seric use setreuid to change to an arbitrary user. This second 7363902Seric condition is not satisfied on AIX 3.x. You may find that 7463902Seric your system has setresuid(2), (for example, on HP-UX) in 7563902Seric which case you will also have to #define setreuid(r, e) 7663902Seric to be the appropriate call. Some systems (such as Solaris) 7763902Seric have a compatibility routine that doesn't work properly. 7863902Seric The important thing is that you have a call that will set 7963902Seric the effective uid independently of the real or saved uid. 8063902Seric Setting this improves the security somewhat, since 8163902Seric sendmail doesn't have to read .forward and :include: files 8263902Seric as root. 8363937SericGIDSET_T The type of entries in a gidset passed as the second 8463937Seric argument to getgroups(2). Historically this has been an 8563937Seric int, so this is the default, but some systems (such as 8663937Seric IRIX) pass it as a gid_t, which is an unsigned short. 8763937Seric This will make a difference, so it is important to get 8863937Seric this right! However, it is only an issue if you have 8963937Seric group sets. 9063968SericSLEEP_T The type returned by the system sleep() function. 9163968Seric Defaults to "unsigned int". Don't worry about this 9263968Seric if you don't have compilation problems. 93*63974SericARBPTR_T The type of an arbitrary pointer -- defaults to "void *". 94*63974Seric If you are an very old compiler you may need to define 95*63974Seric this to be "char *". 9660584SericLA_TYPE The type of load average your kernel supports. These 9760584Seric can be LA_SUBR (4) if you have the getloadavg(3) routine, 9860584Seric LA_FLOAT (3) if you read kmem and interpret the value 9960584Seric as a floating point number, LA_INT (2) to interpret as 10060584Seric an integer. These last two have several other parameters 10160584Seric that they try to divine: the name of your kernel, the name 10260584Seric of the variable in the kernel to examine, the number of 10360584Seric bits of precision in a fixed point load average, and so 10460584Seric forth. In desparation, use LA_ZERO -- it always returns 10560584Seric the load average as "zero" (and does so on all architectures). 10660584Seric The actual code is in conf.c -- it can be tweaked if you 10760584Seric are brave. 10863962SericERRLIST_PREDEFINED 10963962Seric If set, assumes that some header file defines sys_errlist. 11063962Seric This may be needed if you get type conflicts on this 11163962Seric variable -- otherwise don't worry about it. 11260565Seric 11360584SericThere are a bunch of features that you can decide to compile in, such 11460584Sericas selecting various database packages and special protocol support. 11560584SericSeveral are assumed based on other compilation flags -- if you want to 11660584Seric"un-assume" something, you probably need to edit conf.h. Compilation 11760584Sericflags that add support for special features include: 11860565Seric 11960565SericNDBM Include support for "new" DBM library for aliases and maps. 12060565SericNEWDB Include support for Berkeley "db" package (hash & btree) 12160565Seric for aliases and maps. 12260565SericNIS Define this to get NIS (YP) support for aliases and maps. 12360565SericYPCOMPAT Define this to force building of DBM versions of alias 12460565Seric files even if you have NEWDB defined; this will only 12560565Seric occur on NIS master machines. It is independent of NIS. 12660565SericUSERDB Include support for the User Information Database. Implied 12760584Seric by NEWDB conf.h. 12860565SericIDENTPROTO Define this to get IDENT (RFC 1413) protocol support. 12960565Seric This is assumed unless you are running on Ultrix or 13060565Seric HP-UX, both of which have a problem in the UDP 13160565Seric implementation. 13260565SericMIME Include support for MIME-encapsulated error messages. 13360565SericFROZENCONFIG Define this to get support for frozen configuration 13460584Seric files. Frozen configurations make sense if your I/O system 13560584Seric is fast relative to your processor. At this point this 13660584Seric is NOT recommended. 13760565SericLOG Set this to get syslog(3) support. Defined by default 13860584Seric in conf.h. You want this if at all possible. 13960565SericNETINET Set this to get TCP/IP support. Defined by default 14060584Seric in conf.h. You probably want this. 14160565SericNETISO Define this to get ISO networking support. 14260565SericSMTP Define this to get the SMTP code. Implied by NETINET 14360565Seric or NETISO. 14460565SericNAMED_BIND Define this to get DNS (name daemon) support, including 14560565Seric MX support. The specs you must use this if you run 14660565Seric SMTP. Defined by default in conf.h. 14760565SericQUEUE Define this to get queueing code. Implied by NETINET 14860584Seric or NETISO; required by SMTP. This gives you other good 14960584Seric stuff -- it should be on. 15060565SericDAEMON Define this to get general network support. Implied by 15160584Seric NETINET or NETISO. Defined by default in conf.h. You 15260584Seric almost certainly want it on. 15360565SericMATCHGECOS Permit fuzzy matching of user names against the full 15460565Seric name (GECOS) field in the /etc/passwd file. This should 15560565Seric probably be on, since you can disable it from the config 15660584Seric file if you want to. Defined by default in conf.h. 15760565SericSETPROCTITLE Try to set the string printed by "ps" to something 15860584Seric informative about what sendmail is doing. Defined by 15960584Seric default in conf.h. 16060565Seric 16160565SericIf you are compiling on SunOS and want to use frozen configuration 16260565Sericfiles, you must use -Bstatic -- if you do not, frozen configuration 16360565Sericfiles fail in bizarre ways and you will open up several security holes. 16460565Seric 16557977SericIf you are compiling on OSF/1 (DEC Alpha), you must use -lmld. 16657977Seric 16763753SericIf you are compiling on NeXT, you will have to create an empty file 16863753Seric"unistd.h". 16963753Seric 17058709SericIf you use both -DNDBM and -DNEWDB, you must delete the module ndbm.o 17160172Sericfrom libdb.a and delete the file "ndbm.h" from the files that get 17260172Sericinstalled (that is, use the OLD ndbm.h, not the new ndbm.h). This 17360172Sericcompatibility module maps ndbm calls into DB calls, and breaks things 17460172Sericrather badly. 17557943Seric 17658709SericYou probably want to look over the compilation options in conf.h 17758709Sericbefore you compile. These are intended to be per-site information. 17858709Seric 1799881SericThe following list describes the files in this directory: 1805369Seric 18157418SericMakefile The makefile used here; this version only works with 18257418Seric the new Berkeley make. 18357418SericMakefile.dist A trimmed down version of the makefile that works with 18457418Seric the old make. 1855369SericREAD_ME This file. 18660565SericTRACEFLAGS My own personal list of the trace flags -- not guaranteed 18760565Seric to be particularly up to date. 1885369Sericalias.c Does name aliasing in all forms. 1899881Sericarpadate.c A subroutine which creates ARPANET standard dates. 1909881Sericclock.c Routines to implement real-time oriented functions 1919881Seric in sendmail -- e.g., timeouts. 1925369Sericcollect.c The routine that actually reads the mail into a temp 1935369Seric file. It also does a certain amount of parsing of 1945369Seric the header, etc. 1955369Sericconf.c The configuration file. This contains information 1965369Seric that is presumed to be quite static and non- 1975369Seric controversial, or code compiled in for efficiency 1985369Seric reasons. Most of the configuration is in sendmail.cf. 1999881Sericconf.h Configuration that must be known everywhere. 2005369Sericconvtime.c A routine to sanely process times. 2019881Sericdaemon.c Routines to implement daemon mode. This version is 2029881Seric specifically for Berkeley 4.1 IPC. 2035369Sericdeliver.c Routines to deliver mail. 20460565Sericdomain.c Routines that interface with DNS (the Domain Name 20560565Seric System). 2065369Sericerr.c Routines to print error messages. 2079881Sericenvelope.c Routines to manipulate the envelope structure. 2085369Sericheaders.c Routines to process message headers. 2095369Sericmacro.c The macro expander. This is used internally to 2105369Seric insert information from the configuration file. 2115369Sericmain.c The main routine to sendmail. This file also 2125369Seric contains some miscellaneous routines. 21360565Sericmap.c Support for database maps. 21460565Sericmci.c Routines that handle mail connection information caching. 2159881Sericparseaddr.c The routines which do address parsing. 2165369Sericqueue.c Routines to implement message queueing. 2175369Sericreadcf.c The routine that reads the configuration file and 2185369Seric translates it to internal form. 2199881Sericrecipient.c Routines that manipulate the recipient list. 2205369Sericsavemail.c Routines which save the letter on processing errors. 2215369Sericsendmail.h Main header file for sendmail. 2225369Sericsrvrsmtp.c Routines to implement server SMTP. 2235369Sericstab.c Routines to manage the symbol table. 2245369Sericstats.c Routines to collect and post the statistics. 2255369Sericsysexits.c List of error messages associated with error codes 2265369Seric in sysexits.h. 2279881Serictrace.c The trace package. These routines allow setting and 2289881Seric testing of trace flags with a high granularity. 22960565Sericudb.c The user database interface module. 2305369Sericusersmtp.c Routines to implement user SMTP. 2315369Sericutil.c Some general purpose routines used by sendmail. 23260565Sericversion.c The version number and information about this 23360565Seric version of sendmail. Theoretically, this gets 23460565Seric modified on every change. 2355369Seric 2365369SericEric Allman 2375369Seric 238*63974Seric(Version 8.9, last update 07/21/93 12:17:36) 239