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.61 (Berkeley) 12/11/93 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 42 # ifndef QUEUESIZE 43 # define QUEUESIZE 1000 /* max # of jobs per queue run */ 44 # endif 45 46 /********************************************************************** 47 ** Compilation options. 48 ** 49 ** #define these if they are available; comment them out otherwise. 50 **********************************************************************/ 51 52 # define LOG 1 /* enable logging */ 53 # define UGLYUUCP 1 /* output ugly UUCP From lines */ 54 # define NETUNIX 1 /* include unix domain support */ 55 # define NETINET 1 /* include internet support */ 56 # define SETPROCTITLE 1 /* munge argv to display current status */ 57 # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 58 # define MATCHGECOS 1 /* match user names from gecos field */ 59 # define XDEBUG 1 /* enable extended debugging */ 60 61 # ifdef NEWDB 62 # define USERDB 1 /* look in user database (requires NEWDB) */ 63 # endif 64 65 /* 66 ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 67 ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 68 ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 69 ** are closed. Some firewalls return this error if you try to connect 70 ** to the IDENT port (113), so you can't receive email from these hosts 71 ** on these systems. The firewall really should use a more specific 72 ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. This 73 ** will get #undefed below as needed. 74 */ 75 76 #ifndef IDENTPROTO 77 # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 78 #endif 79 80 /* 81 ** Most systems have symbolic links today, so default them on. You 82 ** can turn them off by #undef'ing this below. 83 */ 84 85 # define HASLSTAT 1 /* has lstat(2) call */ 86 87 /* 88 ** General "standard C" defines. 89 ** 90 ** These may be undone later, to cope with systems that claim to 91 ** be Standard C but aren't. Gcc is the biggest offender -- it 92 ** doesn't realize that the library is part of the language. 93 ** 94 ** Life would be much easier if we could get rid of this sort 95 ** of bozo problems. 96 */ 97 98 #ifdef __STDC__ 99 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 100 #endif 101 102 /********************************************************************** 103 ** Operating system configuration. 104 ** 105 ** Unless you are porting to a new OS, you shouldn't have to 106 ** change these. 107 **********************************************************************/ 108 109 /* 110 ** Per-Operating System defines 111 */ 112 113 114 /* 115 ** HP-UX -- tested for 8.07 116 */ 117 118 # ifdef __hpux 119 /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 120 # undef m_flags 121 # define SYSTEM5 1 /* include all the System V defines */ 122 # define HASINITGROUPS 1 /* has initgroups(3) call */ 123 # define HASSTATFS 1 /* has the statfs(2) syscall */ 124 # define HASSETREUID 1 /* has setreuid(2) call */ 125 # define setreuid(r, e) setresuid(r, e, -1) 126 # define LA_TYPE LA_FLOAT 127 # define _PATH_UNIX "/hp-ux" 128 # undef IDENTPROTO /* TCP/IP implementation is broken */ 129 # endif 130 131 132 /* 133 ** IBM AIX 3.x -- actually tested for 3.2.3 134 */ 135 136 # ifdef _AIX3 137 # define HASINITGROUPS 1 /* has initgroups(3) call */ 138 # define HASSTATFS 1 /* has the statfs(2) syscall */ 139 # define HASUNAME 1 /* use System V uname(2) system call */ 140 # define FORK fork /* no vfork primitive available */ 141 # undef SETPROCTITLE /* setproctitle confuses AIX */ 142 # endif 143 144 145 /* 146 ** Silicon Graphics IRIX 147 ** 148 ** Compiles on 4.0.1. 149 */ 150 151 # ifdef IRIX 152 # include <sys/sysmacros.h> 153 # define HASSETREUID 1 /* has setreuid(2) call */ 154 # define HASINITGROUPS 1 /* has initgroups(3) call */ 155 # define HASSTATFS 1 /* has the statfs(2) syscall */ 156 # define FORK fork /* no vfork primitive available */ 157 # define WAITUNION 1 /* use "union wait" as wait argument type */ 158 # define setpgid BSDsetpgrp 159 # define GIDSET_T gid_t 160 # endif 161 162 163 /* 164 ** SunOS and Solaris 165 ** 166 ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 167 ** Solaris 2.2 (a.k.a. SunOS 5.2). 168 */ 169 170 #if defined(sun) && !defined(BSD) 171 172 # define LA_TYPE LA_INT 173 # define HASSETREUID 1 /* has setreuid(2) call */ 174 # define HASINITGROUPS 1 /* has initgroups(3) call */ 175 # define HASUNAME 1 /* use System V uname(2) system call */ 176 177 # ifdef SOLARIS_2_3 178 # define SOLARIS 179 # endif 180 181 # ifdef SOLARIS 182 /* Solaris 2.x (a.k.a. SunOS 5.x) */ 183 # define SYSTEM5 1 /* use System V definitions */ 184 # define setreuid(r, e) seteuid(e) 185 # include <sys/time.h> 186 # define gethostbyname solaris_gethostbyname /* get working version */ 187 # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 188 # define _PATH_UNIX "/kernel/unix" 189 # ifndef _PATH_SENDMAILCF 190 # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 191 # endif 192 # ifndef _PATH_SENDMAILPID 193 # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 194 # endif 195 196 # else 197 /* SunOS 4.1.x */ 198 # define HASSTATFS 1 /* has the statfs(2) syscall */ 199 # define HASFLOCK 1 /* has flock(2) call */ 200 # include <vfork.h> 201 202 # endif 203 #endif 204 205 /* 206 ** DG/UX 207 ** 208 ** Tested on 5.4.2 209 */ 210 211 #ifdef DGUX 212 # define SYSTEM5 1 213 # define LA_TYPE LA_SUBR 214 # define HASSTATFS 1 /* has the statfs(2) syscall */ 215 # define HASSETREUID 1 /* has setreuid(2) call */ 216 # define HASUNAME 1 /* use System V uname(2) system call */ 217 # define HASSETSID 1 /* has Posix setsid(2) call */ 218 # define HASINITGROUPS 1 /* has initgroups(3) call */ 219 # undef IDENTPROTO /* TCP/IP implementation is broken */ 220 # undef SETPROCTITLE 221 222 /* these include files must be included early on DG/UX */ 223 # include <netinet/in.h> 224 # include <arpa/inet.h> 225 226 # define inet_addr dgux_inet_addr 227 extern long dgux_inet_addr(); 228 #endif 229 230 231 /* 232 ** Digital Ultrix 4.2A or 4.3 233 ** 234 ** Apparently, fcntl locking is broken on 4.2A, in that locks are 235 ** not dropped when the process exits. This causes major problems, 236 ** so flock is the only alternative. 237 */ 238 239 #ifdef ultrix 240 # define HASSTATFS 1 /* has the statfs(2) syscall */ 241 # define HASSETREUID 1 /* has setreuid(2) call */ 242 # define HASUNSETENV 1 /* has unsetenv(3) call */ 243 # define HASINITGROUPS 1 /* has initgroups(3) call */ 244 # define HASFLOCK 1 /* has flock(2) call */ 245 # define LA_TYPE LA_INT 246 # define LA_AVENRUN "avenrun" 247 # undef IDENTPROTO /* TCP/IP implementation is broken */ 248 #endif 249 250 251 /* 252 ** OSF/1 (tested on Alpha) 253 */ 254 255 #ifdef __osf__ 256 # define HASSTATFS 1 /* has the statfs(2) syscall */ 257 # define HASUNSETENV 1 /* has unsetenv(3) call */ 258 # define HASSETREUID 1 /* has setreuid(2) call */ 259 # define HASINITGROUPS 1 /* has initgroups(3) call */ 260 # define HASFLOCK 1 /* has flock(2) call */ 261 # define LA_TYPE LA_INT 262 # ifndef _PATH_SENDMAILPID 263 # define _PATH_SENDMAILPID "/var/run/sendmial.pid" 264 # endif 265 #endif 266 267 268 /* 269 ** NeXTstep 270 */ 271 272 #ifdef NeXT 273 # define HASINITGROUPS 1 /* has initgroups(3) call */ 274 # define HASFLOCK 1 /* has flock(2) call */ 275 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 276 # define HASSTATFS 1 /* has the statfs(2) syscall */ 277 # define WAITUNION 1 /* use "union wait" as wait argument type */ 278 # define sleep sleepX 279 # define setpgid setpgrp 280 # ifndef LA_TYPE 281 # define LA_TYPE LA_MACH 282 # endif 283 # ifndef _POSIX_SOURCE 284 typedef int pid_t; 285 # undef WEXITSTATUS 286 # undef WIFEXITED 287 # endif 288 # ifndef _PATH_SENDMAILCF 289 # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 290 # endif 291 # ifndef _PATH_SENDMAILPID 292 # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 293 # endif 294 #endif 295 296 297 /* 298 ** 4.4 BSD 299 ** 300 ** See also BSD defines. 301 */ 302 303 #ifdef BSD4_4 304 # define HASUNSETENV 1 /* has unsetenv(3) call */ 305 # define HASSTATFS 1 /* has the statfs(2) syscall */ 306 # include <sys/cdefs.h> 307 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 308 # ifndef LA_TYPE 309 # define LA_TYPE LA_SUBR 310 # endif 311 #endif 312 313 314 /* 315 ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 316 ** 317 ** 4.3BSD clone, closer to 4.4BSD 318 ** 319 ** See also BSD defines. 320 */ 321 322 #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 323 # define HASUNSETENV 1 /* has unsetenv(3) call */ 324 # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 325 # define HASSTATFS 1 /* has the statfs(2) syscall */ 326 # include <sys/cdefs.h> 327 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 328 # ifndef LA_TYPE 329 # define LA_TYPE LA_SUBR 330 # endif 331 #endif 332 333 334 /* 335 ** Mach386 336 ** 337 ** For mt Xinu's Mach386 system. 338 */ 339 340 #if defined(MACH) && defined(i386) 341 # define MACH386 1 342 # define HASUNSETENV 1 /* has unsetenv(3) call */ 343 # define HASINITGROUPS 1 /* has initgroups(3) call */ 344 # define HASFLOCK 1 /* has flock(2) call */ 345 # define HASSTATFS 1 /* has the statfs(2) syscall */ 346 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 347 # define NEEDSTRTOL 1 /* need the strtol() function */ 348 # define setpgid setpgrp 349 # ifndef LA_TYPE 350 # define LA_TYPE LA_FLOAT 351 # endif 352 # undef HASSETVBUF /* don't actually have setvbuf(3) */ 353 # undef WEXITSTATUS 354 # undef WIFEXITED 355 # ifndef _PATH_SENDMAILCF 356 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 357 # endif 358 # ifndef _PATH_SENDMAILPID 359 # define _PATH_SENDMAILPID "/etc/sendmail.pid" 360 # endif 361 #endif 362 363 364 /* 365 ** 4.3 BSD -- this is for very old systems 366 ** 367 ** You'll also have to install a new resolver library. 368 ** I don't guarantee that support for this environment is complete. 369 */ 370 371 #ifdef oldBSD43 372 # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 373 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 374 # define ARBPTR_T char * 375 # define setpgid setpgrp 376 # ifndef LA_TYPE 377 # define LA_TYPE LA_FLOAT 378 # endif 379 # ifndef _PATH_SENDMAILCF 380 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 381 # endif 382 # undef IDENTPROTO /* TCP/IP implementation is broken */ 383 # undef WEXITSTATUS 384 # undef WIFEXITED 385 typedef short pid_t; 386 extern int errno; 387 #endif 388 389 390 /* 391 ** SCO Unix 392 ** 393 ** This includes two parts -- the first is for SCO Open Server 3.2v4 394 ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 395 ** The second is, I believe, for an older version. 396 */ 397 398 #ifdef _SCO_unix_4_2 399 # define _SCO_unix_ 400 # define HASSETREUID 1 /* has setreuid(2) call */ 401 # define _PATH_UNIX "/unix" 402 # ifndef _PATH_SENDMAILCF 403 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 404 # endif 405 # ifndef _PATH_SENDMAILPID 406 # define _PATH_SENDMAILPID "/etc/sendmail.pid" 407 # endif 408 #endif 409 410 #ifdef _SCO_unix_ 411 # define SYSTEM5 1 /* include all the System V defines */ 412 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 413 # define HASSTATFS 1 /* has the statfs(2) syscall */ 414 # define FORK fork 415 # define MAXPATHLEN PATHSIZE 416 # define LA_TYPE LA_SHORT 417 # undef NETUNIX /* no unix domain socket support */ 418 #endif 419 420 421 /* 422 ** ConvexOS 11.0 and later 423 */ 424 425 #ifdef _CONVEX_SOURCE 426 # define BSD 1 /* include all the BSD defines */ 427 # define HASUNAME 1 /* use System V uname(2) system call */ 428 # define HASSTATFS 1 /* has the statfs(2) syscall */ 429 # define HASSETSID 1 /* has POSIX setsid(2) call */ 430 # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 431 # define LA_TYPE LA_FLOAT 432 # undef IDENTPROTO 433 #endif 434 435 436 /* 437 ** RISC/os 4.52 438 ** 439 ** Gives a ton of warning messages, but otherwise compiles. 440 */ 441 442 #ifdef RISCOS 443 444 # define HASUNSETENV 1 /* has unsetenv(3) call */ 445 # define HASFLOCK 1 /* has flock(2) call */ 446 # define WAITUNION 1 /* use "union wait" as wait argument type */ 447 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 448 # define LA_TYPE LA_INT 449 # define LA_AVENRUN "avenrun" 450 # define _PATH_UNIX "/unix" 451 # undef WIFEXITED 452 453 # define setpgid setpgrp 454 455 extern int errno; 456 typedef int pid_t; 457 #define SIGFUNC_DEFINED 458 typedef int (*sigfunc_t)(); 459 extern char *getenv(); 460 extern void *malloc(); 461 462 #endif 463 464 465 /* 466 ** Linux 0.99pl10 and above... 467 ** From Karl London <karl@borg.demon.co.uk>. 468 */ 469 470 #ifdef __linux__ 471 # define BSD 1 /* pretend to be BSD based today */ 472 # undef NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 473 # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 474 # define HASUNSETENV 1 /* has unsetenv(3) call */ 475 # ifndef LA_TYPE 476 # define LA_TYPE LA_FLOAT 477 # endif 478 # include <sys/sysmacros.h> 479 # define GIDSET_T gid_t 480 #endif 481 482 483 /* 484 ** DELL SVR4 Issue 2.2, and others 485 ** From Kimmo Suominen <kim@grendel.lut.fi> 486 ** 487 ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 488 ** defined, and the definitions conflict. 489 ** 490 ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 491 ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 492 ** (SVR4.0/386 version 3.0). 493 */ 494 495 #ifdef DELL_SVR4 496 # define SYSTEM5 1 497 # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 498 # define setreuid(r, e) seteuid(e) 499 /* # include <sys/time.h> */ 500 # define _PATH_UNIX "/unix" 501 # ifndef _PATH_SENDMAILCF 502 # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 503 # endif 504 # ifndef _PATH_SENDMAILPID 505 # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 506 # endif 507 #endif 508 509 510 /* 511 ** Apple A/UX 3.0 512 */ 513 514 #ifdef _AUX_SOURCE 515 # include <sys/sysmacros.h> 516 # define BSD /* has BSD routines */ 517 # define HASSTATFS 1 /* has the statfs(2) syscall */ 518 # define HASUNAME 1 /* use System V uname(2) system call */ 519 # define HASUSTAT 1 /* use System V ustat(2) syscall */ 520 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 521 # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 522 # undef IDENTPROTO /* TCP/IP implementation is broken */ 523 # define FORK fork 524 # ifndef _PATH_SENDMAILCF 525 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 526 # endif 527 # ifndef LA_TYPE 528 # define LA_TYPE LA_ZERO 529 # endif 530 # undef WIFEXITED 531 # undef WEXITSTATUS 532 #endif 533 534 535 /* 536 ** Encore UMAX V 537 ** 538 ** Not extensively tested. 539 */ 540 541 #ifdef UMAXV 542 # include <limits.h> 543 # define HASUNAME 1 /* use System V uname(2) system call */ 544 # define HASSTATFS 1 /* has the statfs(2) syscall */ 545 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 546 # define HASINITGROUPS 1 /* has initgroups(3) call */ 547 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 548 # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 549 # define FORK fork /* no vfork(2) primitive available */ 550 # define MAXPATHLEN PATH_MAX 551 extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 552 extern struct group *getgrent(), *getgrnam(), *getgrgid(); 553 # undef WIFEXITED 554 # undef WEXITSTATUS 555 #endif 556 557 558 /* 559 ** Stardent Titan 3000 running TitanOS 4.2. 560 ** 561 ** Must be compiled in "cc -43" mode. 562 ** 563 ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 564 ** 565 ** Note the tweaking below after the BSD defines are set. 566 */ 567 568 #ifdef titan 569 # define setpgid setpgrp 570 typedef int pid_t; 571 # undef WIFEXITED 572 # undef WEXITSTATUS 573 #endif 574 575 576 /* 577 ** Sequent DYNIX 3.2.0 578 ** 579 ** From Jim Davis <jdavis@cs.arizona.edu>. 580 */ 581 582 #ifdef sequent 583 # define BSD 1 584 # define HASUNSETENV 1 585 # define BSD4_3 1 /* to get signal() in conf.c */ 586 # define WAITUNION 1 587 # define LA_TYPE LA_FLOAT 588 # ifdef _POSIX_VERSION 589 # undef _POSIX_VERSION /* set in <unistd.h> */ 590 # endif 591 # undef HASSETVBUF /* don't actually have setvbuf(3) */ 592 # define setpgid setpgrp 593 594 /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 595 # undef WIFEXITED 596 # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 597 ((union wait*)&(s))->w_termsig == 0) 598 # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 599 typedef int pid_t; 600 # define isgraph(c) (isprint(c) && (c != ' ')) 601 602 # ifndef _PATH_UNIX 603 # define _PATH_UNIX "/dynix" 604 # endif 605 # ifndef _PATH_SENDMAILCF 606 # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 607 # endif 608 609 #endif 610 611 612 613 614 /********************************************************************** 615 ** End of Per-Operating System defines 616 **********************************************************************/ 617 618 /********************************************************************** 619 ** More general defines 620 **********************************************************************/ 621 622 /* general BSD defines */ 623 #ifdef BSD 624 # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 625 # define HASSETREUID 1 /* has setreuid(2) call */ 626 # define HASINITGROUPS 1 /* has initgroups(2) call */ 627 # define HASFLOCK 1 /* has flock(2) call */ 628 #endif 629 630 /* general System V defines */ 631 # ifdef SYSTEM5 632 # include <sys/sysmacros.h> 633 # define HASUNAME 1 /* use System V uname(2) system call */ 634 # define HASUSTAT 1 /* use System V ustat(2) syscall */ 635 # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 636 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 637 # ifndef LA_TYPE 638 # define LA_TYPE LA_INT 639 # endif 640 # define bcopy(s, d, l) (memmove((d), (s), (l))) 641 # define bzero(d, l) (memset((d), '\0', (l))) 642 # define bcmp(s, d, l) (memcmp((s), (d), (l))) 643 # endif 644 645 /* general POSIX defines */ 646 #ifdef _POSIX_VERSION 647 # define HASSETSID 1 /* has Posix setsid(2) call */ 648 # define HASWAITPID 1 /* has Posix waitpid(2) call */ 649 #endif 650 651 /* 652 ** If no type for argument two of getgroups call is defined, assume 653 ** it's an integer -- unfortunately, there seem to be several choices 654 ** here. 655 */ 656 657 #ifndef GIDSET_T 658 # define GIDSET_T int 659 #endif 660 661 /* 662 ** Tweaking for systems that (for example) claim to be BSD but 663 ** don't have all the standard BSD routines (boo hiss). 664 */ 665 666 #ifdef titan 667 # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 668 #endif 669 670 671 /********************************************************************** 672 ** Remaining definitions should never have to be changed. They are 673 ** primarily to provide back compatibility for older systems -- for 674 ** example, it includes some POSIX compatibility definitions 675 **********************************************************************/ 676 677 /* System 5 compatibility */ 678 #ifndef S_ISREG 679 # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 680 #endif 681 #if !defined(S_ISLNK) && defined(S_IFLNK) 682 # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 683 #endif 684 #ifndef S_IWGRP 685 #define S_IWGRP 020 686 #endif 687 #ifndef S_IWOTH 688 #define S_IWOTH 002 689 #endif 690 691 /* 692 ** Older systems don't have this error code -- it should be in 693 ** /usr/include/sysexits.h. 694 */ 695 696 # ifndef EX_CONFIG 697 # define EX_CONFIG 78 /* configuration error */ 698 # endif 699 700 /* pseudo-code used in server SMTP */ 701 # define EX_QUIT 22 /* drop out of server immediately */ 702 703 704 /* 705 ** These are used in a few cases where we need some special 706 ** error codes, but where the system doesn't provide something 707 ** reasonable. They are printed in errstring. 708 */ 709 710 #ifndef E_PSEUDOBASE 711 # define E_PSEUDOBASE 256 712 #endif 713 714 #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 715 #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 716 717 /* type of arbitrary pointer */ 718 #ifndef ARBPTR_T 719 # define ARBPTR_T void * 720 #endif 721 722 #ifndef __P 723 # include "cdefs.h" 724 #endif 725 726 /* 727 ** Do some required dependencies 728 */ 729 730 #if defined(NETINET) || defined(NETISO) 731 # define SMTP 1 /* enable user and server SMTP */ 732 # define QUEUE 1 /* enable queueing */ 733 # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 734 #endif 735 736 737 /* 738 ** Arrange to use either varargs or stdargs 739 */ 740 741 # ifdef __STDC__ 742 743 # include <stdarg.h> 744 745 # define VA_LOCAL_DECL va_list ap; 746 # define VA_START(f) va_start(ap, f) 747 # define VA_END va_end(ap) 748 749 # else 750 751 # include <varargs.h> 752 753 # define VA_LOCAL_DECL va_list ap; 754 # define VA_START(f) va_start(ap) 755 # define VA_END va_end(ap) 756 757 # endif 758 759 #ifdef HASUNAME 760 # include <sys/utsname.h> 761 # ifdef newstr 762 # undef newstr 763 # endif 764 #else /* ! HASUNAME */ 765 # define NODE_LENGTH 32 766 struct utsname 767 { 768 char nodename[NODE_LENGTH+1]; 769 }; 770 #endif /* HASUNAME */ 771 772 #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 773 # define MAXHOSTNAMELEN 256 774 #endif 775 776 #if !defined(SIGCHLD) && defined(SIGCLD) 777 # define SIGCHLD SIGCLD 778 #endif 779 780 #ifndef STDIN_FILENO 781 #define STDIN_FILENO 0 782 #endif 783 784 #ifndef STDOUT_FILENO 785 #define STDOUT_FILENO 1 786 #endif 787 788 #ifndef STDERR_FILENO 789 #define STDERR_FILENO 2 790 #endif 791 792 #ifndef LOCK_SH 793 # define LOCK_SH 0x01 /* shared lock */ 794 # define LOCK_EX 0x02 /* exclusive lock */ 795 # define LOCK_NB 0x04 /* non-blocking lock */ 796 # define LOCK_UN 0x08 /* unlock */ 797 #endif 798 799 #ifndef SIG_ERR 800 # define SIG_ERR ((void (*)()) -1) 801 #endif 802 803 #ifndef WEXITSTATUS 804 # define WEXITSTATUS(st) (((st) >> 8) & 0377) 805 #endif 806 #ifndef WIFEXITED 807 # define WIFEXITED(st) (((st) & 0377) == 0) 808 #endif 809 810 #ifndef SIGFUNC_DEFINED 811 typedef void (*sigfunc_t) __P((int)); 812 #endif 813 814 /* size of syslog buffer */ 815 #ifndef SYSLOG_BUFSIZE 816 # define SYSLOG_BUFSIZE 1024 817 #endif 818 819 /* 820 ** Size of tobuf (deliver.c) 821 ** Tweak this to match your syslog implementation. It will have to 822 ** allow for the extra information printed. 823 */ 824 825 #ifndef TOBUFSIZE 826 # if (SYSLOG_BUFSIZE) > 512 827 # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 828 # else 829 # define TOBUFSIZE 256 830 # endif 831 #endif 832 833 /* 834 ** Size of prescan buffer. 835 ** Despite comments in the _sendmail_ book, this probably should 836 ** not be changed; there are some hard-to-define dependencies. 837 */ 838 839 # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 840 /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 841 # ifndef FORK 842 # define FORK vfork /* function to call to fork mailer */ 843 # endif 844 845 #ifndef IDENTPROTO 846 # define IDENTPROTO 0 /* don't use RFC 1413 */ 847 #endif 848