1 /* 2 * Copyright (c) 1983 Eric P. Allman 3 * Copyright (c) 1988, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * %sccs.include.redist.c% 7 * 8 * @(#)conf.h 8.129 (Berkeley) 01/07/95 9 */ 10 11 /* 12 ** CONF.H -- All user-configurable parameters for sendmail 13 */ 14 15 # include <sys/param.h> 16 # include <sys/types.h> 17 # include <sys/stat.h> 18 # include <sys/file.h> 19 # include <sys/wait.h> 20 # include <fcntl.h> 21 # include <signal.h> 22 23 /********************************************************************** 24 ** Table sizes, etc.... 25 ** There shouldn't be much need to change these.... 26 **********************************************************************/ 27 28 # define MAXLINE 2048 /* max line length */ 29 # define MAXNAME 256 /* max length of a name */ 30 # define MAXPV 40 /* max # of parms to mailers */ 31 # define MAXATOM 200 /* max atoms per address */ 32 # define MAXMAILERS 25 /* maximum mailers known to system */ 33 # define MAXRWSETS 100 /* max # of sets of rewriting rules */ 34 # define MAXPRIORITIES 25 /* max values for Precedence: field */ 35 # define MAXMXHOSTS 20 /* max # of MX records */ 36 # define SMTPLINELIM 990 /* maximum SMTP line length */ 37 # define MAXKEY 128 /* maximum size of a database key */ 38 # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 39 # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 40 # define MAXALIASDB 12 /* max # of alias databases */ 41 # define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 42 # define MAXTOCLASS 8 /* max # of message timeout classes */ 43 44 # ifndef QUEUESIZE 45 # define QUEUESIZE 1000 /* max # of jobs per queue run */ 46 # endif 47 48 /********************************************************************** 49 ** Compilation options. 50 ** 51 ** #define these if they are available; comment them out otherwise. 52 **********************************************************************/ 53 54 # define LOG 1 /* enable logging */ 55 # define UGLYUUCP 1 /* output ugly UUCP From lines */ 56 # define NETUNIX 1 /* include unix domain support */ 57 # define NETINET 1 /* include internet support */ 58 # define MATCHGECOS 1 /* match user names from gecos field */ 59 # define XDEBUG 1 /* enable extended debugging */ 60 # ifdef NEWDB 61 # define USERDB 1 /* look in user database (requires NEWDB) */ 62 # endif 63 64 /********************************************************************** 65 ** 0/1 Compilation options. 66 ** #define these to 1 if they are available; 67 ** #define them to 0 otherwise. 68 **********************************************************************/ 69 70 # ifndef NAMED_BIND 71 # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 72 # endif 73 74 /* 75 ** Most systems have symbolic links today, so default them on. You 76 ** can turn them off by #undef'ing this below. 77 */ 78 79 # define HASLSTAT 1 /* has lstat(2) call */ 80 81 /* 82 ** General "standard C" defines. 83 ** 84 ** These may be undone later, to cope with systems that claim to 85 ** be Standard C but aren't. Gcc is the biggest offender -- it 86 ** doesn't realize that the library is part of the language. 87 ** 88 ** Life would be much easier if we could get rid of this sort 89 ** of bozo problems. 90 */ 91 92 #ifdef __STDC__ 93 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 94 #endif 95 96 /********************************************************************** 97 ** Operating system configuration. 98 ** 99 ** Unless you are porting to a new OS, you shouldn't have to 100 ** change these. 101 **********************************************************************/ 102 103 /* 104 ** Per-Operating System defines 105 */ 106 107 108 /* 109 ** HP-UX -- tested for 8.07, 9.00, and 9.01. 110 */ 111 112 #ifdef __hpux 113 /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 114 # undef m_flags 115 # define SYSTEM5 1 /* include all the System V defines */ 116 # define HASINITGROUPS 1 /* has initgroups(3) call */ 117 # define HASSETREUID 1 /* has setreuid(2) call */ 118 # define setreuid(r, e) setresuid(r, e, -1) 119 # define LA_TYPE LA_FLOAT 120 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 121 # define GIDSET_T gid_t 122 # define _PATH_UNIX "/hp-ux" 123 # ifndef _PATH_SENDMAILCF 124 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 125 # endif 126 # ifndef IDENTPROTO 127 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 128 # endif 129 # ifndef HASGETUSERSHELL 130 # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 131 # endif 132 # define syslog hard_syslog 133 # ifdef __STDC__ 134 extern int syslog(int, char *, ...); 135 # endif 136 #endif 137 138 139 /* 140 ** IBM AIX 3.x -- actually tested for 3.2.3 141 */ 142 143 #ifdef _AIX3 144 # define HASINITGROUPS 1 /* has initgroups(3) call */ 145 # define HASUNAME 1 /* use System V uname(2) system call */ 146 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 147 # define FORK fork /* no vfork primitive available */ 148 # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 149 # define SPT_PADCHAR '\0' /* pad process title with nulls */ 150 # define LA_TYPE LA_INT 151 #endif 152 153 154 /* 155 ** Silicon Graphics IRIX 156 ** 157 ** Compiles on 4.0.1. 158 ** 159 ** Use IRIX64 instead of IRIX for 64-bit IRIX. 160 ** 161 ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 162 */ 163 164 #ifdef IRIX64 165 # define IRIX 166 #endif 167 168 #ifdef IRIX 169 # define SYSTEM5 1 /* this is a System-V derived system */ 170 # define HASSETREUID 1 /* has setreuid(2) call */ 171 # define HASINITGROUPS 1 /* has initgroups(3) call */ 172 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 173 # define FORK fork /* no vfork primitive available */ 174 # define WAITUNION 1 /* use "union wait" as wait argument type */ 175 # define setpgid BSDsetpgrp 176 # define GIDSET_T gid_t 177 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 178 # define LA_TYPE LA_INT 179 # ifdef IRIX64 180 # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ 181 # else 182 # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 183 # endif 184 #endif 185 186 187 /* 188 ** SunOS and Solaris 189 ** 190 ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 191 ** Solaris 2.2 (a.k.a. SunOS 5.2). 192 */ 193 194 #if defined(sun) && !defined(BSD) 195 196 # define HASINITGROUPS 1 /* has initgroups(3) call */ 197 # define HASUNAME 1 /* use System V uname(2) system call */ 198 # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 199 # define LA_TYPE LA_INT 200 201 # ifdef SOLARIS_2_3 202 # define SOLARIS 203 # endif 204 205 # ifdef SOLARIS 206 /* Solaris 2.x (a.k.a. SunOS 5.x) */ 207 # ifndef __svr4__ 208 # define __svr4__ /* use all System V Releae 4 defines below */ 209 # endif 210 # include <sys/time.h> 211 # define gethostbyname solaris_gethostbyname /* get working version */ 212 # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 213 # define GIDSET_T gid_t 214 # ifndef _PATH_UNIX 215 # define _PATH_UNIX "/dev/ksyms" 216 # endif 217 # ifndef _PATH_SENDMAILCF 218 # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 219 # endif 220 # ifndef _PATH_SENDMAILPID 221 # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 222 # endif 223 # ifndef SYSLOG_BUFSIZE 224 # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 225 # endif 226 227 # else 228 /* SunOS 4.0.3 or 4.1.x */ 229 # define HASSETREUID 1 /* has setreuid(2) call */ 230 # ifndef HASFLOCK 231 # define HASFLOCK 1 /* has flock(2) call */ 232 # endif 233 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 234 # include <vfork.h> 235 236 # ifdef SUNOS403 237 /* special tweaking for SunOS 4.0.3 */ 238 # include <malloc.h> 239 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 240 # define WAITUNION 1 /* use "union wait" as wait argument type */ 241 # undef WIFEXITED 242 # undef WEXITSTATUS 243 # undef HASUNAME 244 # define setpgid setpgrp 245 typedef int pid_t; 246 extern char *getenv(); 247 248 # else 249 /* 4.1.x specifics */ 250 # define HASSETSID 1 /* has Posix setsid(2) call */ 251 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 252 253 # endif 254 # endif 255 #endif 256 257 /* 258 ** DG/UX 259 ** 260 ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 261 ** older support. 262 ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 263 */ 264 265 #ifdef DGUX_5_4_2 266 # define DGUX 1 267 #endif 268 269 #ifdef DGUX 270 # define SYSTEM5 1 271 # define LA_TYPE LA_SUBR 272 # define HASSETREUID 1 /* has setreuid(2) call */ 273 # define HASUNAME 1 /* use System V uname(2) system call */ 274 # define HASSETSID 1 /* has Posix setsid(2) call */ 275 # define HASINITGROUPS 1 /* has initgroups(3) call */ 276 # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 277 # ifndef IDENTPROTO 278 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 279 # endif 280 # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 281 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 282 283 /* these include files must be included early on DG/UX */ 284 # include <netinet/in.h> 285 # include <arpa/inet.h> 286 287 # ifdef DGUX_5_4_2 288 # define inet_addr dgux_inet_addr 289 extern long dgux_inet_addr(); 290 # endif 291 #endif 292 293 294 /* 295 ** Digital Ultrix 4.2A or 4.3 296 ** 297 ** Apparently, fcntl locking is broken on 4.2A, in that locks are 298 ** not dropped when the process exits. This causes major problems, 299 ** so flock is the only alternative. 300 */ 301 302 #ifdef ultrix 303 # define HASSETREUID 1 /* has setreuid(2) call */ 304 # define HASUNSETENV 1 /* has unsetenv(3) call */ 305 # define HASINITGROUPS 1 /* has initgroups(3) call */ 306 # define HASUNAME 1 /* use System V uname(2) system call */ 307 # ifndef HASFLOCK 308 # define HASFLOCK 1 /* has flock(2) call */ 309 # endif 310 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 311 # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 312 # ifdef vax 313 # define LA_TYPE LA_FLOAT 314 # else 315 # define LA_TYPE LA_INT 316 # define LA_AVENRUN "avenrun" 317 # endif 318 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 319 # ifndef IDENTPROTO 320 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 321 # endif 322 #endif 323 324 325 /* 326 ** OSF/1 for Intel Paragon. 327 ** 328 ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> 329 ** of Intel Scalable Systems Divison. 330 */ 331 332 #ifdef __PARAGON__ 333 # define __osf__ 1 /* get OSF/1 defines below */ 334 # ifndef _PATH_SENDMAILCF 335 # define _PATH_SENDMAILCF "/var/adm/sendmail/sendmail.cf" 336 # endif 337 #endif 338 339 340 /* 341 ** OSF/1 (tested on Alpha) 342 */ 343 344 #ifdef __osf__ 345 # define HASUNSETENV 1 /* has unsetenv(3) call */ 346 # define HASSETREUID 1 /* has setreuid(2) call */ 347 # define HASINITGROUPS 1 /* has initgroups(3) call */ 348 # ifndef HASFLOCK 349 # define HASFLOCK 1 /* has flock(2) call */ 350 # endif 351 # define LA_TYPE LA_INT 352 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 353 # ifndef _PATH_SENDMAILPID 354 # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 355 # endif 356 #endif 357 358 359 /* 360 ** NeXTstep 361 */ 362 363 #ifdef NeXT 364 # define HASINITGROUPS 1 /* has initgroups(3) call */ 365 # ifndef HASFLOCK 366 # define HASFLOCK 1 /* has flock(2) call */ 367 # endif 368 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 369 # define WAITUNION 1 /* use "union wait" as wait argument type */ 370 # define sleep sleepX 371 # define setpgid setpgrp 372 # ifndef LA_TYPE 373 # define LA_TYPE LA_MACH 374 # endif 375 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 376 # ifndef _POSIX_SOURCE 377 typedef int pid_t; 378 # undef WEXITSTATUS 379 # undef WIFEXITED 380 # endif 381 # ifndef _PATH_SENDMAILCF 382 # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 383 # endif 384 # ifndef _PATH_SENDMAILPID 385 # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 386 # endif 387 #endif 388 389 390 /* 391 ** 4.4 BSD 392 ** 393 ** See also BSD defines. 394 */ 395 396 #ifdef BSD4_4 397 # define HASUNSETENV 1 /* has unsetenv(3) call */ 398 # include <sys/cdefs.h> 399 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 400 # ifndef LA_TYPE 401 # define LA_TYPE LA_SUBR 402 # endif 403 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 404 # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 405 #endif 406 407 408 /* 409 ** BSD/386 (all versions) 410 ** From Tony Sanders, BSDI 411 */ 412 413 #ifdef __bsdi__ 414 # define HASUNSETENV 1 /* has the unsetenv(3) call */ 415 # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 416 # include <sys/cdefs.h> 417 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 418 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 419 # ifndef LA_TYPE 420 # define LA_TYPE LA_SUBR 421 # endif 422 # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 423 /* version 1.1 or later */ 424 # undef SPT_TYPE 425 # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 426 # else 427 /* version 1.0 or earlier */ 428 # ifndef OLD_NEWDB 429 # define OLD_NEWDB 1 /* old version of newdb library */ 430 # endif 431 # define SPT_PADCHAR '\0' /* pad process title with nulls */ 432 # endif 433 #endif 434 435 436 437 /* 438 ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 439 ** 440 ** 4.3BSD clone, closer to 4.4BSD 441 ** 442 ** See also BSD defines. 443 */ 444 445 #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 446 # define HASUNSETENV 1 /* has unsetenv(3) call */ 447 # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 448 # ifdef __NetBSD__ 449 # define HASUNAME 1 /* has uname(2) syscall */ 450 # endif 451 # include <sys/cdefs.h> 452 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 453 # ifndef LA_TYPE 454 # define LA_TYPE LA_SUBR 455 # endif 456 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 457 #endif 458 459 460 /* 461 ** Mach386 462 ** 463 ** For mt Xinu's Mach386 system. 464 */ 465 466 #if defined(MACH) && defined(i386) 467 # define MACH386 1 468 # define HASUNSETENV 1 /* has unsetenv(3) call */ 469 # define HASINITGROUPS 1 /* has initgroups(3) call */ 470 # ifndef HASFLOCK 471 # define HASFLOCK 1 /* has flock(2) call */ 472 # endif 473 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 474 # define NEEDSTRTOL 1 /* need the strtol() function */ 475 # define setpgid setpgrp 476 # ifndef LA_TYPE 477 # define LA_TYPE LA_FLOAT 478 # endif 479 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 480 # undef HASSETVBUF /* don't actually have setvbuf(3) */ 481 # undef WEXITSTATUS 482 # undef WIFEXITED 483 # ifndef _PATH_SENDMAILCF 484 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 485 # endif 486 # ifndef _PATH_SENDMAILPID 487 # define _PATH_SENDMAILPID "/etc/sendmail.pid" 488 # endif 489 #endif 490 491 492 /* 493 ** 4.3 BSD -- this is for very old systems 494 ** 495 ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 496 ** 497 ** You'll also have to install a new resolver library. 498 ** I don't guarantee that support for this environment is complete. 499 */ 500 501 #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 502 # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 503 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 504 # define ARBPTR_T char * 505 # define setpgid setpgrp 506 # ifndef LA_TYPE 507 # define LA_TYPE LA_FLOAT 508 # endif 509 # ifndef _PATH_SENDMAILCF 510 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 511 # endif 512 # ifndef IDENTPROTO 513 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 514 # endif 515 # undef WEXITSTATUS 516 # undef WIFEXITED 517 typedef short pid_t; 518 extern int errno; 519 #endif 520 521 522 /* 523 ** SCO Unix 524 ** 525 ** This includes two parts -- the first is for SCO Open Server 3.2v4 526 ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 527 ** The second is, I believe, for an older version. 528 */ 529 530 #ifdef _SCO_unix_4_2 531 # define _SCO_unix_ 532 # define HASSETREUID 1 /* has setreuid(2) call */ 533 # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 534 # define _PATH_UNIX "/unix" 535 # ifndef _PATH_SENDMAILCF 536 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 537 # endif 538 # ifndef _PATH_SENDMAILPID 539 # define _PATH_SENDMAILPID "/etc/sendmail.pid" 540 # endif 541 #endif 542 543 #ifdef _SCO_unix_ 544 # define SYSTEM5 1 /* include all the System V defines */ 545 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 546 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 547 # define FORK fork 548 # define MAXPATHLEN PATHSIZE 549 # define LA_TYPE LA_SHORT 550 # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ 551 # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 552 # undef NETUNIX /* no unix domain socket support */ 553 #endif 554 555 556 /* 557 ** Altos System V. 558 ** Contributed by Tim Rice <timr@crl.com>. 559 */ 560 561 #ifdef ALTOS_SYS_V 562 # include <limits.h> 563 # define SYSTEM5 1 /* include all the System V defines */ 564 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 565 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 566 # define WAITUNION 1 /* use "union wait" as wait argument type */ 567 # define NEEDFSYNC 1 /* no fsync(2) in system library */ 568 # define FORK fork 569 # define MAXPATHLEN PATHSIZE 570 # define LA_TYPE LA_SHORT 571 # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 572 # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 573 # undef NETUNIX /* no unix domain socket support */ 574 # undef WIFEXITED 575 # undef WEXITSTATUS 576 # define strtoul strtol /* gcc library bogosity */ 577 578 typedef unsigned short uid_t; 579 typedef unsigned short gid_t; 580 typedef short pid_t; 581 #endif 582 583 584 /* 585 ** ConvexOS 11.0 and later 586 ** 587 ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 588 ** works on 9.1 as well. 589 */ 590 591 #ifdef _CONVEX_SOURCE 592 # define BSD 1 /* include all the BSD defines */ 593 # define HASUNAME 1 /* use System V uname(2) system call */ 594 # define HASSETSID 1 /* has POSIX setsid(2) call */ 595 # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 596 # define LA_TYPE LA_FLOAT 597 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 598 # ifndef _PATH_SENDMAILCF 599 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 600 # endif 601 # ifndef S_IREAD 602 # define S_IREAD _S_IREAD 603 # define S_IWRITE _S_IWRITE 604 # define S_IEXEC _S_IEXEC 605 # define S_IFMT _S_IFMT 606 # define S_IFCHR _S_IFCHR 607 # define S_IFBLK _S_IFBLK 608 # endif 609 # ifndef IDENTPROTO 610 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 611 # endif 612 #endif 613 614 615 /* 616 ** RISC/os 4.52 617 ** 618 ** Gives a ton of warning messages, but otherwise compiles. 619 */ 620 621 #ifdef RISCOS 622 623 # define HASUNSETENV 1 /* has unsetenv(3) call */ 624 # ifndef HASFLOCK 625 # define HASFLOCK 1 /* has flock(2) call */ 626 # endif 627 # define WAITUNION 1 /* use "union wait" as wait argument type */ 628 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 629 # define LA_TYPE LA_INT 630 # define LA_AVENRUN "avenrun" 631 # define _PATH_UNIX "/unix" 632 # undef WIFEXITED 633 634 # define setpgid setpgrp 635 636 extern int errno; 637 typedef int pid_t; 638 #define SIGFUNC_DEFINED 639 typedef int (*sigfunc_t)(); 640 extern char *getenv(); 641 extern void *malloc(); 642 643 #endif 644 645 646 /* 647 ** Linux 0.99pl10 and above... 648 ** 649 ** Thanks to, in reverse order of contact: 650 ** 651 ** John Kennedy <warlock@csuchico.edu> 652 ** Andrew Pam <avatar@aus.xanadu.com> 653 ** Florian La Roche <rzsfl@rz.uni-sb.de> 654 ** Karl London <karl@borg.demon.co.uk> 655 ** 656 ** Last compiled against: [12/14/94 @ 11:38:41 PM (Wednesday)] 657 ** sendmail 8.7.a.5 named 4.9.3-beta12-p1 db-1.85 658 ** gcc 2.6.2 libc.so.4.6.20 659 ** slackware 2.1.0 linux 1.1.70 660 */ 661 662 #ifdef __linux__ 663 # define BSD 1 /* include BSD defines */ 664 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 665 # define HASUNAME 1 /* use System V uname(2) system call */ 666 # define HASUNSETENV 1 /* has unsetenv(3) call */ 667 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 668 # define GIDSET_T gid_t /* from <linux/types.h> */ 669 # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 670 # ifndef LA_TYPE 671 # define LA_TYPE LA_PROCSTR 672 # endif 673 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 674 # ifndef _PATH_SENDMAILPID 675 # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 676 # endif 677 # define TZ_TYPE TZ_TNAME 678 # include <sys/sysmacros.h> 679 # undef atol /* wounded in <stdlib.h> */ 680 #endif 681 682 683 /* 684 ** DELL SVR4 Issue 2.2, and others 685 ** From Kimmo Suominen <kim@grendel.lut.fi> 686 ** 687 ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 688 ** defined, and the definitions conflict. 689 ** 690 ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 691 ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 692 ** (SVR4.0/386 version 3.0). 693 */ 694 695 #ifdef DELL_SVR4 696 /* no changes necessary */ 697 /* see general __svr4__ defines below */ 698 #endif 699 700 701 /* 702 ** Apple A/UX 3.0 703 */ 704 705 #ifdef _AUX_SOURCE 706 # include <sys/sysmacros.h> 707 # define BSD /* has BSD routines */ 708 # define HASUNAME 1 /* use System V uname(2) system call */ 709 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 710 # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 711 # ifndef IDENTPROTO 712 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 713 # endif 714 # define FORK fork 715 # ifndef _PATH_SENDMAILCF 716 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 717 # endif 718 # ifndef LA_TYPE 719 # define LA_TYPE LA_ZERO 720 # endif 721 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 722 # undef WIFEXITED 723 # undef WEXITSTATUS 724 #endif 725 726 727 /* 728 ** Encore UMAX V 729 ** 730 ** Not extensively tested. 731 */ 732 733 #ifdef UMAXV 734 # include <limits.h> 735 # define HASUNAME 1 /* use System V uname(2) system call */ 736 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 737 # define HASINITGROUPS 1 /* has initgroups(3) call */ 738 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 739 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 740 # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 741 # define FORK fork /* no vfork(2) primitive available */ 742 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 743 # define MAXPATHLEN PATH_MAX 744 extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 745 extern struct group *getgrent(), *getgrnam(), *getgrgid(); 746 # undef WIFEXITED 747 # undef WEXITSTATUS 748 #endif 749 750 751 /* 752 ** Stardent Titan 3000 running TitanOS 4.2. 753 ** 754 ** Must be compiled in "cc -43" mode. 755 ** 756 ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 757 ** 758 ** Note the tweaking below after the BSD defines are set. 759 */ 760 761 #ifdef titan 762 # define setpgid setpgrp 763 typedef int pid_t; 764 # undef WIFEXITED 765 # undef WEXITSTATUS 766 #endif 767 768 769 /* 770 ** Sequent DYNIX 3.2.0 771 ** 772 ** From Jim Davis <jdavis@cs.arizona.edu>. 773 */ 774 775 #ifdef sequent 776 777 # define BSD 1 778 # define HASUNSETENV 1 779 # define BSD4_3 1 /* to get signal() in conf.c */ 780 # define WAITUNION 1 781 # define LA_TYPE LA_FLOAT 782 # ifdef _POSIX_VERSION 783 # undef _POSIX_VERSION /* set in <unistd.h> */ 784 # endif 785 # undef HASSETVBUF /* don't actually have setvbuf(3) */ 786 # define setpgid setpgrp 787 788 /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 789 # undef WIFEXITED 790 # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 791 ((union wait*)&(s))->w_termsig == 0) 792 # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 793 typedef int pid_t; 794 # define isgraph(c) (isprint(c) && (c != ' ')) 795 796 # ifndef IDENTPROTO 797 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 798 # endif 799 800 # ifndef _PATH_UNIX 801 # define _PATH_UNIX "/dynix" 802 # endif 803 # ifndef _PATH_SENDMAILCF 804 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 805 # endif 806 807 #endif 808 809 810 /* 811 ** Sequent DYNIX/ptx v2.0 (and higher) 812 ** 813 ** For DYNIX/ptx v1.x, undefine HASSETREUID. 814 ** 815 ** From Tim Wright <timw@sequent.com>. 816 */ 817 818 #ifdef _SEQUENT_ 819 # define SYSTEM5 1 /* include all the System V defines */ 820 # define HASSETSID 1 /* has POSIX setsid(2) call */ 821 # define HASINITGROUPS 1 /* has initgroups(3) call */ 822 # define HASSETREUID 1 /* has setreuid(2) call */ 823 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 824 # define GIDSET_T gid_t 825 # define LA_TYPE LA_INT 826 # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 827 # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 828 # ifndef IDENTPROTO 829 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 830 # endif 831 # ifndef _PATH_SENDMAILCF 832 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 833 # endif 834 # ifndef _PATH_SENDMAILPID 835 # define _PATH_SENDMAILPID "/etc/sendmail.pid" 836 # endif 837 #endif 838 839 840 /* 841 ** Cray Unicos 842 ** 843 ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 844 */ 845 846 #ifdef UNICOS 847 # define SYSTEM5 1 /* include all the System V defines */ 848 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 849 # define MAXPATHLEN PATHSIZE 850 # define LA_TYPE LA_ZERO 851 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 852 #endif 853 854 855 /* 856 ** Apollo DomainOS 857 ** 858 ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 859 ** 860 ** 15 Jan 1994 861 ** 862 */ 863 864 #ifdef apollo 865 # define HASSETREUID 1 /* has setreuid(2) call */ 866 # define HASINITGROUPS 1 /* has initgroups(2) call */ 867 # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 868 # define LA_TYPE LA_SUBR /* use getloadavg.c */ 869 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 870 # ifndef _PATH_SENDMAILCF 871 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 872 # endif 873 # ifndef _PATH_SENDMAILPID 874 # define _PATH_SENDMAILPID "/etc/sendmail.pid" 875 # endif 876 # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 877 # undef S_IFIFO 878 # define S_IFIFO 0010000 879 # ifndef IDENTPROTO 880 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 881 # endif 882 #endif 883 884 885 /* 886 ** UnixWare 1.1.2. 887 ** 888 ** From Evan Champion <evanc@spatial.synapse.org>. 889 */ 890 891 #ifdef UNIXWARE 892 # define SYSTEM5 1 893 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 894 # define HASGETDTABLESIZE 1 895 # define HASSETREUID 1 896 # define HASSETSID 1 897 # define HASINITGROUPS 1 898 # define GIDSET_T gid_t 899 # define SLEEP_T unsigned 900 # define SFS_TYPE SFS_STATVFS 901 # define LA_TYPE LA_ZERO 902 # undef WIFEXITED 903 # undef WEXITSTATUS 904 # define _PATH_UNIX "/unix" 905 # ifndef _PATH_SENDMAILCF 906 # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 907 # endif 908 # ifndef _PATH_SENDMAILPID 909 # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 910 # endif 911 # define SYSLOG_BUFSIZE 128 912 #endif 913 914 915 /* 916 ** Intergraph CLIX 3.1 917 ** 918 ** From Paul Southworth <pauls@locust.cic.net> 919 */ 920 921 #ifdef CLIX 922 # define SYSTEM5 1 /* looks like System V */ 923 # ifndef HASGETUSERSHELL 924 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 925 # endif 926 # define DEV_BSIZE 512 /* device block size not defined */ 927 # define GIDSET_T gid_t 928 # undef LOG /* syslog not available */ 929 # define NEEDFSYNC 1 /* no fsync in system library */ 930 # define GETSHORT _getshort 931 #endif 932 933 934 /* 935 ** NCR 3000 Series (SysVr4) 936 ** 937 ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 938 */ 939 940 #ifdef NCR3000 941 # define __svr4__ 942 # undef BSD 943 # define LA_AVENRUN "avenrun" 944 #endif 945 946 947 /* 948 ** Tandem NonStop-UX SVR4 949 ** 950 ** From Rick McCarty <mccarty@mpd.tandem.com>. 951 */ 952 953 #ifdef NonStop_UX_BXX 954 # define __svr4__ 955 #endif 956 957 958 /* 959 ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 960 ** 961 ** Tested for 1.04 and 1.03 962 ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 963 */ 964 965 #ifdef __H3050R 966 # define SYSTEM5 1 /* include all the System V defines */ 967 # define HASINITGROUPS 1 /* has initgroups(3) call */ 968 # define setreuid(r, e) setresuid(r, e, -1) 969 # define LA_TYPE LA_FLOAT 970 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 971 # define HASSETVBUF /* HI-UX has no setlinebuf */ 972 # ifndef GIDSET_T 973 # define GIDSET_T gid_t 974 # endif 975 # ifndef _PATH_UNIX 976 # define _PATH_UNIX "/HI-UX" 977 # endif 978 # ifndef _PATH_SENDMAILCF 979 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 980 # endif 981 # ifndef IDENTPROTO 982 # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 983 # endif 984 # ifndef HASGETUSERSHELL 985 # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 986 # endif 987 988 /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 989 # undef m_flags 990 991 # ifdef __STDC__ 992 extern int syslog(int, char *, ...); 993 # endif 994 995 #endif 996 997 998 /* 999 ** Amdahl UTS System V 2.1.5 (SVr3-based) 1000 ** 1001 ** From: Janet Jackson <janet@dialix.oz.au>. 1002 */ 1003 1004 #ifdef _UTS 1005 # include <sys/sysmacros.h> 1006 # undef HASLSTAT /* has symlinks, but they cause problems */ 1007 # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 1008 # define SYS5SIGNALS 1 /* System V signal semantics */ 1009 # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 1010 # define HASUNAME 1 /* use System V uname(2) system call */ 1011 # define HASINITGROUPS 1 /* has initgroups(3) function */ 1012 # define HASSETVBUF 1 /* has setvbuf(3) function */ 1013 # define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */ 1014 # ifndef HASGETUSERSHELL 1015 # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 1016 # endif 1017 # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 1018 # define LA_TYPE LA_ZERO /* doesn't have load average */ 1019 # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 1020 # define _PATH_UNIX "/unix" 1021 # ifndef _PATH_SENDMAILCF 1022 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 1023 # endif 1024 #endif 1025 1026 1027 1028 1029 /********************************************************************** 1030 ** End of Per-Operating System defines 1031 **********************************************************************/ 1032 1033 /********************************************************************** 1034 ** More general defines 1035 **********************************************************************/ 1036 1037 /* general BSD defines */ 1038 #ifdef BSD 1039 # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 1040 # define HASSETREUID 1 /* has setreuid(2) call */ 1041 # define HASINITGROUPS 1 /* has initgroups(3) call */ 1042 # ifndef HASSETRLIMIT 1043 # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 1044 # endif 1045 # ifndef HASFLOCK 1046 # define HASFLOCK 1 /* has flock(2) call */ 1047 # endif 1048 # ifndef TZ_TYPE 1049 # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 1050 # endif 1051 #endif 1052 1053 /* general System V Release 4 defines */ 1054 #ifdef __svr4__ 1055 # define SYSTEM5 1 1056 # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 1057 # define HASINITGROUPS 1 /* has initgroups(3) call */ 1058 # ifndef HASSETRLIMIT 1059 # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 1060 # endif 1061 # ifndef HASGETUSERSHELL 1062 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 1063 # endif 1064 # define setreuid(r, e) seteuid(e) 1065 1066 # ifndef _PATH_UNIX 1067 # define _PATH_UNIX "/unix" 1068 # endif 1069 # ifndef _PATH_SENDMAILCF 1070 # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 1071 # endif 1072 # ifndef _PATH_SENDMAILPID 1073 # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 1074 # endif 1075 # ifndef SYSLOG_BUFSIZE 1076 # define SYSLOG_BUFSIZE 128 1077 # endif 1078 # ifndef SFS_TYPE 1079 # define SFS_TYPE SFS_STATVFS 1080 # endif 1081 #endif 1082 1083 /* general System V defines */ 1084 #ifdef SYSTEM5 1085 # include <sys/sysmacros.h> 1086 # define HASUNAME 1 /* use System V uname(2) system call */ 1087 # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 1088 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 1089 # ifndef HASULIMIT 1090 # define HASULIMIT 1 /* has the ulimit(2) syscall */ 1091 # endif 1092 # ifndef LA_TYPE 1093 # define LA_TYPE LA_INT /* assume integer load average */ 1094 # endif 1095 # ifndef SFS_TYPE 1096 # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 1097 # endif 1098 # ifndef TZ_TYPE 1099 # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 1100 # endif 1101 # ifndef ALTOS_SYS_V 1102 # define bcopy(s, d, l) (memmove((d), (s), (l))) 1103 # define bzero(d, l) (memset((d), '\0', (l))) 1104 # define bcmp(s, d, l) (memcmp((s), (d), (l))) 1105 # endif 1106 #endif 1107 1108 /* general POSIX defines */ 1109 #ifdef _POSIX_VERSION 1110 # define HASSETSID 1 /* has Posix setsid(2) call */ 1111 # define HASWAITPID 1 /* has Posix waitpid(2) call */ 1112 #endif 1113 1114 /* 1115 ** If no type for argument two of getgroups call is defined, assume 1116 ** it's an integer -- unfortunately, there seem to be several choices 1117 ** here. 1118 */ 1119 1120 #ifndef GIDSET_T 1121 # define GIDSET_T int 1122 #endif 1123 1124 /* 1125 ** Tweaking for systems that (for example) claim to be BSD but 1126 ** don't have all the standard BSD routines (boo hiss). 1127 */ 1128 1129 #ifdef titan 1130 # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 1131 #endif 1132 1133 1134 /* 1135 ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 1136 ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 1137 ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 1138 ** are closed. Some firewalls return this error if you try to connect 1139 ** to the IDENT port (113), so you can't receive email from these hosts 1140 ** on these systems. The firewall really should use a more specific 1141 ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 1142 ** not explicitly set to zero above, default it on. 1143 */ 1144 1145 #ifndef IDENTPROTO 1146 # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 1147 #endif 1148 1149 #ifndef HASGETUSERSHELL 1150 # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 1151 #endif 1152 1153 #ifndef HASFLOCK 1154 # define HASFLOCK 0 /* assume no flock(2) support */ 1155 #endif 1156 1157 #ifndef HASSETRLIMIT 1158 # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 1159 #endif 1160 1161 #ifndef HASULIMIT 1162 # define HASULIMIT 0 /* assume no ulimit(2) support */ 1163 #endif 1164 1165 #ifndef OLD_NEWDB 1166 # define OLD_NEWDB 0 /* assume newer version of newdb */ 1167 #endif 1168 1169 /* heuristic setting of HASSETSIGMASK; can override above */ 1170 #ifndef HASSIGSETMASK 1171 # ifdef SIGVTALRM 1172 # define HASSETSIGMASK 1 1173 # else 1174 # define HASSETSIGMASK 0 1175 # endif 1176 #endif 1177 1178 1179 /********************************************************************** 1180 ** Remaining definitions should never have to be changed. They are 1181 ** primarily to provide back compatibility for older systems -- for 1182 ** example, it includes some POSIX compatibility definitions 1183 **********************************************************************/ 1184 1185 /* System 5 compatibility */ 1186 #ifndef S_ISREG 1187 # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 1188 #endif 1189 #if !defined(S_ISLNK) && defined(S_IFLNK) 1190 # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 1191 #endif 1192 #ifndef S_IWGRP 1193 #define S_IWGRP 020 1194 #endif 1195 #ifndef S_IWOTH 1196 #define S_IWOTH 002 1197 #endif 1198 1199 /* 1200 ** Older systems don't have this error code -- it should be in 1201 ** /usr/include/sysexits.h. 1202 */ 1203 1204 # ifndef EX_CONFIG 1205 # define EX_CONFIG 78 /* configuration error */ 1206 # endif 1207 1208 /* pseudo-code used in server SMTP */ 1209 # define EX_QUIT 22 /* drop out of server immediately */ 1210 1211 1212 /* 1213 ** These are used in a few cases where we need some special 1214 ** error codes, but where the system doesn't provide something 1215 ** reasonable. They are printed in errstring. 1216 */ 1217 1218 #ifndef E_PSEUDOBASE 1219 # define E_PSEUDOBASE 256 1220 #endif 1221 1222 #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 1223 #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 1224 1225 /* type of arbitrary pointer */ 1226 #ifndef ARBPTR_T 1227 # define ARBPTR_T void * 1228 #endif 1229 1230 #ifndef __P 1231 # include "cdefs.h" 1232 #endif 1233 1234 #if NAMED_BIND 1235 # include <arpa/nameser.h> 1236 # ifdef __svr4__ 1237 # ifdef NOERROR 1238 # undef NOERROR /* avoid compiler conflict with stream.h */ 1239 # endif 1240 # endif 1241 #endif 1242 1243 /* 1244 ** The size of an IP address -- can't use sizeof because of problems 1245 ** on Crays, where everything is 64 bits. This will break if/when 1246 ** IP addresses are expanded to eight bytes. 1247 */ 1248 1249 #ifndef INADDRSZ 1250 # define INADDRSZ 4 1251 #endif 1252 1253 /* 1254 ** The size of various known types -- for reading network protocols. 1255 ** Again, we can't use sizeof because of compiler randomness. 1256 */ 1257 1258 #ifndef INT16SZ 1259 # define INT16SZ 2 1260 #endif 1261 #ifndef INT32SZ 1262 # define INT32SZ 4 1263 #endif 1264 1265 /* 1266 ** Do some required dependencies 1267 */ 1268 1269 #if defined(NETINET) || defined(NETISO) 1270 # define SMTP 1 /* enable user and server SMTP */ 1271 # define QUEUE 1 /* enable queueing */ 1272 # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 1273 #endif 1274 1275 1276 /* 1277 ** Arrange to use either varargs or stdargs 1278 */ 1279 1280 # ifdef __STDC__ 1281 1282 # include <stdarg.h> 1283 1284 # define VA_LOCAL_DECL va_list ap; 1285 # define VA_START(f) va_start(ap, f) 1286 # define VA_END va_end(ap) 1287 1288 # else 1289 1290 # include <varargs.h> 1291 1292 # define VA_LOCAL_DECL va_list ap; 1293 # define VA_START(f) va_start(ap) 1294 # define VA_END va_end(ap) 1295 1296 # endif 1297 1298 #ifdef HASUNAME 1299 # include <sys/utsname.h> 1300 # ifdef newstr 1301 # undef newstr 1302 # endif 1303 #else /* ! HASUNAME */ 1304 # define NODE_LENGTH 32 1305 struct utsname 1306 { 1307 char nodename[NODE_LENGTH+1]; 1308 }; 1309 #endif /* HASUNAME */ 1310 1311 #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 1312 # define MAXHOSTNAMELEN 256 1313 #endif 1314 1315 #if !defined(SIGCHLD) && defined(SIGCLD) 1316 # define SIGCHLD SIGCLD 1317 #endif 1318 1319 #ifndef STDIN_FILENO 1320 #define STDIN_FILENO 0 1321 #endif 1322 1323 #ifndef STDOUT_FILENO 1324 #define STDOUT_FILENO 1 1325 #endif 1326 1327 #ifndef STDERR_FILENO 1328 #define STDERR_FILENO 2 1329 #endif 1330 1331 #ifndef LOCK_SH 1332 # define LOCK_SH 0x01 /* shared lock */ 1333 # define LOCK_EX 0x02 /* exclusive lock */ 1334 # define LOCK_NB 0x04 /* non-blocking lock */ 1335 # define LOCK_UN 0x08 /* unlock */ 1336 #endif 1337 1338 #ifndef SIG_ERR 1339 # define SIG_ERR ((void (*)()) -1) 1340 #endif 1341 1342 #ifndef WEXITSTATUS 1343 # define WEXITSTATUS(st) (((st) >> 8) & 0377) 1344 #endif 1345 #ifndef WIFEXITED 1346 # define WIFEXITED(st) (((st) & 0377) == 0) 1347 #endif 1348 1349 #ifndef SIGFUNC_DEFINED 1350 typedef void (*sigfunc_t) __P((int)); 1351 #endif 1352 1353 /* size of syslog buffer */ 1354 #ifndef SYSLOG_BUFSIZE 1355 # define SYSLOG_BUFSIZE 1024 1356 #endif 1357 1358 /* 1359 ** Size of tobuf (deliver.c) 1360 ** Tweak this to match your syslog implementation. It will have to 1361 ** allow for the extra information printed. 1362 */ 1363 1364 #ifndef TOBUFSIZE 1365 # if (SYSLOG_BUFSIZE) > 512 1366 # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 1367 # else 1368 # define TOBUFSIZE 256 1369 # endif 1370 #endif 1371 1372 /* 1373 ** Size of prescan buffer. 1374 ** Despite comments in the _sendmail_ book, this probably should 1375 ** not be changed; there are some hard-to-define dependencies. 1376 */ 1377 1378 # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 1379 /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 1380 # ifndef FORK 1381 # define FORK vfork /* function to call to fork mailer */ 1382 # endif 1383 1384 /* 1385 ** If we are going to link scanf anyway, use it in readcf 1386 */ 1387 1388 #if !defined(HASUNAME) && !defined(SCANF) 1389 # define SCANF 1 1390 #endif 1391