1 /* 2 * Copyright (c) 1983 Eric P. Allman 3 * Copyright (c) 1988 Regents of the University of California. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms are permitted 7 * provided that the above copyright notice and this paragraph are 8 * duplicated in all such forms and that any documentation, 9 * advertising materials, and other materials related to such 10 * distribution and use acknowledge that the software was developed 11 * by the University of California, Berkeley. The name of the 12 * University may not be used to endorse or promote products derived 13 * from this software without specific prior written permission. 14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17 * 18 * @(#)sendmail.h 5.15 (Berkeley) 04/18/90 19 */ 20 21 /* 22 ** SENDMAIL.H -- Global definitions for sendmail. 23 */ 24 25 # ifdef _DEFINE 26 # define EXTERN 27 # ifndef lint 28 static char SmailSccsId[] = "@(#)sendmail.h 5.15 04/18/90"; 29 # endif lint 30 # else _DEFINE 31 # define EXTERN extern 32 # endif _DEFINE 33 34 # include <stdio.h> 35 # include <ctype.h> 36 # include <setjmp.h> 37 # include "conf.h" 38 # include "useful.h" 39 40 # ifdef LOG 41 # include <sys/syslog.h> 42 # endif LOG 43 44 # ifdef DAEMON 45 # ifdef VMUNIX 46 # include <sys/socket.h> 47 # include <netinet/in.h> 48 # endif VMUNIX 49 # endif DAEMON 50 51 52 # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 53 54 55 /* 56 ** Data structure for bit maps. 57 ** 58 ** Each bit in this map can be referenced by an ascii character. 59 ** This is 128 possible bits, or 12 8-bit bytes. 60 */ 61 62 #define BITMAPBYTES 16 /* number of bytes in a bit map */ 63 #define BYTEBITS 8 /* number of bits in a byte */ 64 65 /* internal macros */ 66 #define _BITWORD(bit) (bit / (BYTEBITS * sizeof (int))) 67 #define _BITBIT(bit) (1 << (bit % (BYTEBITS * sizeof (int)))) 68 69 typedef int BITMAP[BITMAPBYTES / sizeof (int)]; 70 71 /* test bit number N */ 72 #define bitnset(bit, map) ((map)[_BITWORD(bit)] & _BITBIT(bit)) 73 74 /* set bit number N */ 75 #define setbitn(bit, map) (map)[_BITWORD(bit)] |= _BITBIT(bit) 76 77 /* clear bit number N */ 78 #define clrbitn(bit, map) (map)[_BITWORD(bit)] &= ~_BITBIT(bit) 79 80 /* clear an entire bit map */ 81 #define clrbitmap(map) bzero((char *) map, BITMAPBYTES) 82 /* 83 ** Address structure. 84 ** Addresses are stored internally in this structure. 85 */ 86 87 struct address 88 { 89 char *q_paddr; /* the printname for the address */ 90 char *q_user; /* user name */ 91 char *q_ruser; /* real user name, or NULL if q_user */ 92 char *q_host; /* host name */ 93 struct mailer *q_mailer; /* mailer to use */ 94 u_short q_flags; /* status flags, see below */ 95 short q_uid; /* user-id of receiver (if known) */ 96 short q_gid; /* group-id of receiver (if known) */ 97 char *q_home; /* home dir (local mailer only) */ 98 char *q_fullname; /* full name if known */ 99 struct address *q_next; /* chain */ 100 struct address *q_alias; /* address this results from */ 101 struct address *q_tchain; /* temporary use chain */ 102 time_t q_timeout; /* timeout for this address */ 103 }; 104 105 typedef struct address ADDRESS; 106 107 # define QDONTSEND 000001 /* don't send to this address */ 108 # define QBADADDR 000002 /* this address is verified bad */ 109 # define QGOODUID 000004 /* the q_uid q_gid fields are good */ 110 # define QPRIMARY 000010 /* set from argv */ 111 # define QQUEUEUP 000020 /* queue for later transmission */ 112 /* 113 ** Mailer definition structure. 114 ** Every mailer known to the system is declared in this 115 ** structure. It defines the pathname of the mailer, some 116 ** flags associated with it, and the argument vector to 117 ** pass to it. The flags are defined in conf.c 118 ** 119 ** The argument vector is expanded before actual use. All 120 ** words except the first are passed through the macro 121 ** processor. 122 */ 123 124 struct mailer 125 { 126 char *m_name; /* symbolic name of this mailer */ 127 char *m_mailer; /* pathname of the mailer to use */ 128 BITMAP m_flags; /* status flags, see below */ 129 short m_mno; /* mailer number internally */ 130 char **m_argv; /* template argument vector */ 131 short m_s_rwset; /* rewriting set for sender addresses */ 132 short m_r_rwset; /* rewriting set for recipient addresses */ 133 char *m_eol; /* end of line string */ 134 long m_maxsize; /* size limit on message to this mailer */ 135 }; 136 137 typedef struct mailer MAILER; 138 139 /* bits for m_flags */ 140 # define M_CANONICAL 'C' /* make addresses canonical "u@dom" */ 141 # define M_EXPENSIVE 'e' /* it costs to use this mailer.... */ 142 # define M_ESCFROM 'E' /* escape From lines to >From */ 143 # define M_FOPT 'f' /* mailer takes picky -f flag */ 144 # define M_HST_UPPER 'h' /* preserve host case distinction */ 145 # define M_INTERNAL 'I' /* SMTP to another sendmail site */ 146 # define M_LOCAL 'l' /* delivery is to this host */ 147 # define M_LIMITS 'L' /* must enforce SMTP line limits */ 148 # define M_MUSER 'm' /* can handle multiple users at once */ 149 # define M_NHDR 'n' /* don't insert From line */ 150 # define M_FROMPATH 'p' /* use reverse-path in MAIL FROM: */ 151 # define M_ROPT 'r' /* mailer takes picky -r flag */ 152 # define M_SECURE_PORT 'R' /* try to send on a reserved TCP port */ 153 # define M_STRIPQ 's' /* strip quote chars from user/host */ 154 # define M_RESTR 'S' /* must be daemon to execute */ 155 # define M_USR_UPPER 'u' /* preserve user case distinction */ 156 # define M_UGLYUUCP 'U' /* this wants an ugly UUCP from line */ 157 # define M_XDOT 'X' /* use hidden-dot algorithm */ 158 159 EXTERN MAILER *Mailer[MAXMAILERS+1]; 160 161 EXTERN MAILER *LocalMailer; /* ptr to local mailer */ 162 EXTERN MAILER *ProgMailer; /* ptr to program mailer */ 163 /* 164 ** Header structure. 165 ** This structure is used internally to store header items. 166 */ 167 168 struct header 169 { 170 char *h_field; /* the name of the field */ 171 char *h_value; /* the value of that field */ 172 struct header *h_link; /* the next header */ 173 u_short h_flags; /* status bits, see below */ 174 BITMAP h_mflags; /* m_flags bits needed */ 175 }; 176 177 typedef struct header HDR; 178 179 /* 180 ** Header information structure. 181 ** Defined in conf.c, this struct declares the header fields 182 ** that have some magic meaning. 183 */ 184 185 struct hdrinfo 186 { 187 char *hi_field; /* the name of the field */ 188 u_short hi_flags; /* status bits, see below */ 189 }; 190 191 extern struct hdrinfo HdrInfo[]; 192 193 /* bits for h_flags and hi_flags */ 194 # define H_EOH 00001 /* this field terminates header */ 195 # define H_RCPT 00002 /* contains recipient addresses */ 196 # define H_DEFAULT 00004 /* if another value is found, drop this */ 197 # define H_RESENT 00010 /* this address is a "Resent-..." address */ 198 # define H_CHECK 00020 /* check h_mflags against m_flags */ 199 # define H_ACHECK 00040 /* ditto, but always (not just default) */ 200 # define H_FORCE 00100 /* force this field, even if default */ 201 # define H_TRACE 00200 /* this field contains trace information */ 202 # define H_FROM 00400 /* this is a from-type field */ 203 # define H_VALID 01000 /* this field has a validated value */ 204 /* 205 ** Envelope structure. 206 ** This structure defines the message itself. There is usually 207 ** only one of these -- for the message that we originally read 208 ** and which is our primary interest -- but other envelopes can 209 ** be generated during processing. For example, error messages 210 ** will have their own envelope. 211 */ 212 213 struct envelope 214 { 215 HDR *e_header; /* head of header list */ 216 long e_msgpriority; /* adjusted priority of this message */ 217 time_t e_ctime; /* time message appeared in the queue */ 218 char *e_to; /* the target person */ 219 char *e_receiptto; /* return receipt address */ 220 ADDRESS e_from; /* the person it is from */ 221 char **e_fromdomain; /* the domain part of the sender */ 222 ADDRESS *e_sendqueue; /* list of message recipients */ 223 ADDRESS *e_errorqueue; /* the queue for error responses */ 224 long e_msgsize; /* size of the message in bytes */ 225 int e_nrcpts; /* number of recipients */ 226 short e_class; /* msg class (priority, junk, etc.) */ 227 short e_flags; /* flags, see below */ 228 short e_hopcount; /* number of times processed */ 229 int (*e_puthdr)(); /* function to put header of message */ 230 int (*e_putbody)(); /* function to put body of message */ 231 struct envelope *e_parent; /* the message this one encloses */ 232 struct envelope *e_sibling; /* the next envelope of interest */ 233 char *e_df; /* location of temp file */ 234 FILE *e_dfp; /* temporary file */ 235 char *e_id; /* code for this entry in queue */ 236 FILE *e_xfp; /* transcript file */ 237 char *e_message; /* error message */ 238 char *e_macro[128]; /* macro definitions */ 239 }; 240 241 typedef struct envelope ENVELOPE; 242 243 /* values for e_flags */ 244 #define EF_OLDSTYLE 000001 /* use spaces (not commas) in hdrs */ 245 #define EF_INQUEUE 000002 /* this message is fully queued */ 246 #define EF_TIMEOUT 000004 /* this message is too old */ 247 #define EF_CLRQUEUE 000010 /* disk copy is no longer needed */ 248 #define EF_SENDRECEIPT 000020 /* send a return receipt */ 249 #define EF_FATALERRS 000040 /* fatal errors occured */ 250 #define EF_KEEPQUEUE 000100 /* keep queue files always */ 251 #define EF_RESPONSE 000200 /* this is an error or return receipt */ 252 #define EF_RESENT 000400 /* this message is being forwarded */ 253 254 EXTERN ENVELOPE *CurEnv; /* envelope currently being processed */ 255 /* 256 ** Message priority classes. 257 ** 258 ** The message class is read directly from the Priority: header 259 ** field in the message. 260 ** 261 ** CurEnv->e_msgpriority is the number of bytes in the message plus 262 ** the creation time (so that jobs ``tend'' to be ordered correctly), 263 ** adjusted by the message class, the number of recipients, and the 264 ** amount of time the message has been sitting around. This number 265 ** is used to order the queue. Higher values mean LOWER priority. 266 ** 267 ** Each priority class point is worth WkClassFact priority points; 268 ** each recipient is worth WkRecipFact priority points. Each time 269 ** we reprocess a message the priority is adjusted by WkTimeFact. 270 ** WkTimeFact should normally decrease the priority so that jobs 271 ** that have historically failed will be run later; thanks go to 272 ** Jay Lepreau at Utah for pointing out the error in my thinking. 273 ** 274 ** The "class" is this number, unadjusted by the age or size of 275 ** this message. Classes with negative representations will have 276 ** error messages thrown away if they are not local. 277 */ 278 279 struct priority 280 { 281 char *pri_name; /* external name of priority */ 282 int pri_val; /* internal value for same */ 283 }; 284 285 EXTERN struct priority Priorities[MAXPRIORITIES]; 286 EXTERN int NumPriorities; /* pointer into Priorities */ 287 /* 288 ** Rewrite rules. 289 */ 290 291 struct rewrite 292 { 293 char **r_lhs; /* pattern match */ 294 char **r_rhs; /* substitution value */ 295 struct rewrite *r_next;/* next in chain */ 296 }; 297 298 EXTERN struct rewrite *RewriteRules[MAXRWSETS]; 299 300 /* 301 ** Special characters in rewriting rules. 302 ** These are used internally only. 303 ** The COND* rules are actually used in macros rather than in 304 ** rewriting rules, but are given here because they 305 ** cannot conflict. 306 */ 307 308 /* left hand side items */ 309 # define MATCHZANY '\020' /* match zero or more tokens */ 310 # define MATCHANY '\021' /* match one or more tokens */ 311 # define MATCHONE '\022' /* match exactly one token */ 312 # define MATCHCLASS '\023' /* match one token in a class */ 313 # define MATCHNCLASS '\024' /* match anything not in class */ 314 # define MATCHREPL '\025' /* replacement on RHS for above */ 315 316 /* right hand side items */ 317 # define CANONNET '\026' /* canonical net, next token */ 318 # define CANONHOST '\027' /* canonical host, next token */ 319 # define CANONUSER '\030' /* canonical user, next N tokens */ 320 # define CALLSUBR '\031' /* call another rewriting set */ 321 322 /* conditionals in macros */ 323 # define CONDIF '\032' /* conditional if-then */ 324 # define CONDELSE '\033' /* conditional else */ 325 # define CONDFI '\034' /* conditional fi */ 326 327 /* bracket characters for host name lookup */ 328 # define HOSTBEGIN '\035' /* hostname lookup begin */ 329 # define HOSTEND '\036' /* hostname lookup end */ 330 331 /* \001 is also reserved as the macro expansion character */ 332 /* 333 ** Information about hosts that we have looked up recently. 334 ** 335 ** This stuff is 4.2/3bsd specific. 336 */ 337 338 # ifdef DAEMON 339 # ifdef VMUNIX 340 341 # define HOSTINFO struct hostinfo 342 343 HOSTINFO 344 { 345 char *ho_name; /* name of this host */ 346 struct in_addr ho_inaddr; /* internet address */ 347 short ho_flags; /* flag bits, see below */ 348 short ho_errno; /* error number on last connection */ 349 short ho_exitstat; /* exit status from last connection */ 350 }; 351 352 353 /* flag bits */ 354 #define HOF_VALID 00001 /* this entry is valid */ 355 356 # endif VMUNIX 357 # endif DAEMON 358 /* 359 ** Symbol table definitions 360 */ 361 362 struct symtab 363 { 364 char *s_name; /* name to be entered */ 365 char s_type; /* general type (see below) */ 366 struct symtab *s_next; /* pointer to next in chain */ 367 union 368 { 369 BITMAP sv_class; /* bit-map of word classes */ 370 ADDRESS *sv_addr; /* pointer to address header */ 371 MAILER *sv_mailer; /* pointer to mailer */ 372 char *sv_alias; /* alias */ 373 # ifdef HOSTINFO 374 HOSTINFO sv_host; /* host information */ 375 # endif HOSTINFO 376 } s_value; 377 }; 378 379 typedef struct symtab STAB; 380 381 /* symbol types */ 382 # define ST_UNDEF 0 /* undefined type */ 383 # define ST_CLASS 1 /* class map */ 384 # define ST_ADDRESS 2 /* an address in parsed format */ 385 # define ST_MAILER 3 /* a mailer header */ 386 # define ST_ALIAS 4 /* an alias */ 387 # define ST_HOST 5 /* host information */ 388 389 # define s_class s_value.sv_class 390 # define s_address s_value.sv_addr 391 # define s_mailer s_value.sv_mailer 392 # define s_alias s_value.sv_alias 393 # define s_host s_value.sv_host 394 395 extern STAB *stab(); 396 397 /* opcodes to stab */ 398 # define ST_FIND 0 /* find entry */ 399 # define ST_ENTER 1 /* enter if not there */ 400 /* 401 ** STRUCT EVENT -- event queue. 402 ** 403 ** Maintained in sorted order. 404 ** 405 ** We store the pid of the process that set this event to insure 406 ** that when we fork we will not take events intended for the parent. 407 */ 408 409 struct event 410 { 411 time_t ev_time; /* time of the function call */ 412 int (*ev_func)(); /* function to call */ 413 int ev_arg; /* argument to ev_func */ 414 int ev_pid; /* pid that set this event */ 415 struct event *ev_link; /* link to next item */ 416 }; 417 418 typedef struct event EVENT; 419 420 EXTERN EVENT *EventQueue; /* head of event queue */ 421 /* 422 ** Operation, send, and error modes 423 ** 424 ** The operation mode describes the basic operation of sendmail. 425 ** This can be set from the command line, and is "send mail" by 426 ** default. 427 ** 428 ** The send mode tells how to send mail. It can be set in the 429 ** configuration file. It's setting determines how quickly the 430 ** mail will be delivered versus the load on your system. If the 431 ** -v (verbose) flag is given, it will be forced to SM_DELIVER 432 ** mode. 433 ** 434 ** The error mode tells how to return errors. 435 */ 436 437 EXTERN char OpMode; /* operation mode, see below */ 438 439 #define MD_DELIVER 'm' /* be a mail sender */ 440 #define MD_ARPAFTP 'a' /* old-style arpanet protocols */ 441 #define MD_SMTP 's' /* run SMTP on standard input */ 442 #define MD_DAEMON 'd' /* run as a daemon */ 443 #define MD_VERIFY 'v' /* verify: don't collect or deliver */ 444 #define MD_TEST 't' /* test mode: resolve addrs only */ 445 #define MD_INITALIAS 'i' /* initialize alias database */ 446 #define MD_PRINT 'p' /* print the queue */ 447 #define MD_FREEZE 'z' /* freeze the configuration file */ 448 449 450 EXTERN char SendMode; /* send mode, see below */ 451 452 #define SM_DELIVER 'i' /* interactive delivery */ 453 #define SM_QUICKD 'j' /* deliver w/o queueing */ 454 #define SM_FORK 'b' /* deliver in background */ 455 #define SM_QUEUE 'q' /* queue, don't deliver */ 456 #define SM_VERIFY 'v' /* verify only (used internally) */ 457 458 /* used only as a parameter to sendall */ 459 #define SM_DEFAULT '\0' /* unspecified, use SendMode */ 460 461 462 EXTERN char ErrorMode; /* error mode, see below */ 463 464 #define EM_PRINT 'p' /* print errors */ 465 #define EM_MAIL 'm' /* mail back errors */ 466 #define EM_WRITE 'w' /* write back errors */ 467 #define EM_BERKNET 'e' /* special berknet processing */ 468 #define EM_QUIET 'q' /* don't print messages (stat only) */ 469 470 /* offset used to issure that the error messages for name server error 471 * codes are unique. 472 */ 473 #define MAX_ERRNO 100 474 /* 475 ** Global variables. 476 */ 477 478 EXTERN bool FromFlag; /* if set, "From" person is explicit */ 479 EXTERN bool NoAlias; /* if set, don't do any aliasing */ 480 EXTERN bool ForceMail; /* if set, mail even if already got a copy */ 481 EXTERN bool MeToo; /* send to the sender also */ 482 EXTERN bool IgnrDot; /* don't let dot end messages */ 483 EXTERN bool SaveFrom; /* save leading "From" lines */ 484 EXTERN bool Verbose; /* set if blow-by-blow desired */ 485 EXTERN bool GrabTo; /* if set, get recipients from msg */ 486 EXTERN bool NoReturn; /* don't return letter to sender */ 487 EXTERN bool SuprErrs; /* set if we are suppressing errors */ 488 EXTERN bool QueueRun; /* currently running message from the queue */ 489 EXTERN bool HoldErrs; /* only output errors to transcript */ 490 EXTERN bool NoConnect; /* don't connect to non-local mailers */ 491 EXTERN bool SuperSafe; /* be extra careful, even if expensive */ 492 EXTERN bool ForkQueueRuns; /* fork for each job when running the queue */ 493 EXTERN bool AutoRebuild; /* auto-rebuild the alias database as needed */ 494 EXTERN bool CheckAliases; /* parse addresses during newaliases */ 495 EXTERN bool UseNameServer; /* use internet domain name server */ 496 EXTERN int SafeAlias; /* minutes to wait until @:@ in alias file */ 497 EXTERN time_t TimeOut; /* time until timeout */ 498 EXTERN FILE *InChannel; /* input connection */ 499 EXTERN FILE *OutChannel; /* output connection */ 500 EXTERN int RealUid; /* when Daemon, real uid of caller */ 501 EXTERN int RealGid; /* when Daemon, real gid of caller */ 502 EXTERN int DefUid; /* default uid to run as */ 503 EXTERN char *DefUser; /* default user to run as (from DefUid) */ 504 EXTERN int DefGid; /* default gid to run as */ 505 EXTERN int OldUmask; /* umask when sendmail starts up */ 506 EXTERN int Errors; /* set if errors (local to single pass) */ 507 EXTERN int ExitStat; /* exit status code */ 508 EXTERN int AliasLevel; /* depth of aliasing */ 509 EXTERN int MotherPid; /* proc id of parent process */ 510 EXTERN int LineNumber; /* line number in current input */ 511 EXTERN time_t ReadTimeout; /* timeout on reads */ 512 EXTERN int LogLevel; /* level of logging to perform */ 513 EXTERN int FileMode; /* mode on files */ 514 EXTERN int QueueLA; /* load average starting forced queueing */ 515 EXTERN int RefuseLA; /* load average refusing connections are */ 516 EXTERN int QueueFactor; /* slope of queue function */ 517 EXTERN time_t QueueIntvl; /* intervals between running the queue */ 518 EXTERN char *AliasFile; /* location of alias file */ 519 EXTERN char *HelpFile; /* location of SMTP help file */ 520 EXTERN char *StatFile; /* location of statistics summary */ 521 EXTERN char *QueueDir; /* location of queue directory */ 522 EXTERN char *FileName; /* name to print on error messages */ 523 EXTERN char *SmtpPhase; /* current phase in SMTP processing */ 524 EXTERN char *MyHostName; /* name of this host for SMTP messages */ 525 EXTERN char *RealHostName; /* name of host we are talking to */ 526 EXTERN struct sockaddr_in RealHostAddr;/* address of host we are talking to */ 527 EXTERN char *CurHostName; /* current host we are dealing with */ 528 EXTERN jmp_buf TopFrame; /* branch-to-top-of-loop-on-error frame */ 529 EXTERN bool QuickAbort; /* .... but only if we want a quick abort */ 530 extern char *ConfFile; /* location of configuration file [conf.c] */ 531 extern char *FreezeFile; /* location of frozen memory image [conf.c] */ 532 extern char Arpa_Info[]; /* the reply code for Arpanet info [conf.c] */ 533 extern ADDRESS NullAddress; /* a null (template) address [main.c] */ 534 EXTERN char SpaceSub; /* substitution for <lwsp> */ 535 EXTERN int WkClassFact; /* multiplier for message class -> priority */ 536 EXTERN int WkRecipFact; /* multiplier for # of recipients -> priority */ 537 EXTERN int WkTimeFact; /* priority offset each time this job is run */ 538 EXTERN int CheckPointLimit; /* deliveries before checkpointing */ 539 EXTERN int Nmx; /* number of MX RRs */ 540 EXTERN char *PostMasterCopy; /* address to get errs cc's */ 541 EXTERN char *MxHosts[MAXMXHOSTS+1]; /* for MX RRs */ 542 EXTERN char *TrustedUsers[MAXTRUST+1]; /* list of trusted users */ 543 EXTERN char *UserEnviron[MAXUSERENVIRON+1]; /* saved user environment */ 544 /* 545 ** Trace information 546 */ 547 548 /* trace vector and macros for debugging flags */ 549 EXTERN u_char tTdvect[100]; 550 # define tTd(flag, level) (tTdvect[flag] >= level) 551 # define tTdlevel(flag) (tTdvect[flag]) 552 /* 553 ** Miscellaneous information. 554 */ 555 556 # include <sysexits.h> 557 558 559 /* 560 ** Some in-line functions 561 */ 562 563 /* set exit status */ 564 #define setstat(s) { \ 565 if (ExitStat == EX_OK || ExitStat == EX_TEMPFAIL) \ 566 ExitStat = s; \ 567 } 568 569 /* make a copy of a string */ 570 #define newstr(s) strcpy(xalloc(strlen(s) + 1), s) 571 572 #define STRUCTCOPY(s, d) d = s 573 574 575 /* 576 ** Declarations of useful functions 577 */ 578 579 extern ADDRESS *parseaddr(); 580 extern char *xalloc(); 581 extern bool sameaddr(); 582 extern FILE *dfopen(); 583 extern EVENT *setevent(); 584 extern char *sfgets(); 585 extern char *queuename(); 586 extern time_t curtime(); 587