source: trunk/third/sendmail/src/README @ 12554

Revision 12554, 63.4 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12553, which included commits to RCS files with non-trunk default branches.
Line 
1# Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
2# Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
3# Copyright (c) 1988
4#       The Regents of the University of California.  All rights reserved.
5#
6# By using this file, you agree to the terms and conditions set
7# forth in the LICENSE file which can be found at the top level of
8# the sendmail distribution.
9#
10#
11#       @(#)README      8.211 (Berkeley) 2/2/1999
12#
13
14This directory contains the source files for sendmail(TM).
15
16*********************
17!! DO NOT USE MAKE !!  in this directory to compile sendmail --
18*********************  instead, use the "Build" script located in
19the src directory.  It will build an appropriate Makefile, and
20create an appropriate obj.* subdirectory so that multiplatform
21support works easily.
22
23        **********************************************************
24        **  Read below for more details on building sendmail.   **
25        **********************************************************
26
27**************************************************************************
28**  IMPORTANT:  Read the appropriate paragraphs in the section on       **
29**  ``Operating System and Compile Quirks''.                            **
30**************************************************************************
31
32For detailed instructions, please read the document ../doc/op/op.me:
33
34        eqn ../doc/op/op.me | pic | ditroff -me
35
36Sendmail is a trademark of Sendmail, Inc.
37
38
39+-------------------+
40| BUILDING SENDMAIL |
41+-------------------+
42
43By far, the easiest way to compile sendmail is to use the "Build"
44script:
45
46        sh Build
47
48This uses the "uname" command to figure out what architecture you are
49on and creates a proper Makefile accordingly.  It also creates a
50subdirectory per object format, so that multiarchitecture support is
51easy.  In general this should be all you need.  IRIX 6.x users should
52read the note below in the OPERATING SYSTEM AND COMPILE QUIRKS section.
53
54If you need to look at other include or library directories, use the
55-I or -L flags on the command line, e.g.,
56
57        sh Build -I/usr/sww/include -L/usr/sww/lib
58
59It's also possible to create local site configuration in the file
60site.config.m4 (or another file settable with the -f flag).  This
61file contains M4 definitions for various compilation values; the
62most useful are:
63
64confMAPDEF      -D flags to specify database types to be included
65                (see below)
66confENVDEF      -D flags to specify other environment information
67confINCDIRS     -I flags for finding include files during compilation
68confLIBDIRS     -L flags for finding libraries during linking
69confLIBS        -l flags for selecting libraries during linking
70confLDOPTS      other ld(1) linker options
71
72Others can be found by examining Makefile.m4.  Please read
73../BuildTools/README for more information about the site.config.m4
74file.
75
76You can recompile from scratch using the -c flag with the Build
77command.  This removes the existing compilation directory for the
78current platform and builds a new one.
79
80Porting to a new Unix-based system should be a matter of creating
81an appropriate configuration file in the BuildTools/OS/ directory.
82
83
84
85+----------------------+
86| DATABASE DEFINITIONS |
87+----------------------+
88
89There are several database formats that can be used for the alias files
90and for general maps.  When used for alias files they interact in an
91attempt to be backward compatible.
92
93The options are:
94
95NEWDB           The new Berkeley DB package.  Some systems (e.g., BSD/OS and
96                Digital UNIX 4.0) have some version of this package
97                pre-installed.  If your system does not have Berkeley DB
98                pre-installed, or the version installed is not version 2.0
99                or greater (e.g., is Berkeley DB 1.85 or 1.86), get the
100                current version from http://www.sleepycat.com/.  DO NOT
101                use a version from any of the University of California,
102                Berkeley "Net" or other distributions.  If you are still
103                running BSD/386 1.x, you will need to upgrade the included
104                Berkeley DB library to a current version.  NEWDB is included
105                automatically if the Build script can find a library named
106                libdb.a.
107NDBM            The older NDBM implementation -- the very old V7 DBM
108                implementation is no longer supported.
109NIS             Network Information Services.  To use this you must have
110                NIS support on your system.
111NISPLUS         NIS+ (the revised NIS released with Solaris 2).  You must
112                have NIS+ support on your system to use this flag.
113HESIOD          Support for Hesiod (from the DEC/Athena distribution).  You
114                must already have Hesiod support on your system for this to
115                work.  You may be able to get this to work with the MIT/Athena
116                version of Hesiod, but that's likely to be a lot of work.
117LDAPMAP         Lightweight Directory Lookup Protocol support.  You will
118                have to install the UMich or OpenLDAP ldap and lber
119                libraries to use this flag.
120MAP_REGEX       Regular Expression support.  You will need to use an
121                operating system which comes with the POSIX regex()
122                routines or install a regexp library such as libregex from
123                the Free Software Foundation.
124
125>>>  NOTE WELL for NEWDB support: If you want to get ndbm support, for
126>>>  Berkeley DB versions under 2.0, it is CRITICAL that you remove
127>>>  ndbm.o from libdb.a before you install it and DO NOT install ndbm.h;
128>>>  for Berkeley DB versions 2.0 through 2.3.14, remove dbm.o from libdb.a
129>>>  before you install it.  If you don't delete these, there is absolutely
130>>>  no point to including -DNDBM, since it will just get you another
131>>>  (inferior) API to the same format database.  These files OVERRIDE
132>>>  calls to ndbm routines -- in particular, if you leave ndbm.h in,
133>>>  you can find yourself using the new db package even if you don't
134>>>  define NEWDB.  Berkeley DB versions later than 2.3.14 do not need
135>>>  to be modified.  Please also consult the README in the top level
136>>>  directory of the sendmail distribution for other important information.
137>>>
138>>>  Further note: DO NOT remove your existing /usr/include/ndbm.h --
139>>>  you need that one.  But do not install an updated ndbm.h in
140>>>  /usr/include, /usr/local/include, or anywhere else.
141
142If NEWDB and NDBM are defined (but not NIS), then sendmail will read
143NDBM format alias files, but the next time a newaliases is run the
144format will be converted to NEWDB; that format will be used forever
145more.  This is intended as a transition feature.
146
147If NEWDB, NDBM, and NIS are all defined and the name of the file includes
148the string "/yp/", sendmail will rebuild BOTH the NEWDB and NDBM format
149alias files.  However, it will only read the NEWDB file; the NDBM format
150file is used only by the NIS subsystem.  This is needed because the NIS
151maps on an NIS server are built directly from the NDBM files.
152
153If NDBM and NIS are defined (regardless of the definition of NEWDB),
154and the filename includes the string "/yp/", sendmail adds the special
155tokens "YP_LAST_MODIFIED" and "YP_MASTER_NAME", both of which are
156required if the NDBM file is to be used as an NIS map.
157
158All of these flags are normally defined in the DBMDEF line in the
159Makefile.
160
161If you define NEWDB or HESIOD you get the User Database (USERDB)
162automatically.  Generally you do want to have NEWDB for it to do
163anything interesting.  See above for getting the Berkeley DB
164package (i.e., NEWDB).  There is no separate "user database"
165package -- don't bother searching for it on the net.
166
167Hesiod and LDAP require libraries that may not be installed with your
168system.  These are outside of my ability to provide support.  See the
169"Quirks" section for more information.
170
171The regex map can be used to see if an address matches a certain regular
172expression.  For example, all-numerics local parts are common spam
173addresses, so "^[0-9]+$" would match this.  By using such a map in a
174check_* rule-set, you can block a certain range of addresses that would
175otherwise be considered valid.
176
177+---------------+
178| COMPILE FLAGS |
179+---------------+
180
181Wherever possible, I try to make sendmail pull in the correct
182compilation options needed to compile on various environments based on
183automatically defined symbols.  Some machines don't seem to have useful
184symbols available, requiring that a compilation flag be defined in
185the Makefile; see the Buildtools/OS subdirectory for the supported
186architectures.
187
188If you are a system to which sendmail has already been ported you
189should not have to touch the following symbols.  But if you are porting,
190you may have to tweak the following compilation flags in conf.h in order
191to get it to compile and link properly:
192
193SYSTEM5         Adjust for System V (not necessarily Release 4).
194SYS5SIGNALS     Use System V signal semantics -- the signal handler
195                is automatically dropped when the signal is caught.
196                If this is not set, use POSIX/BSD semantics, where the
197                signal handler stays in force until an exec or an
198                explicit delete.  Implied by SYSTEM5.
199SYS5SETPGRP     Use System V setpgrp() semantics.  Implied by SYSTEM5.
200HASFCHMOD       Define this to one if you have the fchmod(2) system call.
201                This improves security.
202HASFLOCK        Set this if you prefer to use the flock(2) system call
203                rather than using fcntl-based locking.  Fcntl locking
204                has some semantic gotchas, but many vendor systems
205                also interface it to lockd(8) to do NFS-style locking.
206                Unfortunately, may vendors implementations of fcntl locking
207                is just plain broken (e.g., locks are never released,
208                causing your sendmail to deadlock; when the kernel runs
209                out of locks your system crashes).  For this reason, I
210                recommend always defining this unless you are absolutely
211                certain that your fcntl locking implementation really works.
212HASUNAME        Set if you have the "uname" system call.  Implied by
213                SYSTEM5.
214HASUNSETENV     Define this if your system library has the "unsetenv"
215                subroutine.
216HASSETSID       Define this if you have the setsid(2) system call.  This
217                is implied if your system appears to be POSIX compliant.
218HASINITGROUPS   Define this if you have the initgroups(3) routine.
219HASSETVBUF      Define this if you have the setvbuf(3) library call.
220                If you don't, setlinebuf will be used instead.  This
221                defaults on if your compiler defines __STDC__.
222HASSETREUID     Define this if you have setreuid(2) ***AND*** root can
223                use setreuid to change to an arbitrary user.  This second
224                condition is not satisfied on AIX 3.x.  You may find that
225                your system has setresuid(2), (for example, on HP-UX) in
226                which case you will also have to #define setreuid(r, e)
227                to be the appropriate call.  Some systems (such as Solaris)
228                have a compatibility routine that doesn't work properly,
229                but may have "saved user ids" properly implemented so you
230                can ``#define setreuid(r, e) seteuid(e)'' and have it work.
231                The important thing is that you have a call that will set
232                the effective uid independently of the real or saved uid
233                and be able to set the effective uid back again when done.
234                There's a test program in ../test/t_setreuid.c that will
235                try things on your system.  Setting this improves the
236                security, since sendmail doesn't have to read .forward
237                and :include: files as root.  There are certain attacks
238                that may be unpreventable without this call.
239USESETEUID      Define this to 1 if you have a seteuid(2) system call that
240                will allow root to set only the effective user id to an
241                arbitrary value ***AND*** you have saved user ids.  This is
242                preferable to HASSETREUID if these conditions are fulfilled.
243                These are the semantics of the to-be-released revision of
244                Posix.1.  The test program ../test/t_seteuid.c will try
245                this out on your system.  If you define both HASSETREUID
246                and USESETEUID, the former is ignored.
247HASLSTAT        Define this if you have symbolic links (and thus the
248                lstat(2) system call).  This improves security.  Unlike
249                most other options, this one is on by default, so you
250                need to #undef it in conf.h if you don't have symbolic
251                links (these days everyone does).
252HASSETRLIMIT    Define this to 1 if you have the setrlimit(2) syscall.
253                You can define it to 0 to force it off.  It is assumed
254                if you are running a BSD-like system.
255HASULIMIT       Define this if you have the ulimit(2) syscall (System V
256                style systems).  HASSETRLIMIT overrides, as it is more
257                general.
258HASWAITPID      Define this if you have the waitpid(2) syscall.
259HASGETDTABLESIZE
260                Define this if you have the getdtablesize(2) syscall.
261HAS_ST_GEN      Define this to 1 if your system has the st_gen field in
262                the stat structure (see stat(2)).
263USESTRERROR     Define this if you have the libc strerror function (which
264                should be declared in <errno.h>), and it should be used
265                instead of sys_errlist.
266NEEDGETOPT      Define this if you need a reimplementation of getopt(3).
267                On some systems, getopt does very odd things if called
268                to scan the arguments twice.  This flag will ask sendmail
269                to compile in a local version of getopt that works
270                properly.
271NEEDSTRTOL      Define this if your standard C library does not define
272                strtol(3).  This will compile in a local version.
273NEEDVPRINTF     Define this if your standard C library does not define
274                vprintf(3).  Note that the resulting fake implementation
275                is not very elegant and may not even work on some
276                architectures.
277NEEDFSYNC       Define this if your standard C library does not define
278                fsync(2).  This will try to simulate the operation using
279                fcntl(2); if that is not available it does nothing, which
280                isn't great, but at least it compiles and runs.
281HASGETUSERSHELL Define this to 1 if you have getusershell(3) in your
282                standard C library.  If this is not defined, or is defined
283                to be 0, sendmail will scan the /etc/shells file (no
284                NIS-style support, defaults to /bin/sh and /bin/csh if
285                that file does not exist) to get a list of unrestricted
286                user shells.  This is used to determine whether users
287                are allowed to forward their mail to a program or a file.
288NEEDPUTENV      Define this if your system needs am emulation of the
289                putenv(3) call.  Define to 1 to implement it in terms
290                of setenv(3) or to 2 to do it in terms of primitives.
291NOFTRUNCATE     Define this if you don't have the ftruncate(2) syscall.
292                If you don't have this system call, there is an unavoidable
293                race condition that occurs when creating alias databases.
294GIDSET_T        The type of entries in a gidset passed as the second
295                argument to getgroups(2).  Historically this has been an
296                int, so this is the default, but some systems (such as
297                IRIX) pass it as a gid_t, which is an unsigned short.
298                This will make a difference, so it is important to get
299                this right!  However, it is only an issue if you have
300                group sets.
301SLEEP_T         The type returned by the system sleep() function.
302                Defaults to "unsigned int".  Don't worry about this
303                if you don't have compilation problems.
304ARBPTR_T        The type of an arbitrary pointer -- defaults to "void *".
305                If you are an very old compiler you may need to define
306                this to be "char *".
307SOCKADDR_LEN_T  The type used for the third parameter to accept(2),
308                getsockname(2), and getpeername(2), representing the
309                length of a struct sockaddr.  Defaults to int.
310SOCKOPT_LEN_T   The type used for the fifth parameter to getsockopt(2)
311                and setsockopt(2), representing the length of the option
312                buffer.  Defaults to int.
313LA_TYPE         The type of load average your kernel supports.  These
314                can be one of:
315                 LA_ZERO (1) -- it always returns the load average as
316                        "zero" (and does so on all architectures).
317                 LA_INT (2) to read /dev/kmem for the symbol avenrun and
318                        interpret as a long integer.
319                 LA_FLOAT (3) same, but interpret the result as a floating
320                        point number.
321                 LA_SHORT (6) to interpret as a short integer.
322                 LA_SUBR (4) if you have the getloadavg(3) routine in your
323                        system library.
324                 LA_MACH (5) to use MACH-style load averages (calls
325                        processor_set_info()),
326                 LA_PROCSTR (7) to read /proc/loadavg and interpret it
327                        as a string representing a floating-point
328                        number (Linux-style).
329                 LA_READKSYM (8) is an implementation suitable for some
330                        versions of SVr4 that uses the MIOC_READKSYM ioctl
331                        call to read /dev/kmem.
332                 LA_DGUX (9) is a special implementation for DG/UX that uses
333                        the dg_sys_info system call.
334                 LA_HPUX (10) is an HP-UX specific version that uses the
335                        pstat_getdynamic system call.
336                 LA_IRIX6 (11) is an IRIX 6.x specific version that adapts
337                        to 32 or 64 bit kernels; it is otherwise very similar
338                        to LA_INT.
339                 LA_KSTAT (12) uses the (Solaris-specific) kstat(3k)
340                        implementation.
341                 LA_DEVSHORT (13) reads a short from a system file (default:
342                        /dev/table/avenrun) and scales it in the same manner
343                        as LA_SHORT.
344                LA_INT, LA_SHORT, LA_FLOAT, and LA_READKSYM have several
345                other parameters that they try to divine: the name of your
346                kernel, the name of the variable in the kernel to examine,
347                the number of bits of precision in a fixed point load average,
348                and so forth.  LA_DEVSHORT uses _PATH_AVENRUN to find the
349                device to be read to find the load average.
350                In desperation, use LA_ZERO.  The actual code is in
351                conf.c -- it can be tweaked if you are brave.
352FSHIFT          For LA_INT, LA_SHORT, and LA_READKSYM, this is the number
353                of bits of load average after the binary point -- i.e.,
354                the number of bits to shift right in order to scale the
355                integer to get the true integer load average.  Defaults to 8.
356_PATH_UNIX      The path to your kernel.  Needed only for LA_INT, LA_SHORT,
357                and LA_FLOAT.  Defaults to "/unix" on System V, "/vmunix"
358                everywhere else.
359LA_AVENRUN      For LA_INT, LA_SHORT, and LA_FLOAT, the name of the kernel
360                variable that holds the load average.  Defaults to "avenrun"
361                on System V, "_avenrun" everywhere else.
362SFS_TYPE        Encodes how your kernel can locate the amount of free
363                space on a disk partition.  This can be set to SFS_NONE
364                (0) if you have no way of getting this information,
365                SFS_USTAT (1) if you have the ustat(2) system call,
366                SFS_4ARGS (2) if you have a four-argument statfs(2)
367                system call (and the include file is <sys/statfs.h>),
368                SFS_VFS (3), SFS_MOUNT (4), SFS_STATFS (5) if you have
369                the two-argument statfs(2) system call with includes in
370                <sys/vfs.h>, <sys/mount.h>, or <sys/statfs.h> respectively,
371                or SFS_STATVFS (6) if you have the two-argument statvfs(2)
372                call.  The default if nothing is defined is SFS_NONE.
373SFS_BAVAIL      with SFS_4ARGS you can also set SFS_BAVAIL to the field name
374                in the statfs structure that holds the useful information;
375                this defaults to f_bavail.
376SPT_TYPE        Encodes how your system can display what a process is doing
377                on a ps(1) command (SPT stands for Set Process Title).  Can
378                be set to:
379                SPT_NONE (0) -- Don't try to set the process title at all.
380                SPT_REUSEARGV (1) -- Pad out your argv with the information;
381                        this is the default if none specified.
382                SPT_BUILTIN (2) -- The system library has setproctitle.
383                SPT_PSTAT (3) -- Use the PSTAT_SETCMD option to pstat(2)
384                        to set the process title; this is used by HP-UX.
385                SPT_PSSTRINGS (4) -- Use the magic PS_STRINGS pointer (4.4BSD).
386                SPT_SYSMIPS (5) -- Use sysmips() supported by NEWS-OS 6.
387                SPT_SCO (6) -- Write kernel u. area.
388                SPT_CHANGEARGV (7) -- Write pointers to our own strings into
389                        the existing argv vector.
390SPT_PADCHAR     Character used to pad the process title; if undefined,
391                the space character (0x20) is used.  This is ignored if
392                SPT_TYPE != SPT_REUSEARGV
393ERRLIST_PREDEFINED
394                If set, assumes that some header file defines sys_errlist.
395                This may be needed if you get type conflicts on this
396                variable -- otherwise don't worry about it.
397WAITUNION       The wait(2) routine takes a "union wait" argument instead
398                of an integer argument.  This is for compatibility with
399                old versions of BSD.
400SCANF           You can set this to extend the F command to accept a
401                scanf string -- this gives you a primitive parser for
402                class definitions -- BUT it can make you vulnerable to
403                core dumps if the target file is poorly formed.
404SYSLOG_BUFSIZE  You can define this to be the size of the buffer that
405                syslog accepts.  If it is not defined, it assumes a
406                1024-byte buffer.  If the buffer is very small (under
407                256 bytes) the log message format changes -- each
408                e-mail message will log many more messages, since it
409                will log each piece of information as a separate line
410                in syslog.
411BROKEN_RES_SEARCH
412                On Ultrix (and maybe other systems?) if you use the
413                res_search routine with an unknown host name, it returns
414                -1 but sets h_errno to 0 instead of HOST_NOT_FOUND.  If
415                you set this, sendmail considers 0 to be the same as
416                HOST_NOT_FOUND.
417NAMELISTMASK    If defined, values returned by nlist(3) are masked
418                against this value before use -- a common value is
419                0x7fffffff to strip off the top bit.
420BSD4_4_SOCKADDR If defined, socket addresses have an sa_len field that
421                defines the length of this address.
422SAFENFSPATHCONF Set this to 1 if and only if you have verified that a
423                pathconf(2) call with _PC_CHOWN_RESTRICTED argument on an
424                NFS filesystem where the underlying system allows users to
425                give away files to other users returns <= 0.  Be sure you
426                try both on NFS V2 and V3.  Some systems assume that their
427                local policy apply to NFS servers -- this is a bad
428                assumption!  The test/t_pathconf.c program will try this
429                for you -- you have to run it in a directory that is
430                mounted from a server that allows file giveaway.
431SIOCGIFCONF_IS_BROKEN
432                Set this if your system has an SIOCGIFCONF ioctl defined,
433                but it doesn't behave the same way as "most" systems (BSD,
434                Solaris, SunOS, HP-UX, etc.)
435SIOCGIFNUM_IS_BROKEN
436                Set this if your system has an SIOCGIFNUM ioctl defined,
437                but it doesn't behave the same way as "most" systems
438                (Solaris, HP-UX).
439NEED_PERCENTQ   Set this if your system doesn't support the printf
440                format strings %lld or %llu.  If this is set, %qd and
441                %qu are used instead.
442
443
444
445+-----------------------+
446| COMPILE-TIME FEATURES |
447+-----------------------+
448
449There are a bunch of features that you can decide to compile in, such
450as selecting various database packages and special protocol support.
451Several are assumed based on other compilation flags -- if you want to
452"un-assume" something, you probably need to edit conf.h.  Compilation
453flags that add support for special features include:
454
455NDBM            Include support for "new" DBM library for aliases and maps.
456                Normally defined in the Makefile.
457NEWDB           Include support for Berkeley DB package (hash & btree)
458                for aliases and maps.  Normally defined in the Makefile.
459                If the version of NEWDB you have is the old one that does
460                not include the "fd" call (this call was added in version
461                1.5 of the Berkeley DB code), you must upgrade to the
462                current version of Berkeley DB.
463NIS             Define this to get NIS (YP) support for aliases and maps.
464                Normally defined in the Makefile.
465NISPLUS         Define this to get NIS+ support for aliases and maps.
466                Normally defined in the Makefile.
467HESIOD          Define this to get Hesiod support for aliases and maps.
468                Normally defined in the Makefile.
469NETINFO         Define this to get NeXT NetInfo support for aliases and maps.
470                Normally defined in the Makefile.
471USERDB          Define this to 1 to include support for the User Information
472                Database.  Implied by NEWDB or HESIOD.  You can use
473                -DUSERDB=0 to explicitly turn it off.
474IDENTPROTO      Define this as 1 to get IDENT (RFC 1413) protocol support.
475                This is assumed unless you are running on Ultrix or
476                HP-UX, both of which have a problem in the UDP
477                implementation.  You can define it to be 0 to explicitly
478                turn off IDENT protocol support.  If defined off, the code
479                is actually still compiled in, but it defaults off; you
480                can turn it on by setting the IDENT timeout to 30s in the
481                configuration file.
482IP_SRCROUTE     Define this to 1 to get IP source routing information
483                displayed in the Received: header.  This is assumed on
484                most systems, but some (e.g., Ultrix) apparently have a
485                broken version of getsockopt that doesn't properly
486                support the IP_OPTIONS call.  You probably want this if
487                your OS can cope with it.  Symptoms of failure will be that
488                it won't compile properly (that is, no support for fetching
489                IP_OPTIONs), or it compiles but source-routed TCP connections
490                either refuse to open or open and hang for no apparent reason.
491                Ultrix and AIX3 are known to fail this way.
492LOG             Set this to get syslog(3) support.  Defined by default
493                in conf.h.  You want this if at all possible.
494NETINET         Set this to get TCP/IP support.  Defined by default
495                in conf.h.  You probably want this.
496NETISO          Define this to get ISO networking support.
497NETUNIX         Define this to get Unix domain networking support.  Defined
498                by default.  A few bizarre systems (SCO, ISC, Altos) don't
499                support this networking domain.
500SMTP            Define this to get the SMTP code.  Implied by NETINET
501                or NETISO.
502NAMED_BIND      If non-zero, include DNS (name daemon) support, including
503                MX support.  The specs say you must use this if you run
504                SMTP.  You don't have to be running a name server daemon
505                on your machine to need this -- any use of the DNS resolver,
506                including remote access to another machine, requires this
507                option.  Defined by default in conf.h.  Define it to zero
508                ONLY on machines that do not use DNS in any way.
509QUEUE           Define this to get queueing code.  Implied by NETINET
510                or NETISO; required by SMTP.  This gives you other good
511                stuff -- it should be on.
512DAEMON          Define this to get general network support.  Implied by
513                NETINET or NETISO.  Defined by default in conf.h.  You
514                almost certainly want it on.
515MATCHGECOS      Permit fuzzy matching of user names against the full
516                name (GECOS) field in the /etc/passwd file.  This should
517                probably be on, since you can disable it from the config
518                file if you want to.  Defined by default in conf.h.
519MIME8TO7        If non-zero, include 8 to 7 bit MIME conversions.  This
520                also controls advertisement of 8BITMIME in the ESMTP
521                startup dialogue.
522MIME7TO8        If non-zero, include 7 to 8 bit MIME conversions.
523HES_GETMAILHOST Define this to 1 if you are using Hesiod with the
524                hes_getmailhost() routine.  This is included with the MIT
525                Hesiod distribution, but not with the DEC Hesiod distribution.
526XDEBUG          Do additional internal checking.  These don't cost too
527                much; you might as well leave this on.
528TCPWRAPPERS     Turns on support for the TCP wrappers library (-lwrap).
529                See below for further information.
530SECUREWARE      Enable calls to the SecureWare luid enabling/changing routines.
531                SecureWare is a C2 security package added to several UNIX's
532                (notably ConvexOS) to get a C2 Secure system.  This
533                option causes mail delivery to be done with the luid of the
534                recipient.
535SHARE_V1        Support for the fair share scheduler, version 1.  Setting to
536                1 causes final delivery to be done using the recipients
537                resource limitations.  So far as I know, this is only
538                supported on ConvexOS.
539
540
541+---------------------+
542| DNS/RESOLVER ISSUES |
543+---------------------+
544
545Many systems have old versions of the resolver library.  At a minimum,
546you should be running BIND 4.8.3; older versions may compile, but they
547have known bugs that should give you pause.
548
549Common problems in old versions include "undefined" errors for
550dn_skipname.
551
552Some people have had a problem with BIND 4.9; it uses some routines
553that it expects to be externally defined such as strerror().  It may
554help to link with "-l44bsd" to solve this problem.  This has apparently
555been fixed in later versions of BIND, starting around 4.9.3.  In other
556words, if you use 4.9.0 through 4.9.2, you need -l44bsd; for earlier or
557later versions, you do not.
558
559!PLEASE! be sure to link with the same version of the resolver as
560the header files you used -- some people have used the 4.9 headers
561and linked with BIND 4.8 or vice versa, and it doesn't work.
562Unfortunately, it doesn't fail in an obvious way -- things just
563subtly don't work.
564
565WILDCARD MX RECORDS ARE A BAD IDEA!  The only situation in which they
566work reliably is if you have two versions of DNS, one in the real world
567which has a wildcard pointing to your firewall, and a completely
568different version of the database internally that does not include
569wildcard MX records that match your domain.  ANYTHING ELSE WILL GIVE
570YOU HEADACHES!
571
572
573+-------------------------------------+
574| OPERATING SYSTEM AND COMPILE QUIRKS |
575+-------------------------------------+
576
577GCC problems
578        *****************************************************************
579        **  IMPORTANT:  DO NOT USE OPTIMIZATION (``-O'') IF YOU ARE    **
580        **  RUNNING GCC 2.4.x or 2.5.x.  THERE IS A BUG IN THE GCC     **
581        **  OPTIMIZER THAT CAUSES SENDMAIL COMPILES TO FAIL MISERABLY. **
582        *****************************************************************
583
584        Jim Wilson of Cygnus believes he has found the problem -- it will
585        probably be fixed in GCC 2.5.6 -- but until this is verified, be
586        very suspicious of gcc -O.  This problem is reported to have been
587        fixed in gcc 2.6.
588
589        A bug in gcc 2.5.5 caused problems compiling sendmail 8.6.5 with
590        optimization on a Sparc.  If you are using gcc 2.5.5, youi should
591        upgrade to the latest version of gcc.
592
593        Apparently GCC 2.7.0 on the Pentium processor has optimization
594        problems.  I recommend against using -O on that architecture.  This
595        has been seen on FreeBSD 2.0.5 RELEASE.
596
597        Solaris 2.X users should use version 2.7.2.3 over 2.7.2.
598
599        We have been told there are problems with gcc 2.8.0.  If you are
600        using this version, you should upgrade to 2.8.1 or later.
601
602GDBM    GDBM does not work with sendmail 8.8 because the additional
603        security checks and file locking cause problems.  Unfortunately,
604        gdbm does not provide a compile flag in its version of ndbm.h so
605        the code can adapt.  Until the GDBM authors can fix these problems,
606        GDBM will not be supported.  Please use Berkeley DB instead.
607
608Configuration file location
609        Up to 8.6, sendmail tried to find the sendmail.cf file in the same
610        place as the vendors had put it, even when this was obviously
611        stupid.  As of 8.7, sendmail ALWAYS looks for /etc/sendmail.cf.
612        Beginning with 8.10, sendmail will use /etc/mail/sendmail.cf.
613        You can get sendmail to use the stupid vendor .cf location by
614        adding -DUSE_VENDOR_CF_PATH during compilation, but this may break
615        support programs and scripts that need to find sendmail.cf.  You
616        are STRONGLY urged to use symbolic links if you want to use the
617        vendor location rather than changing the location in the sendmail
618        binary.
619
620SunOS 4.x (Solaris 1.x)
621        You may have to use -lresolv on SunOS.  However, beware that
622        this links in a new version of gethostbyname that does not
623        understand NIS, so you must have all of your hosts in DNS.
624
625        Some people have reported problems with the SunOS version of
626        -lresolv and/or in.named, and suggest that you get a newer
627        version.  The symptoms are delays when you connect to the
628        SMTP server on a SunOS machine or having your domain added to
629        addresses inappropriately.  There is a version of BIND
630        version 4.9 on gatekeeper.DEC.COM in pub/BSD/bind/4.9.
631
632        There is substantial disagreement about whether you can make
633        this work with resolv+, which allows you to specify a search-path
634        of services.  Some people report that it works fine, others
635        claim it doesn't work at all (including causing sendmail to
636        drop core when it tries to do multiple resolv+ lookups for a
637        single job).  I haven't tried resolv+, as we use DNS exclusively.
638
639        Should you want to try resolv+, it is on ftp.uu.net in
640        /networking/ip/dns.
641
642        Apparently getservbyname() can fail under moderate to high
643        load under some circumstances.  This will exhibit itself as
644        the message ``554 makeconnection: service "smtp" unknown''.
645        The problem has been traced to one or more blank lines in
646        /etc/services on the NIS server machine.  Delete these
647        and it should work.  This info is thanks to Brian Bartholomew
648        <bb@math.ufl.edu> of I-Kinetics, Inc.
649
650SunOS 4.0.2 (Sun 386i)
651        Date: Fri, 25 Aug 1995 11:13:58 +0200 (MET DST)
652        From: teus@oce.nl
653
654        Sendmail 8.7.Beta.12 compiles and runs nearly out of the box with the
655        following changes:
656        * Don't use /usr/5bin in your PATH, but make /usr/5bin/uname
657          available as "uname" command.
658        * Use the defines "-DBSD4_3 -DNAMED_BIND=0" in
659          BuildTools/OS/SunOS.4.0, which is selected via the "uname" command.
660        I recommend to make available the db-library on the system first
661        (and change the Makefile to use this library).
662        Note that the sendmail.cf and aliases files are found in /etc.
663
664SunOS 4.1.3, 4.1.3_U1
665        Sendmail causes crashes on SunOS 4.1.3 and 4.1.3_U1.  According
666        to Sun bug number 1077939:
667
668        If an application does a getsockopt() on a SOCK_STREAM (TCP) socket
669        after the other side of the connection has sent a TCP RESET for
670        the stream, the kernel gets a Bus Trap in the tcp_ctloutput() or
671        ip_ctloutput() routine.
672
673        For 4.1.3, this is fixed in patch 100584-08, available on the
674        Sunsolve 2.7.1 or later CDs.  For 4.1.3_U1, this was fixed in patch
675        101790-01 (SunOS 4.1.3_U1: TCP socket and reset problems), later
676        obsoleted by patch 102010-05.
677
678        Sun patch 100584-08 is not currently publicly available on their
679        ftp site but a user has reported it can be found at other sites
680        using a web search engine.
681
682Solaris 2.x (SunOS 5.x)
683        To compile for Solaris, the Makefile built by Build must
684        include a SOLARIS definition which reflects the Solaris version
685        (i.e. -DSOLARIS=20400 for 2.4 or -DSOLARIS=20501 for 2.5.1).
686        If you are using gcc, make sure -I/usr/include is not used (or
687        it might complain about TopFrame).  If you are using Sun's cc,
688        make sure /opt/SUNWspro/bin/cc is used instead of /usr/ucb/cc
689        (or it might complain about tm_zone).
690
691        To the best of my knowledge, Solaris does not have the
692        gethostbyname problem described above.  However, it does
693        have another one:
694
695        From a correspondent:
696
697           For solaris 2.2, I have
698
699                hosts:      files dns
700
701           in /etc/nsswitch.conf and /etc/hosts has to have the fully
702           qualified host name. I think "files" has to be before "dns"
703           in /etc/nsswitch.conf during bootup.
704
705        From another correspondent:
706
707           When running sendmail under Solaris, the gethostbyname()
708           hack in conf.c which should perform proper canonicalization
709           of host names could fail.  Result: the host name is not
710           canonicalized despite the hack, and you'll have to define $j
711           and $m in sendmail.cf somewhere.
712
713           The reason could be that /etc/nsswitch.conf is improperly
714           configured (at least from sendmail's point of view).  For
715           example, the line
716
717                hosts:      files nisplus dns
718
719           will make gethostbyname() look in /etc/hosts first, then ask
720           nisplus, then dns.  However, if /etc/hosts does not contain
721           the full canonicalized hostname, then no amount of
722           gethostbyname()s will work.
723
724           Solution (or rather, a workaround): Ask nisplus first, then
725           dns, then local files:
726
727                hosts:      nisplus dns [NOTFOUND=return] files
728
729        The Solaris "syslog" function is apparently limited to something
730        about 90 characters because of a kernel limitation.  If you have
731        source code, you can probably up this number.  You can get patches
732        that fix this problem: the patch ids are:
733
734                Solaris 2.1     100834
735                Solaris 2.2     100999
736                Solaris 2.3     101318
737
738        Be sure you have the appropriate patch installed or you won't
739        see system logging.
740
741Solaris 2.4 (SunOS 5.4)
742        If you include /usr/lib at the end of your LD_LIBRARY_PATH you run
743        the risk of getting the wrong libraries under some circumstances.
744        This is because of a new feature in Solaris 2.4, described by
745        Rod.Evans@Eng.Sun.COM:
746
747        >> Prior to SunOS 5.4, any LD_LIBRARY_PATH setting was ignored by the
748        >> runtime linker if the application was setxid (secure), thus your
749        >> applications search path would be:
750        >>
751        >>      /usr/local/lib  LD_LIBRARY_PATH component - IGNORED
752        >>      /usr/lib        LD_LIBRARY_PATH component - IGNORED
753        >>      /usr/local/lib  RPATH - honored
754        >>      /usr/lib        RPATH - honored
755        >>
756        >> the effect is that path 3 would be the first used, and this would
757        >> satisfy your resolv.so lookup.
758        >>
759        >> In SunOS 5.4 we made the LD_LIBRARY_PATH a little more flexible.
760        >> People who developed setxid applications wanted to be able to alter
761        >> the library search path to some degree to allow for their own
762        >> testing and debugging mechanisms.  It was decided that the only
763        >> secure way to do this was to allow a `trusted' path to be used in
764        >> LD_LIBRARY_PATH.  The only trusted directory we presently define
765        >> is /usr/lib.  Thus a setuid root developer could play with some
766        >> alternative shared object implementations and place them in
767        >> /usr/lib (being root we assume they'ed have access to write in this
768        >> directory).  This change was made as part of 1155380 - after a
769        >> *huge* amount of discussion regarding the security aspect of things.
770        >>
771        >> So, in SunOS 5.4 your applications search path would be:
772        >>
773        >>      /usr/local/lib  from LD_LIBRARY_PATH - IGNORED (untrustworthy)
774        >>      /usr/lib        from LD_LIBRARY_PATH - honored (trustworthy)
775        >>      /usr/local/lib  from RPATH - honored
776        >>      /usr/lib        from RPATH - honored
777        >>
778        >> here, path 2 would be the first used.
779
780Solaris 2.6 (SunOS 5.6)
781        If you built sendmail 8.8.1 through 8.8.4 inclusive on a Solaris 2.5
782        system, that binary will not run on Solaris 2.6, due to problems with
783        incompatible snprintf(3s) calls.  This problem is fixed in sendmail
784        8.8.5.
785
786Solaris 2.5.1 (SunOS 5.5.1) and 2.6 (SunOS 5.6)
787        Apparently Solaris 2.5.1 patch 103663-01 installs a new
788        /usr/include/resolv.h file that defines the __P macro without
789        checking to see if it is already defined.  This new resolv.h is also
790        included in the Solaris 2.6 distribution. This causes compile
791        warnings such as:
792
793           In file included from daemon.c:51:
794           /usr/include/resolv.h:208: warning: `__P' redefined
795           cdefs.h:58: warning: this is the location of the previous definition
796
797        These warnings can be safely ignored or you can create a resolv.h
798        file in the obj.SunOS.5.5.1.* or obj.SunOS.5.6.* directory that reads:
799
800           #undef __P
801           #include "/usr/include/resolv.h"
802
803        Sun is aware of the problem (Sun bug ID 4081053) and it will be fixed
804        in Solaris 2.7.
805
806Ultrix
807        By default, the IDENT protocol is turned off on Ultrix.  If you
808        are running Ultrix 4.4 or later, or if you have included patch
809        CXO-8919 for Ultrix 4.2 or 4.3 to fix the TCP problem, you can turn
810        IDENT on in the configuration file by setting the "ident" timeout
811        to 30 seconds.
812
813Digital UNIX (formerly DEC OSF/1)
814        If you are compiling on OSF/1 (DEC Alpha), you must use
815        -L/usr/shlib (otherwise it core dumps on startup).  You may also
816        need -mld to get the nlist() function, although some versions
817        apparently don't need this.
818       
819        Also, the enclosed makefile removed /usr/sbin/smtpd; if you need
820        it, just create the link to the sendmail binary.
821
822        On DEC OSF/1 3.2 or earlier, the MatchGECOS option doesn't work
823        properly due to a bug in the getpw* routines.  If you want to use
824        this, use -DDEC_OSF_BROKEN_GETPWENT=1.  The problem is fixed in 3.2C.
825
826        Digital's mail delivery agent, /bin/mail (aka /bin/binmail), will
827        only preserve the envelope sender in the "From " header if
828        DefaultUserID is set to daemon.  Setting this to mailnull will
829        cause all mail to have the header "From mailnull ...".  To use
830        a different DefaultUserID, you will need to use a different mail
831        delivery agent (such as mail.local found in the sendmail
832        distribution).
833
834        On Digital UNIX 4.0 and later, Berkeley DB 1.85 is included with the
835        operating system and already has the ndbm.o module removed.  However,
836        Digital has modified the original Berkeley DB db.h include file.
837        This results in the following warning while compiling map.c and udb.c:
838
839        cc: Warning: /usr/include/db.h, line 74: The redefinition of the macro
840         "__signed" conflicts with a current definition because the replacement
841         lists differ.  The redefinition is now in effect.
842        #define __signed        signed
843        ------------------------^
844
845        This warning can be ignored.
846
847        Digital UNIX's linker checks /usr/ccs/lib/ before /usr/lib/.
848        If you have installed a new version of BIND in /usr/include
849        and /usr/lib, you will experience difficulties as Digital ships
850        libresolv.a in /usr/ccs/lib/ as well.  Be sure to replace both
851        copies of libresolv.a.
852
853IRIX
854        The header files on SGI IRIX are completely prototyped, and as
855        a result you can sometimes get some warning messages during
856        compilation.  These can be ignored.  There are two errors in
857        deliver only if you are using gcc, both of the form ``warning:
858        passing arg N of `execve' from incompatible pointer type''.
859        Also, if you compile with -DNIS, you will get a complaint
860        about a declaration of struct dom_binding in a prototype
861        when compiling map.c; this is not important because the
862        function being prototyped is not used in that file.
863
864        In order to compile sendmail you will have had to install
865        the developers' option in order to get the necessary include
866        files.
867
868        If you compile with -lmalloc (the fast memory allocator), you may
869        get warning messages such as the following:
870
871           ld32: WARNING 85: definition of _calloc in /usr/lib32/libmalloc.so
872                preempts that definition in /usr/lib32/mips3/libc.so.
873           ld32: WARNING 85: definition of _malloc in /usr/lib32/libmalloc.so
874                preempts that definition in /usr/lib32/mips3/libc.so.
875           ld32: WARNING 85: definition of _realloc in /usr/lib32/libmalloc.so
876                preempts that definition in /usr/lib32/mips3/libc.so.
877           ld32: WARNING 85: definition of _free in /usr/lib32/libmalloc.so
878                preempts that definition in /usr/lib32/mips3/libc.so.
879           ld32: WARNING 85: definition of _cfree in /usr/lib32/libmalloc.so
880                preempts that definition in /usr/lib32/mips3/libc.so.
881
882        These are unavoidable and innocuous -- just ignore them.
883
884        According to Dave Sill <de5@ornl.gov>, there is a version of the
885        Berkeley DB library patched to run on Irix 6.2 available from
886        http://reality.sgi.com/ariel/freeware/#db .
887
888IRIX 6.x
889        It is important that on IRIX 6.x you give used ABI in command
890        line of Build, otherwise configuration script does not work
891        correctly, e.g.,
892
893                sh Build -E ABI=-n32
894
895        If you are using XFS filesystem, avoid using ABI=-32 if possible.
896
897NeXT or NEXTSTEP
898        NEXTSTEP 3.3 and earlier ship with the old DBM library.  Also,
899        Berkeley DB does not currently run on NEXTSTEP.
900
901        If you are compiling on NEXTSTEP, you will have to create an
902        empty file "unistd.h" and create a file "dirent.h" containing:
903
904                #include <sys/dir.h>
905                #define dirent  direct
906
907        (BuildTools/OS/NeXT should try to do both of these for you.)
908
909        Apparently, there is a bug in getservbyname on Nextstep 3.0
910        that causes it to fail under some circumstances with the
911        message "SYSERR: service "smtp" unknown" logged.  You should
912        be able to work around this by including the line:
913
914                OOPort=25
915
916        in your .cf file.
917
918        You may have to use -DNeXT.
919
920BSDI (BSD/386) 1.0, NetBSD 0.9, FreeBSD 1.0
921        The "m4" from BSDI won't handle the config files properly.
922        I haven't had a chance to test this myself.
923
924        The M4 shipped in FreeBSD and NetBSD 0.9 don't handle the config
925        files properly. One must use either GNU m4 1.1 or the PD-M4
926        recently posted in comp.os.386bsd.bugs (and maybe others).
927        NetBSD-current includes the PD-M4 (as stated in the NetBSD file
928        CHANGES).
929       
930        FreeBSD 1.0 RELEASE has uname(2) now. Use -DUSEUNAME in order to
931        use it (look into BuildTools/OS/FreeBSD). NetBSD-current may have
932        it too but it has not been verified.
933
934        The latest version of Berkeley DB uses a different naming
935        scheme than the version that is supplied with your release.  This
936        means you will be able to use the current version of Berkeley DB
937        with sendmail as long you use the new db.h when compiling
938        sendmail and link it against the new libdb.a.  You should probably
939        keep the original db.h in /usr/include and the new db.h in
940        /usr/local/include.
941
9424.3BSD
943        If you are running a "virgin" version of 4.3BSD, you'll have
944        a very old resolver and be missing some header files.  The
945        header files are simple -- create empty versions and everything
946        will work fine.  For the resolver you should really port a new
947        version (4.8.3 or later) of the resolver; 4.9 is available on
948        gatekeeper.DEC.COM in pub/BSD/bind/4.9.  If you are really
949        determined to continue to use your old, buggy version (or as
950        a shortcut to get sendmail working -- I'm sure you have the
951        best intentions to port a modern version of BIND), you can
952        copy ../contrib/oldbind.compat.c into src and add
953        oldbind.compat.o to OBJADD in the Makefile.
954
955A/UX
956        Date: Tue, 12 Oct 1993 18:28:28 -0400 (EDT)
957        From: "Eric C. Hagberg" <hagberg@med.cornell.edu>
958        Subject: Fix for A/UX ndbm
959
960        I guess this isn't really a sendmail bug, however, it is something
961        that A/UX users should be aware of when compiling sendmail 8.6.
962
963        Apparently, the calls that sendmail is using to the ndbm routines
964        in A/UX 3.0.x contain calls to "broken" routines, in that the
965        aliases database will break when it gets "just a little big"
966        (sorry I don't have exact numbers here, but it broke somewhere
967        around 20-25 aliases for me.), making all aliases non-functional
968        after exceeding this point.
969
970        What I did was to get the gnu-dbm-1.6 package, compile it, and
971        then re-compile sendmail with "-lgdbm", "-DNDBM", and using the
972        ndbm.h header file that comes with the gnu-package. This makes
973        things behave properly.
974          [NOTE: see comment above about GDBM]
975
976        I suppose porting the New Berkeley DB package is another route,
977        however, I made a quick attempt at it, and found it difficult
978        (not easy at least); the gnu-dbm package "configured" and
979        compiled easily.
980
981          [NOTE: Berkeley DB version 2.X runs on A/UX and can be used for
982          database maps.]
983
984SCO Unix
985        From: Thomas Essebier <tom@stallion.oz.au>
986        Organisation:  Stallion Technologies Pty Ltd.
987
988        It will probably help those who are trying to configure sendmail 8.6.9
989        to know that if they are on SCO, they had better set
990                OI-dnsrch
991        or they will core dump as soon as they try to use the resolver.
992        ie. although SCO has _res.dnsrch defined, and is kinda BIND 4.8.3, it
993        does not inititialise it, nor does it understand 'search' in
994        /etc/named.boot.
995                - sigh -
996
997        According to SCO, the m4 which ships with UnixWare 2.1.2 is broken.     
998        We recommend installing GNU m4 before attempting to build sendmail.
999
1000DG/UX
1001        Doug Anderson <dlander@afterlife.ncsc.mil> has successfully run
1002        V8 on the DG/UX 5.4.2 and 5.4R3.x platforms under heavy usage.
1003        Originally, the DG /bin/mail program wasn't compatible with
1004        the V8 sendmail, since the DG /bin/mail requires the environment
1005        variable "_FORCE_MAIL_LOCAL_=yes" be set.  Version 8.7 now includes
1006        this in the environment before invoking the local mailer.  Some
1007        have used procmail to avoid this problem in the past.  It works
1008        but some have experienced file locking problems with their DG/UX
1009        ports of procmail.
1010
1011Apollo DomainOS
1012        If you are compiling on Apollo, you will have to create an empty
1013        file "unistd.h" (for DomainOS 10.3 and earlier) and create a file
1014        "dirent.h" containing:
1015
1016                #include <sys/dir.h>
1017                #define dirent  direct
1018
1019        (BuildTools/OS/DomainOS will attempt to do both of these for you.)
1020
1021HP-UX 8.00
1022        Date: Mon, 24 Jan 1994 13:25:45 +0200
1023        From: Kimmo Suominen <Kimmo.Suominen@lut.fi>
1024        Subject: 8.6.5 w/ HP-UX 8.00 on s300
1025
1026        Just compiled and fought with sendmail 8.6.5 on a HP9000/360 (ie. a
1027        series 300 machine) running HP-UX 8.00.
1028
1029        I was getting segmentation fault when delivering to a local user.
1030        With debugging I saw it was faulting when doing _free@libc... *sigh*
1031        It seems the new implementation of malloc on s300 is buggy as of 8.0,
1032        so I tried out the one in -lmalloc (malloc(3X)).  With that it seems
1033        to work just dandy.
1034
1035        When linking, you will get the following error:
1036
1037        ld: multiply defined symbol _freespace in file /usr/lib/libmalloc.a
1038
1039        but you can just ignore it.  You might want to add this info to the
1040        README file for the future...
1041
1042Linux
1043        Something broke between versions 0.99.13 and 0.99.14 of Linux:
1044        the flock() system call gives errors.  If you are running .14,
1045        you must not use flock.  You can do this with -DHASFLOCK=0.
1046
1047        Around the inclusion of bind-4.9.3 & Linux libc-4.6.20, the
1048        initialization of the _res structure changed.  If /etc/hosts.conf
1049        was configured as "hosts, bind" the resolver code could return
1050        "Name server failure" errors.  This is supposedly fixed in
1051        later versions of libc (>= 4.6.29?), and later versions of
1052        sendmail (> 8.6.10) try to work around the problem.
1053
1054        Some older versions (< 4.6.20?) of the libc/include files conflict
1055        with sendmail's version of cdefs.h.  Deleting sendmail's version
1056        on those systems should be non-harmful, and new versions don't care.
1057
1058        Sendmail assumes that libc has snprintf, which has been true since
1059        libc 4.7.0.  If you are running an older version, you will need to
1060        use -DHASSNPRINTF=0 in the Makefile.  If may be able to use -lbsd
1061        (which includes snprintf) instead of turning this off on versions
1062        of libc between 4.4.4 and 4.7.0 (snprintf improves security, so
1063        you want to use this if at all possible).
1064
1065        NOTE ON LINUX & BIND:  By default, the Makefile generated for Linux
1066        includes header files in /usr/local/include and libraries in
1067        /usr/local/lib.  If you've installed BIND on your system, the header
1068        files typically end up in the search path and you need to add
1069        "-lresolv" to the LIBS line in your Makefile.  Really old versions
1070        may need to include "-l44bsd" as well (particularly if the link phase
1071        complains about missing strcasecmp, strncasecmp or strpbrk).
1072        Complaints about an undefined reference to `__dn_skipname' in
1073        domain.o are a sure sign that you need to add -lresolv to LIBS.
1074        Newer versions of Linux are basically threaded BIND, so you may or
1075        may not see complaints if you accidentally mix BIND
1076        headers/libraries with virginal libc.  If you have BIND headers in
1077        /usr/local/include (resolv.h, etc) you *should* be adding -lresolv
1078        to LIBS.  Data structures may change and you'd be asking for a
1079        core dump.
1080
1081        A number of problems have been reported regarding the Linux 2.2.0
1082        kernel.  So far, these problems have been tracked down to syslog()
1083        and DNS resolution.  We believe the problem is with the poll()
1084        implementation in the Linux 2.2.0 kernel and poll()-aware versions
1085        of glib (at least up to 2.0.111).
1086
1087AIX 4.2
1088        The AIX m4 implements a different mechanism for ifdef which is
1089        inconsistent with other versions of m4.  Therefore, it will not
1090        work properly with the sendmail Build architecture or m4
1091        configuration method.  To work around this problem, please use
1092        GNU m4 from ftp://ftp.gnu.org/pub/gnu/.
1093
1094AIX 3.x
1095        This version of sendmail does not support MB, MG, and MR resource
1096        records, which are supported by AIX sendmail.
1097
1098        Several people have reported that the IBM-supplied named returns
1099        fairly random results -- the named should be replaced.  It is not
1100        necessary to replace the resolver, which will simplify installation.
1101        A new BIND resolver can be found at http://www.isc.org/isc/.
1102
1103AIX 3.1.x
1104        The supplied load average code only works correctly for AIX 3.2.x.
1105        For 3.1, use -DLA_TYPE=LA_SUBR and get the latest ``monitor''
1106        package by Jussi Maki <jmaki@hut.fi> from ftp.funet.fi in the
1107        directory pub/unix/AIX/rs6000/monitor-1.12.tar.Z; use the loadavgd
1108        daemon, and the getloadavg subroutine supplied with that package.
1109        If you don't care about load average throttling, just turn off
1110        load average checking using -DLA_TYPE=LA_ZERO.
1111
1112AIX 2.2.1
1113        Date: Mon Dec  4 14:14:56 CST 1995
1114        From: Mark Whetzel <markw@antimatr.houston.tx.us>
1115        Subject: Porting sendmail 8.7.2 to AIX V2 on the RT.
1116       
1117        This version of sendmail does not support MB, MG, and MR resource
1118        records, which are supported by AIX sendmail.
1119
1120        AIX V2 on the RT does not have 'paths.h'.  Create a null
1121        file in the 'obj' directory to remove this compile error.
1122
1123        A patch file is needed to get the BSD 'db' library to compile
1124        for AIX/RT.  I have sent the necessary updates to the author,
1125        but they may not be immediately available.
1126          [NOTE: Berkeley DB version 2.X runs on AIX/RT.]
1127
1128        The original AIX/RT resolver libraries are very old, and you
1129        should get the latest BIND to replace it.  The 4.8.3 version
1130        has been tested, but 4.9.x is out and should work.
1131
1132        To make the load average code work correctly requires an
1133        external routine, as the kernel does not maintain system
1134        load averages, similar to AIX V3.1.x.  A reverse port of the
1135        older 1.05 'monitor' load average daemon code written by
1136        Jussi Maki that will work on AIX V2 for the RT is available
1137        by E-mail to Mark Whetzel  <markw@antimatr.houston.tx.us>.
1138        That code depends on an external daemon to collect system
1139        load information, and the external routine 'getloadavg',
1140        that will return that information.  The 'LA_SUBR' define
1141        will handle this for AIX V2 on the RT.
1142
1143        Note: You will have to change BuildTools/OS/AIX.2 to correctly
1144        point to the locatons of the updated BIND source tree and
1145        the location of the 'newdb' tree and library location.
1146        You will also have to change BuildTools/OS/AIX.2 to know
1147        about the location of the 'getloadavg' routine if you use
1148        the LA_SUBR define.
1149
1150       
1151        Manual pages will format correctly if given the mandoc macros
1152        and used with nroff.  I have not tried groff.
1153
1154RISC/os
1155        RISC/os from MIPS is a merged AT&T/Berkeley system.  When you
1156        compile on that platform you will get duplicate definitions
1157        on many files.  You can ignore these.
1158
1159System V Release 4 Based Systems
1160        There is a single BuildTools OS that is intended for all SVR4-based
1161        systems (built from BuildTools/OS/SVR4).  It defines __svr4__,
1162        which is predefined by some compilers.  If your compiler already
1163        defines this compile variable, you can delete the definition from
1164        the generated Makefile or create a BuildTools/Site/site.config.m4
1165        file.
1166
1167        It's been tested on Dell Issue 2.2.
1168
1169DELL SVR4
1170        Date:      Mon, 06 Dec 1993 10:42:29 EST
1171        From: "Kimmo Suominen" <kim@grendel.lut.fi>
1172        Message-ID: <2d0352f9.lento29@lento29.UUCP>
1173        To: eric@cs.berkeley.edu
1174        Cc: sendmail@cs.berkeley.edu
1175        Subject:   Notes for DELL SVR4
1176
1177        Eric,
1178
1179        Here are some notes for compiling Sendmail 8.6.4 on DELL SVR4.  I ran
1180        across these things when helping out some people who contacted me by
1181        e-mail.
1182
1183        1) Use gcc 2.4.5 (or later?).  Dell distributes gcc 2.1 with their
1184           Issue 2.2 Unix.  It is too old, and gives you problems with
1185           clock.c, because sigset_t won't get defined in <sys/signal.h>.
1186           This is due to a problematic protection rule in there, and is
1187           fixed with gcc 2.4.5.
1188
1189        2) If you don't use the new Berkeley DB (-DNEWDB), then you need
1190           to add "-lc -lucb" to the libraries to link with.  This is because
1191           the -ldbm distributed by Dell needs the bcopy, bcmp and bzero
1192           functions.  It is important that you specify both libraries in
1193           the given order to be sure you only get the BSTRING functions
1194           from the UCB library (and not the signal routines etc.).
1195
1196        3) Don't leave out "-lelf" even if compiling with "-lc -lucb".
1197           The UCB library also has another copy of the nlist routines,
1198           but we do want the ones from "-lelf".
1199
1200        If anyone needs a compiled gcc 2.4.5 and/or a ported DB library, they
1201        can use anonymous ftp to fetch them from lut.fi in the /kim directory.
1202        They are copies of what I use on grendel.lut.fi, and offering them
1203        does not imply that I would also support them.  I have sent the DB
1204        port for SVR4 back to Keith Bostic for inclusion in the official
1205        distribution, but I haven't heard anything from him as of today.
1206
1207        - gcc-2.4.5-svr4.tar.gz (gcc 2.4.5 and the corresponding libg++)
1208        - db-1.72.tar.gz        (with source, objects and a installed copy)
1209
1210        Cheers
1211        + Kim
1212        --
1213         *  Kimmo.Suominen@lut.fi  *  SysVr4 enthusiast at GRENDEL.LUT.FI  *
1214        *    KIM@FINFILES.BITNET   *  Postmaster and Hostmaster at LUT.FI   *
1215         *    + 358 200 865 718    *  Unix area moderator at NIC.FUNET.FI  *
1216
1217ConvexOS 10.1 and below
1218        In order to use the name server, you must create the file
1219        /etc/use_nameserver.  If this file does not exist, the call
1220        to res_init() will fail and you will have absolutely no
1221        access to DNS, including MX records.
1222
1223Amdahl UTS 2.1.5
1224        In order to get UTS to work, you will have to port BIND 4.9.
1225        The vendor's BIND is reported to be ``totally inadequate.''
1226        See sendmail/contrib/AmdahlUTS.patch for the patches necessary
1227        to get BIND 4.9 compiled for UTS.
1228
1229UnixWare
1230        According to Alexander Kolbasov <sasha@unitech.gamma.ru>,
1231        the m4 on UnixWare 2.0 (still in Beta) will core dump on the
1232        config files.  GNU m4 and the m4 from UnixWare 1.x both work.
1233
1234        According to Larry Rosenman <ler@lerami.lerctr.org>:
1235
1236                UnixWare 2.1.[23]'s m4 chokes (not obviously) when
1237                processing the 8.9.0 cf files.
1238 
1239                I had a LOCAL_RULE_0 that wound up AFTER the
1240                SBasic_check_rcpt rules using the SCO supplied M4.
1241                GNU M4 works fine.
1242
1243UNICOS 8.0.3.4
1244        Some people have reported that the -O flag on UNICOS can cause
1245        problems.  You may want to turn this off if you have problems
1246        running sendmail.  Reported by Jerry G. DeLapp <jgd@acl.lanl.gov>.
1247
1248GNU getopt
1249        I'm told that GNU getopt has a problem in that it gets confused
1250        by the double call.  Use the version in conf.c instead.
1251
1252BIND 4.9.2 and Ultrix
1253        If you are running on Ultrix, be sure you read conf/Info.Ultrix
1254        in the BIND distribution very carefully -- there is information
1255        in there that you need to know in order to avoid errors of the
1256        form:
1257
1258                /lib/libc.a(gethostent.o): sethostent: multiply defined
1259                /lib/libc.a(gethostent.o): endhostent: multiply defined
1260                /lib/libc.a(gethostent.o): gethostbyname: multiply defined
1261                /lib/libc.a(gethostent.o): gethostbyaddr: multiply defined
1262
1263        during the link stage.
1264
1265strtoul
1266        Some compilers (notably gcc) claim to be ANSI C but do not
1267        include the ANSI-required routine "strtoul".  If your compiler
1268        has this problem, you will get an error in srvrsmtp.c on the
1269        code:
1270
1271          # ifdef defined(__STDC__) && !defined(BROKEN_ANSI_LIBRARY)
1272                        e->e_msgsize = strtoul(vp, (char **) NULL, 10);
1273          # else
1274                        e->e_msgsize = strtol(vp, (char **) NULL, 10);
1275          # endif
1276
1277        You can use -DBROKEN_ANSI_LIBRARY to get around this problem.
1278
1279Listproc 6.0c
1280        Date: 23 Sep 1995 23:56:07 GMT
1281        Message-ID: <95925101334.~INN-AUMa00187.comp-news@dl.ac.uk>
1282        From: alansz@mellers1.psych.berkeley.edu (Alan Schwartz)
1283        Subject: Listproc 6.0c + Sendmail 8.7 [Helpful hint]
1284
1285        Just upgraded to sendmail 8.7, and discovered that listproc 6.0c
1286        breaks, because it, by default, sends a blank "HELO" rather than
1287        a "HELO hostname" when using the 'system' or 'telnet' mailmethod.
1288
1289        The fix is to include -DZMAILER in the compilation, which will
1290        cause it to use "HELO hostname" (which Z-mail apparently requires
1291        as well. :)
1292
1293LDAP
1294        LDAP was provided by Booker Bense <bbense+ldap@stanford.edu> of
1295        Stanford University.  From Booker:
1296
1297          - The patch attached to this message implements an Ldap map class.
1298            Currently we are using this at stanford to support campus-wide
1299            email addressing. More information can be found at
1300            http://www.stanford.edu/~bbense/Inst.html.
1301
1302          - Currently we are using the ldap map as follows:
1303
1304                Kluser ldapx
1305                    -h"localhost borax.stanford.edu borate.stanford.edu boron.stanford.edu"
1306                    -k"mailacceptinggeneralid=%s" -v maildrop
1307
1308            and in Rule set S5
1309
1310                # Now attempt to lookup in luser (ldap map)
1311                R< $L > $+              $: < $L > $( luser $1 $)
1312                R< $*  > $+ @ $+        $: < $3 > $2            Rewrite if forward
1313
1314          - The map definition supports most of the standard Map args plus most
1315            of the command line options of ldapsearch. The software is currently
1316            limited to only accepting the first entry returned. It expects that
1317            the map defines an ldap filter that returns at most 1 valid entry.
1318            It requires the ldap and lber libraries from the Umich Ldap3.2
1319            release.
1320
1321            The software has been in production on Solaris.2.5.1 at Stanford
1322            for over 2 years.
1323
1324        The LDAP map supports both the UMich LDAP 3.2 and 3.3 libraries as
1325        well as the OpenLDAP (http://www.openldap.org/) libraries.
1326
1327TCP Wrappers
1328        If you are using -DTCPWRAPPERS to get TCP Wrappers support you will
1329        also need to install libwrap.a and modify your site.config.m4 file
1330        or the generated Makefile to include -lwrap in the LIBS line
1331        (make sure that INCDIRS and LIBDIRS point to where the tcpd.h and
1332        libwrap.a can be found).
1333
1334        TCP Wrappers is available on ftp.win.tue.nl in /pub/security;
1335        grab tcp_wrappers_<VER>.tar.gz (where <VER> is the highest
1336        numbered version).
1337
1338        If you have alternate MX sites for your site, be sure that all of
1339        your MX sites reject the same set of hosts.  If not, a bad guy whom
1340        you reject will connect to your site, fail, and move on to the next
1341        MX site, which will accept the mail for you and forward it on to you.
1342
1343Regular Expressions (MAP_REGEX)
1344        If sendmail linking fails with:
1345
1346                undefined reference to 'regcomp'
1347
1348        or sendmail gives an error about a regular expression with:
1349
1350                pattern-compile-error: : Operation not applicable
1351
1352        Your libc does not include a running version of POSIX-regex. Use
1353        librx or regex.o from the GNU Free Software Foundation, 
1354        ftp://ftp.gnu.org/pub/gnu/rx-?.?.tar.gz or
1355        ftp://ftp.gnu.org/pub/gnu/regex-?.?.tar.gz.
1356        You can also use the regex-lib by Henry Spencer,
1357        ftp://ftp.funet.fi/pub/languages/C/spencer/regex.shar.gz 
1358        Make sure, your compiler reads regex.h from the distribution, 
1359        not from /usr/include, otherwise sendmail will dump a core.
1360
1361
1362+--------------+
1363| MANUAL PAGES |
1364+--------------+
1365
1366The manual pages have been written against the -mandoc macros
1367instead of the -man macros.  The latest version of groff has them
1368included.  You can also get a copy from FTP.UU.NET in the directory
1369/systems/unix/bsd-sources/share/tmac.  groff is available from
1370ftp.gnu.org in the /pub/gnu directory.
1371
1372
1373+-----------------+
1374| DEBUGGING HOOKS |
1375+-----------------+
1376
1377As of 8.6.5, sendmail daemons will catch a SIGUSR1 signal and log
1378some debugging output (logged at LOG_DEBUG severity).  The
1379information dumped is:
1380
1381 * The value of the $j macro.
1382 * A warning if $j is not in the set $=w.
1383 * A list of the open file descriptors.
1384 * The contents of the connection cache.
1385 * If ruleset 89 is defined, it is evaluated and the results printed.
1386
1387This allows you to get information regarding the runtime state of the
1388daemon on the fly.  This should not be done too frequently, since
1389the process of rewriting may lose memory which will not be recovered.
1390Also, ruleset 89 may call non-reentrant routines, so there is a small
1391non-zero probability that this will cause other problems.  It is
1392really only for debugging serious problems.
1393
1394A typical formulation of ruleset 89 would be:
1395
1396        R$*             $@ $>0 some test address
1397
1398
1399+-----------------------------+
1400| DESCRIPTION OF SOURCE FILES |
1401+-----------------------------+
1402
1403The following list describes the files in this directory:
1404
1405Makefile.m4     A template for constructing a makefile based on the
1406                information in the BuildTools directory.
1407README          This file.
1408TRACEFLAGS      My own personal list of the trace flags -- not guaranteed
1409                to be particularly up to date.
1410alias.c         Does name aliasing in all forms.
1411arpadate.c      A subroutine which creates ARPANET standard dates.
1412clock.c         Routines to implement real-time oriented functions
1413                in sendmail -- e.g., timeouts.
1414collect.c       The routine that actually reads the mail into a temp
1415                file.  It also does a certain amount of parsing of
1416                the header, etc.
1417conf.c          The configuration file.  This contains information
1418                that is presumed to be quite static and non-
1419                controversial, or code compiled in for efficiency
1420                reasons.  Most of the configuration is in sendmail.cf.
1421conf.h          Configuration that must be known everywhere.
1422convtime.c      A routine to sanely process times.
1423daemon.c        Routines to implement daemon mode.  This version is
1424                specifically for Berkeley 4.1 IPC.
1425deliver.c       Routines to deliver mail.
1426domain.c        Routines that interface with DNS (the Domain Name
1427                System).
1428err.c           Routines to print error messages.
1429envelope.c      Routines to manipulate the envelope structure.
1430headers.c       Routines to process message headers.
1431macro.c         The macro expander.  This is used internally to
1432                insert information from the configuration file.
1433main.c          The main routine to sendmail.  This file also
1434                contains some miscellaneous routines.
1435map.c           Support for database maps.
1436mci.c           Routines that handle mail connection information caching.
1437mime.c          MIME conversion routines.
1438parseaddr.c     The routines which do address parsing.
1439queue.c         Routines to implement message queueing.
1440readcf.c        The routine that reads the configuration file and
1441                translates it to internal form.
1442recipient.c     Routines that manipulate the recipient list.
1443safefile.c      Routines to do careful checking of file modes and permissions
1444                when opening or creating files.
1445savemail.c      Routines which save the letter on processing errors.
1446sendmail.h      Main header file for sendmail.
1447snprintf.c      Routines to manipulate strings but prevent buffer overflows.
1448srvrsmtp.c      Routines to implement server SMTP.
1449stab.c          Routines to manage the symbol table.
1450stats.c         Routines to collect and post the statistics.
1451sysexits.c      List of error messages associated with error codes
1452                in sysexits.h.
1453trace.c         The trace package.  These routines allow setting and
1454                testing of trace flags with a high granularity.
1455udb.c           The user database interface module.
1456usersmtp.c      Routines to implement user SMTP.
1457util.c          Some general purpose routines used by sendmail.
1458version.c       The version number and information about this
1459                version of sendmail.  Theoretically, this gets
1460                modified on every change.
1461
1462Eric Allman
1463
1464(Version 8.211, last update 2/2/1999 15:28:18)
Note: See TracBrowser for help on using the repository browser.