1# Copyright (c) 1983 Eric P. Allman 2# Copyright (c) 1988 The Regents of the University of California. 3# All rights reserved. 4# 5# %sccs.include.redist.sh% 6# 7# @(#)READ_ME 8.71 (Berkeley) 09/09/94 8# 9 10This directory contains the source files for sendmail. 11 12For detailed instructions, please read the document ../doc/op.me: 13 14 eqn ../doc/op.me | pic | ditroff -me 15 16The Makefile is for the new (4.4BSD) Berkeley make and uses syntax 17that is not recognized by older makes. It also has assumptions 18about the 4.4 file system layout built in. See below for details 19about other Makefiles. 20 21There is also a Makefile.dist which is much less clever, but works on 22the old traditional make. You can use this using: 23 24 make -f Makefile.dist 25 26************************************************** 27** Read below for more details of Makefiles. ** 28************************************************** 29 30There is also a shell script (makesendmail) that tries to be clever 31about using object subdirectories. It's pretty straightforward, and 32may help if you share a source tree among different architectures. 33 34************************************************************************** 35** IMPORTANT: DO NOT USE OPTIMIZATION (``-O'') IF YOU ARE RUNNING ** 36** GCC 2.4.x or 2.5.x. THERE IS A BUG IN THE GCC OPTIMIZER THAT ** 37** CAUSES SENDMAIL COMPILES TO FAIL MISERABLY. ** 38************************************************************************** 39 40Jim Wilson of Cygnus believes he has found the problem -- it will 41probably be fixed in GCC 2.5.6 -- but until this is verified, be 42very suspicious of gcc -O. 43 44************************************************************************** 45** IMPORTANT: Read the appropriate paragraphs in the section on ** 46** ``Operating System and Compile Quirks''. ** 47************************************************************************** 48 49 50+-----------+ 51| MAKEFILES | 52+-----------+ 53 54The "Makefile"s in these directories are from 4.4 BSD, and hence 55really only work properly if you are on a 4.4 system. In particular, 56they use new syntax that will not be recognized on old make programs, 57and some of them do things like ``.include ../../Makefile.inc'' to 58pick up some system defines. If you are getting sendmail separately, 59these files won't be included in the distribution, as they are 60outside of the sendmail tree. 61 62Instead, you should use one of the other Makefiles, such as 63Makefile.SunOS for a SunOS system, and so forth. These should 64work with the version of make that is appropriate for that 65system. 66 67There are a bunch of other Makefiles for other systems with names 68like Makefile.HPUX for an HP-UX system. They use the version of 69make that is native for that system. These are the Makefiles that 70I use, and they have "Berkeley quirks" in them. I can't guarantee 71that they will work unmodified in your environment. Many of them 72include -I/usr/sww/include/db and -L/usr/sww/lib -- this is Berkeley's 73location (the ``Software Warehouse'') for the new database libraries, 74described below. You don't have to remove these definitions if you 75don't have these directories. 76 77Please look for an appropriate Makefile before you start trying to 78compile with Makefile or Makefile.dist. 79 80If you want to port the new Berkeley make, you can get it from 81ftp.uu.net in the directory /systems/unix/bsd-sources/usr.bin/make. 82Diffs and instructions for building this version of make under 83SunOS 4.1.x are available on ftp.css.itd.umich.edu in 84/pub/systems/sun/Net2-make.sun4.diff.Z. Diffs and instructions 85for building this version of make under IBM AIX 3.2.4 are available 86on ftp.uni-stuttgart.de in /sw/src/patches/bsd-make-rus-patches. 87For Ultrix, try ftp.vix.com:~ftp/pub/patches/pmake-for-ultrix.Z. 88Paul Southworth <pauls@umich.edu> published a description of porting 89this make in comp.unix.bsd. 90 91The complete text of the Makefile.inc that is in the parent of the 92sendmail directory is: 93 94 # @(#)Makefile.inc 8.1 (Berkeley) 6/6/93 95 96 BINDIR?= /usr/sbin 97 98 99+----------------------+ 100| DATABASE DEFINITIONS | 101+----------------------+ 102 103There are several database formats that can be used for the alias files 104and for general maps. When used for alias files they interact in an 105attempt to be back compatible. 106 107The three options are NEWDB (the new Berkeley DB package), NDBM (the 108older DBM implementation -- the very old V7 implementation is no 109longer supported), and NIS (Network Information Services). Used alone 110these just include the support they indicate. [If you are using NEWDB, 111get the latest version from FTP.CS.Berkeley.EDU in /ucb/4bsd. DO NOT 112use the version from the Net2 distribution! However, if you are on 113BSD/386 or 386BSD-based systems, use the one that already exists 114on your system. You may need to #define OLD_NEWDB 1 to do this.] 115 116[NOTE WELL: it is CRITICAL that you remove ndbm.o from libdb.a and 117ndbm.h from the appropriate include directories if you want to get 118ndbm support. These files OVERRIDE calls to ndbm routines -- in 119particular, if you leave ndbm.h in, you can find yourself using 120the new db package even if you don't define NEWDB.] 121 122If NEWDB and NDBM are defined (but not NIS), then sendmail will read 123NDBM format alias files, but the next time a newaliases is run the 124format will be converted to NEWDB; that format will be used forever 125more. This is intended as a transition feature. [Note however that 126the NEWDB library also catches and maps NDBM calls; you will have to 127back out this feature to get this to work. See ``Quirks'' section 128below for details.] 129 130If all three are defined, sendmail operates as described above, and also 131looks for the file /var/yp/Makefile. If it exists, newaliases will 132build BOTH the NEWDB and NDBM format alias files. However, it will 133only use the NEWDB file; the NDBM format file is used only by the 134NIS subsystem. 135 136If NDBM and NIS are defined (regardless of the definition of NEWDB 137or the existance of /var/yp/Makefile), sendmail adds the special 138tokens "YP_LAST_MODIFIED" and "YP_MASTER_NAME", both of which are 139required if the NDBM file is to be used as an NIS map. 140 141All of -DNEWDB, -DNDBM, and -DNIS are normally defined in the DBMDEF 142line in the Makefile. 143 144 145+---------------+ 146| COMPILE FLAGS | 147+---------------+ 148 149Whereever possible, I try to make sendmail pull in the correct 150compilation options needed to compile on various environments based on 151automatically defined symbols. Some machines don't seem to have useful 152symbols availble, requiring the following compilation flags in the 153Makefile: 154 155SOLARIS Define this if you are running Solaris 2.0 or higher. 156SOLARIS_2_3 Define this if you are running Solaris 2.3 or higher. 157SUNOS403 Define this if you are running SunOS 4.0.3. 158NeXT Define this if you are on a NeXT box. (This one may 159 be pre-defined for you.) There are other hacks you 160 have to make -- see below. 161_AIX3 Define this if you are IBM AIX 3.x. 162RISCOS Define this if you are running RISC/os from MIPS. 163IRIX Define this if you are running IRIX from SGI. 164_SCO_unix_ Define this if you are on SCO UNIX. 165_SCO_unix_4_2 Define this if you are on SCO Open Server 3.2v4. 166DGUX Define this if you are on DG/UX 5.4.3 or later 167DGUX_5_4_2 Define this if you are on DG/UX systems prior to 5.4.3. 168NonStop_UX_BXX Define this if you are on a Tandem NonStop-UX release 169 Bxx system. 170 171If you are a system that sendmail has already been ported to, you 172probably won't have to touch these. But if you are porting, you may 173have to tweak the following compilation flags in conf.h in order to 174get it to compile and link properly: 175 176SYSTEM5 Adjust for System V (not necessarily Release 4). 177SYS5SIGNALS Use System V signal semantics -- the signal handler 178 is automatically dropped when the signal is caught. 179 If this is not set, use POSIX/BSD semantics, where the 180 signal handler stays in force until an exec or an 181 explicit delete. Implied by SYSTEM5. 182SYS5SETPGRP Use System V setpgrp() semantics. Implied by SYSTEM5. 183HASFLOCK Set this if you prefer to use the flock(2) system call 184 rather than using fcntl-based locking. Fcntl locking 185 has some semantic gotchas, but many vendor systems 186 also interface it to lockd(8) to do NFS-style locking. 187 For this reason, this should not be set unless you 188 don't have an alternative. 189HASUNAME Set if you have the "uname" system call. Implied by 190 SYSTEM5. 191HASUNSETENV Define this if your system library has the "unsetenv" 192 subroutine. 193HASSETSID Define this if you have the setsid(2) system call. This 194 is implied if your system appears to be POSIX compliant. 195HASINITGROUPS Define this if you have the initgroups(3) routine. 196HASSETVBUF Define this if you have the setvbuf(3) library call. 197 If you don't, setlinebuf will be used instead. This 198 defaults on if your compiler defines __STDC__. 199HASSETREUID Define this if you have setreuid(2) ***AND*** root can 200 use setreuid to change to an arbitrary user. This second 201 condition is not satisfied on AIX 3.x. You may find that 202 your system has setresuid(2), (for example, on HP-UX) in 203 which case you will also have to #define setreuid(r, e) 204 to be the appropriate call. Some systems (such as Solaris) 205 have a compatibility routine that doesn't work properly, 206 but may have "saved user ids" properly implemented so you 207 can ``#define setreuid(r, e) seteuid(e)'' and have it work. 208 The important thing is that you have a call that will set 209 the effective uid independently of the real or saved uid 210 and be able to set the effective uid back again when done. 211 There's a test program in ../test/t_setreuid.c that will 212 try things on your system. Setting this improves the 213 security, since sendmail doesn't have to read .forward 214 and :include: files as root. There are certain attacks 215 that may be unpreventable without this call. 216HASLSTAT Define this if you have symbolic links (and thus the 217 lstat(2) system call). This improves security. Unlike 218 most other options, this one is on by default, so you 219 need to #undef it in conf.h if you don't have symbolic 220 links (these days everyone does). 221HASSETRLIMIT Define this to 1 if you have the setrlimit(2) syscall. 222 You can define it to 0 to force it off. It is assumed 223 if you are running a BSD-like system. 224HASULIMIT Define this if you have the ulimit(2) syscall (System V 225 style systems). HASSETRLIMIT overrides, as it is more 226 general. 227NEEDGETOPT Define this if you need a reimplementation of getopt(3). 228 On some systems, getopt does very odd things if called 229 to scan the arguments twice. This flag will ask sendmail 230 to compile in a local version of getopt that works 231 properly. 232NEEDSTRTOL Define this if your standard C library does not define 233 strtol(3). This will compile in a local version. 234NEEDVPRINTF Define this if your standard C library does not define 235 vprintf(3). Note that the resulting fake implementation 236 is not very elegant and may not even work on some 237 architectures. 238NEEDFSYNC Define this if your standard C library does not define 239 fsync(2). This will try to simulate the operation using 240 fcntl(2); if that is not available it does nothing, which 241 isn't great, but at least it compiles and runs. 242HASGETUSERSHELL Define this to 1 if you have getusershell(3) in your 243 standard C library. If this is not defined, or is defined 244 to be 0, sendmail will scan the /etc/shells file (no 245 NIS-style support, defaults to /bin/sh and /bin/csh if 246 that file does not exist) to get a list of unrestricted 247 user shells. This is used to determine whether users 248 are allowed to forward their mail to a program or a file. 249GIDSET_T The type of entries in a gidset passed as the second 250 argument to getgroups(2). Historically this has been an 251 int, so this is the default, but some systems (such as 252 IRIX) pass it as a gid_t, which is an unsigned short. 253 This will make a difference, so it is important to get 254 this right! However, it is only an issue if you have 255 group sets. 256SLEEP_T The type returned by the system sleep() function. 257 Defaults to "unsigned int". Don't worry about this 258 if you don't have compilation problems. 259ARBPTR_T The type of an arbitrary pointer -- defaults to "void *". 260 If you are an very old compiler you may need to define 261 this to be "char *". 262LA_TYPE The type of load average your kernel supports. These 263 can be one of: 264 LA_ZERO (1) -- it always returns the load average as 265 "zero" (and does so on all architectures). 266 LA_SUBR (4) if you have the getloadavg(3) routine, 267 LA_MACH (5) to use MACH-style load averages (calls 268 processor_set_info()), 269 LA_PROCSTR (7) to read /proc/loadavg and interpret it 270 as a string representing a floating-point 271 number (Linux-style), 272 LA_FLOAT (3) if you read kmem and interpret the value 273 as a floating point number, 274 LA_INT (2) to interpret as a long integer, 275 LA_SHORT (6) to interpret as a short integer. 276 These last three have several other parameters that they 277 try to divine: the name of your kernel, the name of the 278 variable in the kernel to examine, the number of bits of 279 precision in a fixed point load average, and so forth. 280 In desperation, use LA_ZERO. The actual code is in 281 conf.c -- it can be tweaked if you are brave. 282SFS_TYPE Encodes how your kernel can locate the amount of free 283 space on a disk partition. This can be set to SFS_NONE 284 (0) if you have no way of getting this information, 285 SFS_USTAT (1) if you have the ustat(2) system call, 286 SFS_4ARGS (2) if you have a four-argument statfs(2) 287 system call (and the include file is <sys/statfs.h>), 288 SFS_VFS (3), SFS_MOUNT (4), SFS_STATFS (5) if you have 289 the two-argument statfs(2) system call with includes in 290 <sys/vfs.h>, <sys/mount.h>, or <sys/statfs.h> respectively, 291 or SFS_STATVFS (6) if you have the two-argument statvfs(2) 292 call. The default if nothing is defined is SFS_NONE. 293SPT_TYPE Encodes how your system can display what a process is doing 294 on a ps(1) command (SPT stands for Set Process Title). Can 295 be set to: 296 SPT_NONE (0) -- Don't try to set the process title at all. 297 SPT_REUSEARGV (1) -- Pad out your argv with the information; 298 this is the default if none specified. 299 SPT_BUILTIN (2) -- The system library has setproctitle. 300 SPT_PSTAT (3) -- Use the PSTAT_SETCMD option to pstat(2) 301 to set the process title; this is used by HP-UX. 302 SPT_PSSTRINGS (4) -- Use the magic PS_STRINGS pointer (4.4BSD). 303SPT_PADCHAR Character used to pad the process title; if undefined, 304 the space character (0x20) is used. This is ignored if 305 SPT_TYPE != SPT_REUSEARGV 306ERRLIST_PREDEFINED 307 If set, assumes that some header file defines sys_errlist. 308 This may be needed if you get type conflicts on this 309 variable -- otherwise don't worry about it. 310WAITUNION The wait(2) routine takes a "union wait" argument instead 311 of an integer argument. This is for compatibility with 312 old versions of BSD. 313SCANF You can set this to extend the F command to accept a 314 scanf string -- this gives you a primitive parser for 315 class definitions -- BUT it can make you vulnerable to 316 core dumps if the target file is poorly formed. 317SYSLOG_BUFSIZE You can define this to be the size of the buffer that 318 syslog accepts. If it is not defined, it assumes a 319 1024-byte buffer. If the buffer is very small (under 320 256 bytes) the log message format changes -- each 321 e-mail message will log many more messages, since it 322 will log each piece of information as a separate line 323 in syslog. 324BROKEN_RES_SEARCH 325 On Ultrix (and maybe other systems?) if you use the 326 res_search routine with an unknown host name, it returns 327 -1 but sets h_errno to 0 instead of HOST_NOT_FOUND. If 328 you set this, sendmail considers 0 to be the same as 329 HOST_NOT_FOUND. 330NAMELISTMASK If defined, values returned by nlist(3) are masked 331 against this value before use -- a common value is 332 0x7fffffff to strip off the top bit. 333 334 335 336+-----------------------+ 337| COMPILE-TIME FEATURES | 338+-----------------------+ 339 340There are a bunch of features that you can decide to compile in, such 341as selecting various database packages and special protocol support. 342Several are assumed based on other compilation flags -- if you want to 343"un-assume" something, you probably need to edit conf.h. Compilation 344flags that add support for special features include: 345 346NDBM Include support for "new" DBM library for aliases and maps. 347 Normally defined in the Makefile. 348NEWDB Include support for Berkeley "db" package (hash & btree) 349 for aliases and maps. Normally defined in the Makefile. 350OLD_NEWDB If non-zero, the version of NEWDB you have is the old 351 one that does not include the "fd" call. This call was 352 added in version 1.5 of the Berkeley DB code. If you 353 use -DOLD_NEWDB=0 it forces you to use the new interface. 354NIS Define this to get NIS (YP) support for aliases and maps. 355 Normally defined in the Makefile. 356USERDB Include support for the User Information Database. Implied 357 by NEWDB in conf.h. 358IDENTPROTO Define this as 1 to get IDENT (RFC 1413) protocol support. 359 This is assumed unless you are running on Ultrix or 360 HP-UX, both of which have a problem in the UDP 361 implementation. You can define it to be 0 to explicitly 362 turn off IDENT protocol support. 363MIME Include support for MIME-encapsulated error messages. 364LOG Set this to get syslog(3) support. Defined by default 365 in conf.h. You want this if at all possible. 366NETINET Set this to get TCP/IP support. Defined by default 367 in conf.h. You probably want this. 368NETISO Define this to get ISO networking support. 369SMTP Define this to get the SMTP code. Implied by NETINET 370 or NETISO. 371NAMED_BIND Define this to get DNS (name daemon) support, including 372 MX support. The specs you must use this if you run 373 SMTP. Defined by default in conf.h. 374QUEUE Define this to get queueing code. Implied by NETINET 375 or NETISO; required by SMTP. This gives you other good 376 stuff -- it should be on. 377DAEMON Define this to get general network support. Implied by 378 NETINET or NETISO. Defined by default in conf.h. You 379 almost certainly want it on. 380MATCHGECOS Permit fuzzy matching of user names against the full 381 name (GECOS) field in the /etc/passwd file. This should 382 probably be on, since you can disable it from the config 383 file if you want to. Defined by default in conf.h. 384 385 386+---------------------+ 387| DNS/RESOLVER ISSUES | 388+---------------------+ 389 390Many systems have old versions of the resolver library. At a minimum, 391you should be running BIND 4.8.3; older versions may compile, but they 392have known bugs that should give you pause. 393 394Common problems in old versions include "undefined" errors for 395dn_skipname. 396 397Some people have had a problem with BIND 4.9; it uses some routines 398that it expects to be externally defined such as strerror(). It may 399help to link with "-l44bsd" to solve this problem. 400 401!PLEASE! be sure to link with the same version of the resolver as 402the header files you used -- some people have used the 4.9 headers 403and linked with BIND 4.8 or vice versa, and it doesn't work. 404Unfortunately, it doesn't fail in an obvious way -- things just 405subtly don't work. 406 407 408+-------------------------------------+ 409| OPERATING SYSTEM AND COMPILE QUIRKS | 410+-------------------------------------+ 411 412GCC 2.5.x problems *** IMPORTANT *** 413 Date: Mon, 29 Nov 93 19:08:44 PST 414 From: wilson@cygnus.com (Jim Wilson) 415 Message-Id: <9311300308.AA04608@cygnus.com> 416 To: kenner@vlsi1.ultra.nyu.edu 417 Subject: [cattelan@thebarn.com: gcc 2.5.4-2.5.5 -O bug] 418 Cc: cattelan@thebarn.com, rms@gnu.ai.mit.edu, sendmail@cs.berkeley.edu 419 420 This fixes a problem that occurs when gcc 2.5.5 is used to compile 421 sendmail 8.6.4 with optimization on a sparc. 422 423 Mon Nov 29 19:00:14 1993 Jim Wilson (wilson@sphagnum.cygnus.com) 424 425 * reload.c (find_reloads_toplev): Replace obsolete reference to 426 BYTE_LOADS_*_EXTEND with LOAD_EXTEND_OP. 427 428 *** clean-ss-931128/reload.c Sun Nov 14 16:20:01 1993 429 --- ss-931128/reload.c Mon Nov 29 18:52:55 1993 430 *************** find_reloads_toplev (x, opnum, type, ind 431 *** 3888,3894 **** 432 force a reload in that case. So we should not do anything here. */ 433 434 else if (regno >= FIRST_PSEUDO_REGISTER 435 ! #if defined(BYTE_LOADS_ZERO_EXTEND) || defined(BYTE_LOADS_SIGN_EXTEND) 436 && (GET_MODE_SIZE (GET_MODE (x)) 437 <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) 438 #endif 439 --- 3888,3894 ---- 440 force a reload in that case. So we should not do anything here. */ 441 442 else if (regno >= FIRST_PSEUDO_REGISTER 443 ! #ifdef LOAD_EXTEND_OP 444 && (GET_MODE_SIZE (GET_MODE (x)) 445 <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) 446 #endif 447 448 449SunOS 4.x (Solaris 1.x) 450 You may have to use -lresolv on SunOS. However, beware that 451 this links in a new version of gethostbyname that does not 452 understand NIS, so you must have all of your hosts in DNS. 453 454 Some people have reported problems with the SunOS version of 455 -lresolv and/or in.named, and suggest that you get a newer 456 version. The symptoms are delays when you connect to the 457 SMTP server on a SunOS machine or having your domain added to 458 addresses inappropriately. There is a version of BIND 459 version 4.9 on gatekeeper.DEC.COM in pub/BSD/bind/4.9. 460 461 There is substantial disagreement about whether you can make 462 this work with resolv+, which allows you to specify a search-path 463 of services. Some people report that it works fine, others 464 claim it doesn't work at all (including causing sendmail to 465 drop core when it tries to do multiple resolv+ lookups for a 466 single job). I haven't tried resolv+, as we use DNS exclusively. 467 468 Should you want to try resolv+, it is on ftp.uu.net in 469 /networking/ip/dns. 470 471 Apparently getservbyname() can fail under moderate to high 472 load under some circumstances. This will exhibit itself as 473 the message ``554 makeconnection: service "smtp" unknown''. 474 The problem has been traced to one or more blank lines in 475 /etc/services on the NIS server machine. Delete these 476 and it should work. This info is thanks to Brian Bartholomew 477 <bb@math.ufl.edu> of I-Kinetics, Inc. 478 479Solaris 2.x (SunOS 5.x) 480 To compile for Solaris, be sure you use -DSOLARIS. 481 482 To the best of my knowledge, Solaris does not have the 483 gethostbyname problem described above. However, it does 484 have another one: 485 486 From a correspondent: 487 488 For solaris 2.2, I have 489 490 hosts: files dns 491 492 in /etc/nsswitch.conf and /etc/hosts has to have the fully 493 qualified host name. I think "files" has to be before "dns" 494 in /etc/nsswitch.conf during bootup. 495 496 From another correspondent: 497 498 When running sendmail under Solaris, the gethostbyname() 499 hack in conf.c which should perform proper canonicalization 500 of host names could fail. Result: the host name is not 501 canonicalized despite the hack, and you'll have to define $j 502 and $m in sendmail.cf somewhere. 503 504 The reason could be that /etc/nsswitch.conf is improperly 505 configured (at least from sendmail's point of view). For 506 example, the line 507 508 hosts: files nisplus dns 509 510 will make gethostbyname() look in /etc/hosts first, then ask 511 nisplus, then dns. However, if /etc/hosts does not contain 512 the full canonicalized hostname, then no amount of 513 gethostbyname()s will work. 514 515 Solution (or rather, a workaround): Ask nisplus first, then 516 dns, then local files: 517 518 hosts: nisplus dns [NOTFOUND=return] files 519 520 The Solaris "syslog" function is apparently limited to something 521 about 90 characters because of a kernel limitation. If you have 522 source code, you can probably up this number. You can get patches 523 that fix this problem: the patch ids are: 524 525 Solaris 2.1 100834 526 Solaris 2.2 100999 527 Solaris 2.3 101318 528 529 Be sure you have the appropriate patch installed or you won't 530 see system logging. 531 532OSF/1 533 If you are compiling on OSF/1 (DEC Alpha), you must use 534 -L/usr/shlib (otherwise it core dumps on startup). You may also 535 need -mld to get the nlist() function, although some versions 536 apparently don't need this. 537 538 Also, the enclosed makefile removed /usr/sbin/smtpd; if you need 539 it, just create the link to the sendmail binary. 540 541IRIX 542 The header files on SGI IRIX are completely prototyped, and as 543 a result you can sometimes get some warning messages during 544 compilation. These can be ignored. There are two errors in 545 deliver only if you are using gcc, both of the form ``warning: 546 passing arg N of `execve' from incompatible pointer type''. 547 Also, if you compile with -DNIS, you will get a complaint 548 about a declaration of struct dom_binding in a prototype 549 when compiling map.c; this is not important because the 550 function being prototyped is not used in that file. 551 552 In order to compile sendmail you will have had to install 553 the developers' option in order to get the necessary include 554 files. 555 556NeXT 557 If you are compiling on NeXT, you will have to create an empty 558 file "unistd.h" and create a file "dirent.h" containing: 559 560 #include <sys/dir.h> 561 #define dirent direct 562 563 (The Makefile.NeXT should try to do both of these for you.) 564 565 Apparently, there is a bug in getservbyname on Nextstep 3.0 566 that causes it to fail under some circumstances with the 567 message "SYSERR: service "smtp" unknown" logged. You should 568 be able to work around this by including the line: 569 570 OOPort=25 571 572 in your .cf file. 573 574 You may have to use -DNeXT. 575 576BSDI (BSD/386) 1.0, NetBSD 0.9, FreeBSD 1.0 577 The "m4" from BSDI won't handle the config files properly. 578 I haven't had a chance to test this myself. 579 580 The M4 shipped in FreeBSD and NetBSD 0.9 don't handle the config 581 files properly. One must use either GNU m4 1.1 or the PD-M4 582 recently posted in comp.os.386bsd.bugs (and maybe others). 583 NetBSD-current includes the PD-M4 (as stated in the NetBSD file 584 CHANGES). 585 586 FreeBSD 1.0 RELEASE has uname(2) now. Use -DUSEUNAME in order to 587 use it (look into Makefile.FreeBSD). NetBSD-current may have 588 it too but it has not been verified. 589 590 You cannot port the latest version of the Berkeley db library 591 and use it with sendmail without recompiling the world. This 592 is because C library routines use the older version which have 593 incompatible header files -- the result is that it can't read 594 other system files, such as /etc/passwd, unless you use the 595 new db format throughout your system. You should normally just 596 use the version of db supplied in your release. You may need 597 to use -DOLD_NEWDB=1 to make this work -- this turns off some 598 new interface calls (for file locking) that are not in older 599 versions of db. You'll get compile errors if you need this 600 flag and don't have it set. 601 6024.3BSD 603 If you are running a "virgin" version of 4.3BSD, you'll have 604 a very old resolver and be missing some header files. The 605 header files are simple -- create empty versions and everything 606 will work fine. For the resolver you should really port a new 607 version (4.8.3 or later) of the resolver; 4.9 is available on 608 gatekeeper.DEC.COM in pub/BSD/bind/4.9. If you are really 609 determined to continue to use your old, buggy version (or as 610 a shortcut to get sendmail working -- I'm sure you have the 611 best intentions to port a modern version of BIND), you can 612 copy ../contrib/oldbind.compat.c into src and add 613 oldbind.compat.o to OBJADD in the Makefile. 614 615A/UX 616 Date: Tue, 12 Oct 1993 18:28:28 -0400 (EDT) 617 From: "Eric C. Hagberg" <hagberg@med.cornell.edu> 618 Subject: Fix for A/UX ndbm 619 620 I guess this isn't really a sendmail bug, however, it is something 621 that A/UX users should be aware of when compiling sendmail 8.6. 622 623 Apparently, the calls that sendmail is using to the ndbm routines 624 in A/UX 3.0.x contain calls to "broken" routines, in that the 625 aliases database will break when it gets "just a little big" 626 (sorry I don't have exact numbers here, but it broke somewhere 627 around 20-25 aliases for me.), making all aliases non-functional 628 after exceeding this point. 629 630 What I did was to get the gnu-dbm-1.6 package, compile it, and 631 then re-compile sendmail with "-lgdbm", "-DNDBM", and using the 632 ndbm.h header file that comes with the gnu-package. This makes 633 things behave properly. 634 635 I suppose porting the New Berkeley db package is another route, 636 however, I made a quick attempt at it, and found it difficult 637 (not easy at least); the gnu-dbm package "configured" and 638 compiled easily. 639 640DG/UX 641 Apparently, /bin/mail doesn't work properly for delivery on 642 DG/UX -- the person who has this working, Douglas Anderson 643 <dlander@afterlife.ncsc.mil>, used procmail instead. The 644 problem is that DG/UX /bin/mail requires that an environment 645 variable be set (_FORCE_MAIL_LOCAL_=yes); sendmail has no 646 mechanism for this. Several people report that procmail works 647 beautifully. 648 649Apollo DomainOS 650 If you are compiling on Apollo, you will have to create an empty 651 file "unistd.h" and create a file "dirent.h" containing: 652 653 #include <sys/dir.h> 654 #define dirent direct 655 656 (The Makefile.DomainOS will attempt to do both of these for you.) 657 658HP-UX 8.00 659 Date: Mon, 24 Jan 1994 13:25:45 +0200 660 From: Kimmo Suominen <Kimmo.Suominen@lut.fi> 661 Subject: 8.6.5 w/ HP-UX 8.00 on s300 662 663 Just compiled and fought with sendmail 8.6.5 on a HP9000/360 (ie. a 664 series 300 machine) running HP-UX 8.00. 665 666 I was getting segmentation fault when delivering to a local user. 667 With debugging I saw it was faulting when doing _free@libc... *sigh* 668 It seems the new implementation of malloc on s300 is buggy as of 8.0, 669 so I tried out the one in -lmalloc (malloc(3X)). With that it seems 670 to work just dandy. 671 672 When linking, you will get the following error: 673 674 ld: multiply defined symbol _freespace in file /usr/lib/libmalloc.a 675 676 but you can just ignore it. You might want to add this info to the 677 README file for the future... 678 679Linux 680 Something broke between versions 0.99.13 and 0.99.14 of Linux: 681 the flock() system call gives errors. If you are running .14, 682 you must not use flock. You can do this with -DHASFLOCK=0. 683 684AIX 685 This version of sendmail does not support MB, MG, and MR resource 686 records, which are supported by AIX sendmail. 687 688RISC/os 689 RISC/os from MIPS is a merged AT&T/Berkeley system. When you 690 compile on that platform you will get duplicate definitions 691 on many files. You can ignore these. 692 693System V Release 4 Based Systems 694 There is a single Makefile that is intended for all SVR4-based 695 systems (called Makefile.SVR4). It defines __svr4__, which is 696 predefined by some compilers. If your compiler already defines 697 this compile variable, you can delete the definition from the 698 Makefile. 699 700 It's been tested on Dell Issue 2.2. 701 702DELL SVR4 703 Date: Mon, 06 Dec 1993 10:42:29 EST 704 From: "Kimmo Suominen" <kim@grendel.lut.fi> 705 Message-ID: <2d0352f9.lento29@lento29.UUCP> 706 To: eric@cs.berkeley.edu 707 Cc: sendmail@cs.berkeley.edu 708 Subject: Notes for DELL SVR4 709 710 Eric, 711 712 Here are some notes for compiling Sendmail 8.6.4 on DELL SVR4. I ran 713 across these things when helping out some people who contacted me by 714 e-mail. 715 716 1) Use gcc 2.4.5 (or later?). Dell distributes gcc 2.1 with their 717 Issue 2.2 Unix. It is too old, and gives you problems with 718 clock.c, because sigset_t won't get defined in <sys/signal.h>. 719 This is due to a problematic protection rule in there, and is 720 fixed with gcc 2.4.5. 721 722 2) If you don't use the new Berkeley DB (-DNEWDB), then you need 723 to add "-lc -lucb" to the libraries to link with. This is because 724 the -ldbm distributed by Dell needs the bcopy, bcmp and bzero 725 functions. It is important that you specify both libraries in 726 the given order to be sure you only get the BSTRING functions 727 from the UCB library (and not the signal routines etc.). 728 729 3) Don't leave out "-lelf" even if compiling with "-lc -lucb". 730 The UCB library also has another copy of the nlist routines, 731 but we do want the ones from "-lelf". 732 733 If anyone needs a compiled gcc 2.4.5 and/or a ported DB library, they 734 can use anonymous ftp to fetch them from lut.fi in the /kim directory. 735 They are copies of what I use on grendel.lut.fi, and offering them 736 does not imply that I would also support them. I have sent the DB 737 port for SVR4 back to Keith Bostic for inclusion in the official 738 distribution, but I haven't heard anything from him as of today. 739 740 - gcc-2.4.5-svr4.tar.gz (gcc 2.4.5 and the corresponding libg++) 741 - db-1.72.tar.gz (with source, objects and a installed copy) 742 743 Cheers 744 + Kim 745 -- 746 * Kimmo.Suominen@lut.fi * SysVr4 enthusiast at GRENDEL.LUT.FI * 747 * KIM@FINFILES.BITNET * Postmaster and Hostmaster at LUT.FI * 748 * + 358 200 865 718 * Unix area moderator at NIC.FUNET.FI * 749 750ConvexOS 10.1 and below 751 In order to use the name server, you must create the file 752 /etc/use_nameserver. If this file does not exist, the call 753 to res_init() will fail and you will have absolutely no 754 access to DNS, including MX records. 755 756Non-DNS based sites 757 This version of sendmail always tries to connect to the Domain 758 Name System (DNS) to resolve names, regardless of the setting 759 of the `I' option. On most systems that are not running DNS, 760 this will fail quickly and sendmail will continue, but on some 761 systems it has a long timeout. If you have this problem, you 762 will have to recompile without NAMED_BIND. Some people have 763 claimed that they have successfully used "OI+USEVC" to force 764 sendmail to use a virtual circuit -- this will always time out 765 quickly, but also tells sendmail that a failed connection 766 should requeue the message (probably not what you intended). 767 A future release of sendmail will correct this problem. 768 769Both NEWDB and NDBM 770 If you use both -DNDBM and -DNEWDB, you must delete the module 771 ndbm.o from libdb.a and delete the file "ndbm.h" from the files 772 that get installed (that is, use the OLD ndbm.h, not the new 773 ndbm.h). This compatibility module maps ndbm calls into DB 774 calls, and breaks things rather badly. 775 776GNU getopt 777 I'm told that GNU getopt has a problem in that it gets confused 778 by the double call. Use the version in conf.c instead. 779 780BIND 4.9.2 and Ultrix 781 If you are running on Ultrix, be sure you read conf/Info.Ultrix 782 in the BIND distribution very carefully -- there is information 783 in there that you need to know in order to avoid errors of the 784 form: 785 786 /lib/libc.a(gethostent.o): sethostent: multiply defined 787 /lib/libc.a(gethostent.o): endhostent: multiply defined 788 /lib/libc.a(gethostent.o): gethostbyname: multiply defined 789 /lib/libc.a(gethostent.o): gethostbyaddr: multiply defined 790 791 during the link stage. 792 793 794+--------------+ 795| MANUAL PAGES | 796+--------------+ 797 798The manual pages have been written against the -mandoc macros 799instead of the -man macros. The latest version of groff has them 800included. You can also get a copy from FTP.UU.NET in directory 801/systems/unix/bsd-sources/share/tmac. 802 803 804+-----------------+ 805| DEBUGGING HOOKS | 806+-----------------+ 807 808As of 8.6.5, sendmail daemons will catch a SIGUSR1 signal and log 809some debugging output (logged at LOG_DEBUG severity). The 810information dumped is: 811 812 * The value of the $j macro. 813 * A warning if $j is not in the set $=w. 814 * A list of the open file descriptors. 815 * The contents of the connection cache. 816 * If ruleset 89 is defined, it is evaluated and the results printed. 817 818This allows you to get information regarding the runtime state of the 819daemon on the fly. This should not be done too frequently, since 820the process of rewriting may lose memory which will not be recovered. 821Also, ruleset 89 may call non-reentrant routines, so there is a small 822non-zero probability that this will cause other problems. It is 823really only for debugging serious problems. 824 825A typical formulation of ruleset 89 would be: 826 827 R$* $@ $>0 some test address 828 829 830+-----------------------------+ 831| DESCRIPTION OF SOURCE FILES | 832+-----------------------------+ 833 834The following list describes the files in this directory: 835 836Makefile The makefile used here; this version only works with 837 the new Berkeley make. 838Makefile.dist A trimmed down version of the makefile that works with 839 the old make. 840READ_ME This file. 841TRACEFLAGS My own personal list of the trace flags -- not guaranteed 842 to be particularly up to date. 843alias.c Does name aliasing in all forms. 844arpadate.c A subroutine which creates ARPANET standard dates. 845clock.c Routines to implement real-time oriented functions 846 in sendmail -- e.g., timeouts. 847collect.c The routine that actually reads the mail into a temp 848 file. It also does a certain amount of parsing of 849 the header, etc. 850conf.c The configuration file. This contains information 851 that is presumed to be quite static and non- 852 controversial, or code compiled in for efficiency 853 reasons. Most of the configuration is in sendmail.cf. 854conf.h Configuration that must be known everywhere. 855convtime.c A routine to sanely process times. 856daemon.c Routines to implement daemon mode. This version is 857 specifically for Berkeley 4.1 IPC. 858deliver.c Routines to deliver mail. 859domain.c Routines that interface with DNS (the Domain Name 860 System). 861err.c Routines to print error messages. 862envelope.c Routines to manipulate the envelope structure. 863headers.c Routines to process message headers. 864macro.c The macro expander. This is used internally to 865 insert information from the configuration file. 866main.c The main routine to sendmail. This file also 867 contains some miscellaneous routines. 868map.c Support for database maps. 869mci.c Routines that handle mail connection information caching. 870parseaddr.c The routines which do address parsing. 871queue.c Routines to implement message queueing. 872readcf.c The routine that reads the configuration file and 873 translates it to internal form. 874recipient.c Routines that manipulate the recipient list. 875savemail.c Routines which save the letter on processing errors. 876sendmail.h Main header file for sendmail. 877srvrsmtp.c Routines to implement server SMTP. 878stab.c Routines to manage the symbol table. 879stats.c Routines to collect and post the statistics. 880sysexits.c List of error messages associated with error codes 881 in sysexits.h. 882trace.c The trace package. These routines allow setting and 883 testing of trace flags with a high granularity. 884udb.c The user database interface module. 885usersmtp.c Routines to implement user SMTP. 886util.c Some general purpose routines used by sendmail. 887version.c The version number and information about this 888 version of sendmail. Theoretically, this gets 889 modified on every change. 890 891Eric Allman 892 893(Version 8.71, last update 09/09/94 16:46:51) 894