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