1295Seric /* 23313Seric ** SENDMAIL.H -- Global definitions for sendmail. 3295Seric */ 4295Seric 5295Seric 6295Seric 74371Seric # ifdef _DEFINE 84371Seric # define EXTERN 95194Seric # ifndef lint 10*10679Seric static char SmailSccsId[] = "@(#)sendmail.h 3.112 02/02/83"; 115194Seric # endif lint 124371Seric # else _DEFINE 134371Seric # define EXTERN extern 144371Seric # endif _DEFINE 15295Seric 164183Seric # include <stdio.h> 174183Seric # include <ctype.h> 187355Seric # include <setjmp.h> 199144Seric # include "conf.h" 201390Seric # include "useful.h" 211390Seric 227674Seric # ifdef LOG 237674Seric # include <syslog.h> 247674Seric # endif LOG 25*10679Seric 26*10679Seric 27*10679Seric /* 28*10679Seric ** Data structure for bit maps. 29*10679Seric ** 30*10679Seric ** Each bit in this map can be referenced by an ascii character. 31*10679Seric ** This is 128 possible bits, or 12 8-bit bytes. 32*10679Seric */ 33*10679Seric 34*10679Seric #define BITMAPBYTES 16 /* number of bytes in a bit map */ 35*10679Seric #define BYTEBITS 8 /* number of bits in a byte */ 36*10679Seric 37*10679Seric /* internal macros */ 38*10679Seric #define _BITWORD(bit) (bit / (BYTEBITS * sizeof (int))) 39*10679Seric #define _BITBIT(bit) (1 << (bit % (BYTEBITS * sizeof (int)))) 40*10679Seric 41*10679Seric typedef int BITMAP[BITMAPBYTES / sizeof (int)]; 42*10679Seric 43*10679Seric /* test bit number N */ 44*10679Seric #define bitnset(bit, map) ((map)[_BITWORD(bit)] & _BITBIT(bit)) 45*10679Seric 46*10679Seric /* set bit number N */ 47*10679Seric #define setbitn(bit, map) (map)[_BITWORD(bit)] |= _BITBIT(bit) 48*10679Seric 49*10679Seric /* clear bit number N */ 50*10679Seric #define clrbitn(bit, map) (map)[_BITWORD(bit)] &= ~_BITBIT(bit) 51*10679Seric 52*10679Seric /* clear an entire bit map */ 53*10679Seric #define clrbitmap(map) bzero((char *) map, BITMAPBYTES / sizeof (int)) 547799Seric /* 553190Seric ** Address structure. 563190Seric ** Addresses are stored internally in this structure. 573190Seric */ 583190Seric 593190Seric struct address 603190Seric { 613190Seric char *q_paddr; /* the printname for the address */ 623190Seric char *q_user; /* user name */ 633190Seric char *q_host; /* host name */ 644597Seric struct mailer *q_mailer; /* mailer to use */ 654149Seric u_short q_flags; /* status flags, see below */ 664213Seric short q_uid; /* user-id of receiver (if known) */ 674398Seric short q_gid; /* group-id of receiver (if known) */ 684079Seric char *q_home; /* home dir (local mailer only) */ 694995Seric char *q_fullname; /* full name if known */ 704995Seric struct address *q_next; /* chain */ 714995Seric struct address *q_alias; /* address this results from */ 725034Seric struct address *q_tchain; /* temporary use chain */ 734987Seric time_t q_timeout; /* timeout for this address */ 743190Seric }; 753190Seric 763190Seric typedef struct address ADDRESS; 773190Seric 783190Seric # define QDONTSEND 000001 /* don't send to this address */ 794068Seric # define QBADADDR 000002 /* this address is verified bad */ 804403Seric # define QGOODUID 000004 /* the q_uid q_gid fields are good */ 814422Seric # define QPRIMARY 000010 /* set from argv */ 824624Seric # define QQUEUEUP 000020 /* queue for later transmission */ 836902Seric /* 84295Seric ** Mailer definition structure. 85295Seric ** Every mailer known to the system is declared in this 86295Seric ** structure. It defines the pathname of the mailer, some 87295Seric ** flags associated with it, and the argument vector to 881390Seric ** pass to it. The flags are defined in conf.c 89295Seric ** 904171Seric ** The argument vector is expanded before actual use. All 914171Seric ** words except the first are passed through the macro 924171Seric ** processor. 93295Seric */ 94295Seric 95295Seric struct mailer 96295Seric { 973190Seric char *m_name; /* symbolic name of this mailer */ 98295Seric char *m_mailer; /* pathname of the mailer to use */ 99*10679Seric BITMAP m_flags; /* status flags, see below */ 1004438Seric short m_mno; /* mailer number internally */ 1013049Seric char **m_argv; /* template argument vector */ 1028061Seric short m_s_rwset; /* rewriting set for sender addresses */ 1038061Seric short m_r_rwset; /* rewriting set for recipient addresses */ 10410323Seric char *m_eol; /* end of line string */ 105*10679Seric long m_maxsize; /* size limit on message to this mailer */ 106295Seric }; 107295Seric 1084100Seric typedef struct mailer MAILER; 1094100Seric 1105601Seric /* bits for m_flags */ 111*10679Seric # define M_FOPT 'f' /* mailer takes picky -f flag */ 112*10679Seric # define M_ROPT 'r' /* mailer takes picky -r flag */ 113*10679Seric # define M_RPATH 'P' /* wants a Return-Path: line */ 114*10679Seric # define M_RESTR 'S' /* must be daemon to execute */ 115*10679Seric # define M_NHDR 'n' /* don't insert From line */ 116*10679Seric # define M_LOCAL 'l' /* delivery is to this host */ 117*10679Seric # define M_STRIPQ 's' /* strip quote chars from user/host */ 118*10679Seric # define M_MUSER 'm' /* can handle multiple users at once */ 119*10679Seric # define M_NEEDFROM 'F' /* need arpa-style From: line */ 120*10679Seric # define M_NEEDDATE 'D' /* need arpa-style Date: line */ 121*10679Seric # define M_MSGID 'M' /* need Message-Id: field */ 122*10679Seric # define M_CANONICAL 'C' /* make addresses canonical "u@dom" */ 123*10679Seric # define M_USR_UPPER 'u' /* preserve user case distinction */ 124*10679Seric # define M_HST_UPPER 'h' /* preserve host case distinction */ 125*10679Seric # define M_FULLNAME 'x' /* want Full-Name field */ 126*10679Seric # define M_UGLYUUCP 'U' /* this wants an ugly UUCP from line */ 127*10679Seric # define M_EXPENSIVE 'e' /* it costs to use this mailer.... */ 128*10679Seric # define M_LIMITS 'L' /* must enforce SMTP line limits */ 129*10679Seric # define M_INTERNAL 'I' /* SMTP to another sendmail site */ 130*10679Seric # define M_FROMPATH 'p' /* use reverse-path in MAIL FROM: */ 131*10679Seric # define M_XDOT 'X' /* use hidden-dot algorithm */ 132295Seric 1334317Seric # define M_ARPAFMT (M_NEEDDATE|M_NEEDFROM|M_MSGID) 1342899Seric 1354597Seric EXTERN MAILER *Mailer[MAXMAILERS+1]; 136295Seric 1374597Seric EXTERN MAILER *LocalMailer; /* ptr to local mailer */ 1384597Seric EXTERN MAILER *ProgMailer; /* ptr to program mailer */ 1396902Seric /* 1402899Seric ** Header structure. 1412899Seric ** This structure is used internally to store header items. 1422899Seric */ 143295Seric 1442899Seric struct header 1452899Seric { 1462899Seric char *h_field; /* the name of the field */ 1472899Seric char *h_value; /* the value of that field */ 1482899Seric struct header *h_link; /* the next header */ 1494149Seric u_short h_flags; /* status bits, see below */ 150*10679Seric BITMAP h_mflags; /* m_flags bits needed */ 1512899Seric }; 152295Seric 1532899Seric typedef struct header HDR; 1542899Seric 155295Seric /* 1562899Seric ** Header information structure. 1572899Seric ** Defined in conf.c, this struct declares the header fields 1582899Seric ** that have some magic meaning. 1592899Seric */ 1602899Seric 1612899Seric struct hdrinfo 1622899Seric { 1632899Seric char *hi_field; /* the name of the field */ 1644149Seric u_short hi_flags; /* status bits, see below */ 1652899Seric }; 1662899Seric 1672899Seric extern struct hdrinfo HdrInfo[]; 1682899Seric 1692899Seric /* bits for h_flags and hi_flags */ 1703060Seric # define H_EOH 00001 /* this field terminates header */ 1715918Seric # define H_RCPT 00002 /* contains recipient addresses */ 1722899Seric # define H_DEFAULT 00004 /* if another value is found, drop this */ 1733386Seric # define H_CHECK 00020 /* check h_mflags against m_flags */ 1743390Seric # define H_ACHECK 00040 /* ditto, but always (not just default) */ 1754149Seric # define H_FORCE 00100 /* force this field, even if default */ 1768061Seric # define H_TRACE 00200 /* this field contains trace information */ 1777761Seric # define H_FROM 00400 /* this is a from-type field */ 1786902Seric /* 1796902Seric ** Envelope structure. 1806902Seric ** This structure defines the message itself. There is usually 1816902Seric ** only one of these -- for the message that we originally read 1826902Seric ** and which is our primary interest -- but other envelopes can 1836902Seric ** be generated during processing. For example, error messages 1846902Seric ** will have their own envelope. 1856902Seric */ 1862899Seric 1876902Seric struct envelope 1886902Seric { 1896987Seric HDR *e_header; /* head of header list */ 1906987Seric long e_msgpriority; /* adjusted priority of this message */ 1917859Seric time_t e_ctime; /* time message appeared in the queue */ 1926987Seric char *e_to; /* the target person */ 1938061Seric char *e_receiptto; /* return receipt address */ 1946987Seric ADDRESS e_from; /* the person it is from */ 1958180Seric char **e_fromdomain; /* the domain part of the sender */ 1966987Seric ADDRESS *e_sendqueue; /* list of message recipients */ 1977044Seric ADDRESS *e_errorqueue; /* the queue for error responses */ 1986987Seric long e_msgsize; /* size of the message in bytes */ 1996987Seric short e_class; /* msg class (priority, junk, etc.) */ 2009336Seric short e_flags; /* flags, see below */ 2019373Seric short e_hopcount; /* number of times processed */ 2026987Seric int (*e_puthdr)(); /* function to put header of message */ 2036987Seric int (*e_putbody)(); /* function to put body of message */ 2046987Seric struct envelope *e_parent; /* the message this one encloses */ 2059336Seric struct envelope *e_sibling; /* the next envelope of interest */ 2066987Seric char *e_df; /* location of temp file */ 2079541Seric FILE *e_dfp; /* temporary file */ 2087810Seric char *e_id; /* code for this entry in queue */ 2099541Seric FILE *e_xfp; /* transcript file */ 21010102Seric char *e_message; /* error message */ 2116987Seric char *e_macro[128]; /* macro definitions */ 2126902Seric }; 2132899Seric 2146902Seric typedef struct envelope ENVELOPE; 2154624Seric 2169336Seric /* values for e_flags */ 2179336Seric #define EF_OLDSTYLE 000001 /* use spaces (not commas) in hdrs */ 2189336Seric #define EF_INQUEUE 000002 /* this message is fully queued */ 2199336Seric #define EF_TIMEOUT 000004 /* this message is too old */ 2209336Seric #define EF_CLRQUEUE 000010 /* disk copy is no longer needed */ 2219336Seric #define EF_SENDRECEIPT 000020 /* send a return receipt */ 2229336Seric #define EF_FATALERRS 000040 /* fatal errors occured */ 2239336Seric #define EF_KEEPQUEUE 000100 /* keep queue files always */ 2249373Seric #define EF_RESPONSE 000200 /* this is an error or return receipt */ 2259336Seric 2266902Seric EXTERN ENVELOPE *CurEnv; /* envelope currently being processed */ 2276902Seric /* 2284624Seric ** Message priorities. 2294633Seric ** Priorities > 0 should be preemptive. 2305034Seric ** 2316902Seric ** CurEnv->e_msgpriority is the number of bytes in the message adjusted 2325034Seric ** by the message priority and the amount of time the message 2335034Seric ** has been sitting around. Each priority point is worth 2345034Seric ** WKPRIFACT bytes of message, and each time we reprocess a 2355034Seric ** message the size gets reduced by WKTIMEFACT. 2366910Seric ** 2376910Seric ** The "class" is this number, unadjusted by the age or size of 2386910Seric ** this message. Classes with negative representations will have 2396910Seric ** error messages thrown away if they are not local. 2404624Seric */ 2414624Seric 2428249Seric struct priority 2438249Seric { 2448249Seric char *pri_name; /* external name of priority */ 2458249Seric int pri_val; /* internal value for same */ 2468249Seric }; 2474624Seric 2488249Seric EXTERN struct priority Priorities[MAXPRIORITIES]; 2498249Seric EXTERN int NumPriorities; /* pointer into Priorities */ 2508249Seric 2515034Seric # define WKPRIFACT 1800 /* bytes each pri point is worth */ 2525034Seric # define WKTIMEFACT 400 /* bytes each time unit is worth */ 2536902Seric /* 2543153Seric ** Rewrite rules. 2553153Seric */ 2562899Seric 2573153Seric struct rewrite 2583153Seric { 2593153Seric char **r_lhs; /* pattern match */ 2603153Seric char **r_rhs; /* substitution value */ 2613153Seric struct rewrite *r_next;/* next in chain */ 2623153Seric }; 2632899Seric 2648057Seric EXTERN struct rewrite *RewriteRules[MAXRWSETS]; 2653153Seric 2668057Seric /* 2678057Seric ** Special characters in rewriting rules. 2688057Seric ** These are used internally only. 2698057Seric ** The COND* rules are actually used in macros rather than in 2708057Seric ** rewriting rules, but are given here because they 2718057Seric ** cannot conflict. 2728057Seric */ 2733153Seric 2748057Seric /* left hand side items */ 2758057Seric # define MATCHZANY '\020' /* match zero or more tokens */ 2768057Seric # define MATCHANY '\021' /* match one or more tokens */ 2778057Seric # define MATCHONE '\022' /* match exactly one token */ 2788057Seric # define MATCHCLASS '\023' /* match one token in a class */ 2799584Seric # define MATCHNCLASS '\034' /* match anything not in class */ 2808057Seric # define MATCHREPL '\024' /* replacement on RHS for above */ 2818057Seric 2828057Seric /* right hand side items */ 2833153Seric # define CANONNET '\025' /* canonical net, next token */ 2843153Seric # define CANONHOST '\026' /* canonical host, next token */ 2853153Seric # define CANONUSER '\027' /* canonical user, next N tokens */ 2868057Seric # define CALLSUBR '\030' /* call another rewriting set */ 2873153Seric 2888057Seric /* conditionals in macros */ 2898057Seric # define CONDIF '\031' /* conditional if-then */ 2908057Seric # define CONDELSE '\032' /* conditional else */ 2918057Seric # define CONDFI '\033' /* conditional fi */ 2926902Seric /* 2934056Seric ** Symbol table definitions 2944056Seric */ 2953153Seric 2964056Seric struct symtab 2974056Seric { 2984056Seric char *s_name; /* name to be entered */ 2994100Seric char s_type; /* general type (see below) */ 3004056Seric struct symtab *s_next; /* pointer to next in chain */ 3014100Seric union 3024100Seric { 303*10679Seric BITMAP sv_class; /* bit-map of word classes */ 3044100Seric ADDRESS *sv_addr; /* pointer to address header */ 3054100Seric MAILER *sv_mailer; /* pointer to mailer */ 3064100Seric char *sv_alias; /* alias */ 3074100Seric } s_value; 3084056Seric }; 3094056Seric 3104056Seric typedef struct symtab STAB; 3114056Seric 3124100Seric /* symbol types */ 3134100Seric # define ST_UNDEF 0 /* undefined type */ 3144100Seric # define ST_CLASS 1 /* class map */ 3154100Seric # define ST_ADDRESS 2 /* an address in parsed format */ 3164100Seric # define ST_MAILER 3 /* a mailer header */ 3174100Seric # define ST_ALIAS 4 /* an alias */ 3184100Seric 3194100Seric # define s_class s_value.sv_class 3205976Seric # define s_address s_value.sv_addr 3214100Seric # define s_mailer s_value.sv_mailer 3224100Seric # define s_alias s_value.sv_alias 3234100Seric 3244056Seric extern STAB *stab(); 3254056Seric 3264056Seric /* opcodes to stab */ 3274056Seric # define ST_FIND 0 /* find entry */ 3284056Seric # define ST_ENTER 1 /* enter if not there */ 3296902Seric /* 3307684Seric ** STRUCT EVENT -- event queue. 3317684Seric ** 3327684Seric ** Maintained in sorted order. 3337931Seric ** 3347931Seric ** We store the pid of the process that set this event to insure 3357931Seric ** that when we fork we will not take events intended for the parent. 3367684Seric */ 3377684Seric 3387684Seric struct event 3397684Seric { 3407684Seric time_t ev_time; /* time of the function call */ 3417684Seric int (*ev_func)(); /* function to call */ 3427684Seric int ev_arg; /* argument to ev_func */ 3437931Seric int ev_pid; /* pid that set this event */ 3447684Seric struct event *ev_link; /* link to next item */ 3457684Seric }; 3467684Seric 3477684Seric typedef struct event EVENT; 3487684Seric 3497684Seric EXTERN EVENT *EventQueue; /* head of event queue */ 3507684Seric /* 3519373Seric ** Operation, send, and error modes 3529278Seric ** 3539278Seric ** The operation mode describes the basic operation of sendmail. 3549278Seric ** This can be set from the command line, and is "send mail" by 3559278Seric ** default. 3569278Seric ** 3579278Seric ** The send mode tells how to send mail. It can be set in the 3589278Seric ** configuration file. It's setting determines how quickly the 3599278Seric ** mail will be delivered versus the load on your system. If the 3609278Seric ** -v (verbose) flag is given, it will be forced to SM_DELIVER 3619278Seric ** mode. 3629278Seric ** 3639373Seric ** The error mode tells how to return errors. 3646997Seric */ 3656997Seric 3669278Seric EXTERN char OpMode; /* operation mode, see below */ 3676997Seric 3689278Seric #define MD_DELIVER 'm' /* be a mail sender */ 3699278Seric #define MD_ARPAFTP 'a' /* old-style arpanet protocols */ 3709278Seric #define MD_SMTP 's' /* run SMTP on standard input */ 3716997Seric #define MD_DAEMON 'd' /* run as a daemon */ 3726997Seric #define MD_VERIFY 'v' /* verify: don't collect or deliver */ 3738334Seric #define MD_TEST 't' /* test mode: resolve addrs only */ 3749144Seric #define MD_INITALIAS 'i' /* initialize alias database */ 3759144Seric #define MD_PRINT 'p' /* print the queue */ 3769144Seric #define MD_FREEZE 'z' /* freeze the configuration file */ 3776997Seric 3789278Seric 3799278Seric EXTERN char SendMode; /* send mode, see below */ 3809278Seric 3819278Seric #define SM_DELIVER 'i' /* interactive delivery */ 3829278Seric #define SM_QUICKD 'j' /* deliver w/o queueing */ 3839278Seric #define SM_FORK 'b' /* deliver in background */ 3849278Seric #define SM_QUEUE 'q' /* queue, don't deliver */ 3859278Seric #define SM_VERIFY 'v' /* verify only (used internally) */ 3869373Seric 3879373Seric 3889373Seric EXTERN char ErrorMode; /* error mode, see below */ 3899373Seric 3909373Seric #define EM_PRINT 'p' /* print errors */ 3919373Seric #define EM_MAIL 'm' /* mail back errors */ 3929373Seric #define EM_WRITE 'w' /* write back errors */ 3939373Seric #define EM_BERKNET 'e' /* special berknet processing */ 3949373Seric #define EM_QUIET 'q' /* don't print messages (stat only) */ 3956997Seric /* 396295Seric ** Global variables. 397295Seric */ 398295Seric 3994371Seric EXTERN bool FromFlag; /* if set, "From" person is explicit */ 4004371Seric EXTERN bool NoAlias; /* if set, don't do any aliasing */ 4014371Seric EXTERN bool ForceMail; /* if set, mail even if already got a copy */ 4024371Seric EXTERN bool MeToo; /* send to the sender also */ 4034371Seric EXTERN bool IgnrDot; /* don't let dot end messages */ 4044371Seric EXTERN bool SaveFrom; /* save leading "From" lines */ 4054371Seric EXTERN bool Verbose; /* set if blow-by-blow desired */ 4064371Seric EXTERN bool GrabTo; /* if set, get recipients from msg */ 4074371Seric EXTERN bool NoReturn; /* don't return letter to sender */ 4084553Seric EXTERN bool SuprErrs; /* set if we are suppressing errors */ 4096049Seric EXTERN bool QueueRun; /* currently running message from the queue */ 4104711Seric EXTERN bool HoldErrs; /* only output errors to transcript */ 4115904Seric EXTERN bool NoConnect; /* don't connect to non-local mailers */ 4128268Seric EXTERN bool SuperSafe; /* be extra careful, even if expensive */ 4138929Seric EXTERN bool SafeAlias; /* alias file must have "@:@" to be complete */ 4149144Seric EXTERN bool AutoRebuild; /* auto-rebuild the alias database as needed */ 4158268Seric EXTERN time_t TimeOut; /* time until timeout */ 4164553Seric EXTERN FILE *InChannel; /* input connection */ 4174553Seric EXTERN FILE *OutChannel; /* output connection */ 4184537Seric EXTERN int RealUid; /* when Daemon, real uid of caller */ 4194537Seric EXTERN int RealGid; /* when Daemon, real gid of caller */ 4208268Seric EXTERN int DefUid; /* default uid to run as */ 4218268Seric EXTERN int DefGid; /* default gid to run as */ 4224371Seric EXTERN int OldUmask; /* umask when sendmail starts up */ 4236049Seric EXTERN int Errors; /* set if errors (local to single pass) */ 4244371Seric EXTERN int ExitStat; /* exit status code */ 4254553Seric EXTERN int AliasLevel; /* depth of aliasing */ 4267282Seric EXTERN int MotherPid; /* proc id of parent process */ 4278057Seric EXTERN int LineNumber; /* line number in current input */ 4288268Seric EXTERN int ReadTimeout; /* timeout on reads */ 4298268Seric EXTERN int LogLevel; /* level of logging to perform */ 4309045Seric EXTERN int FileMode; /* mode on files */ 4314624Seric EXTERN time_t QueueIntvl; /* intervals between running the queue */ 4324553Seric EXTERN char *HostName; /* name of this host for SMTP messages */ 4338268Seric EXTERN char *AliasFile; /* location of alias file */ 4348268Seric EXTERN char *HelpFile; /* location of SMTP help file */ 4358268Seric EXTERN char *StatFile; /* location of statistics summary */ 4368268Seric EXTERN char *QueueDir; /* location of queue directory */ 4379373Seric EXTERN char *FileName; /* name to print on error messages */ 4388929Seric EXTERN char *TrustedUsers[MAXTRUST+1]; /* list of trusted users */ 4398268Seric EXTERN jmp_buf TopFrame; /* branch-to-top-of-loop-on-error frame */ 4408268Seric EXTERN bool QuickAbort; /* .... but only if we want a quick abort */ 4417859Seric extern char *ConfFile; /* location of configuration file [conf.c] */ 4429065Seric extern char *FreezeFile; /* location of frozen memory image [conf.c] */ 4437859Seric extern char Arpa_Info[]; /* the reply code for Arpanet info [conf.c] */ 4449041Seric extern char SpaceSub; /* substitution for <lwsp> [conf.c] */ 4457674Seric /* 4467674Seric ** Trace information 4477674Seric */ 448295Seric 4497674Seric /* trace vector and macros for debugging flags */ 4507674Seric EXTERN u_char tTdvect[100]; 4517674Seric # define tTd(flag, level) (tTdvect[flag] >= level) 4527674Seric # define tTdlevel(flag) (tTdvect[flag]) 4537674Seric /* 4547674Seric ** Miscellaneous information. 4557674Seric */ 456295Seric 457295Seric # include <sysexits.h> 458295Seric 45910213Seric 46010213Seric /* 46110213Seric ** Some in-line functions 46210213Seric */ 46310213Seric 46410213Seric /* set exit status */ 465295Seric # define setstat(s) { if (ExitStat == EX_OK) ExitStat = s; } 4664085Seric 46710213Seric /* make a copy of a string */ 46810213Seric # define newstr(s) strcpy(xalloc(strlen(s) + 1), s) 4694085Seric 47010213Seric 47110213Seric /* 47210213Seric ** Declarations of useful functions 47310213Seric */ 47410213Seric 4759883Seric extern ADDRESS *parseaddr(); 4764085Seric extern char *xalloc(); 4774085Seric extern bool sameaddr(); 4786889Seric extern FILE *dfopen(); 4797684Seric extern EVENT *setevent(); 4807684Seric extern char *sfgets(); 4817810Seric extern char *queuename(); 4827884Seric extern time_t curtime(); 483