1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 23*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate 26*7c478bd9Sstevel@tonic-gate /* 27*7c478bd9Sstevel@tonic-gate * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 28*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 29*7c478bd9Sstevel@tonic-gate */ 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate #ifndef _MAIL_H 32*7c478bd9Sstevel@tonic-gate #define _MAIL_H 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate /* 37*7c478bd9Sstevel@tonic-gate * All global externs defined here. All variables are initialized 38*7c478bd9Sstevel@tonic-gate * in init.c 39*7c478bd9Sstevel@tonic-gate * 40*7c478bd9Sstevel@tonic-gate * !!!!!IF YOU CHANGE (OR ADD) IT HERE, DO IT THERE ALSO !!!!!!!! 41*7c478bd9Sstevel@tonic-gate * 42*7c478bd9Sstevel@tonic-gate */ 43*7c478bd9Sstevel@tonic-gate #include <errno.h> 44*7c478bd9Sstevel@tonic-gate #include <fcntl.h> 45*7c478bd9Sstevel@tonic-gate #include <stdio.h> 46*7c478bd9Sstevel@tonic-gate #include <ctype.h> 47*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 48*7c478bd9Sstevel@tonic-gate #include <errno.h> 49*7c478bd9Sstevel@tonic-gate #include <pwd.h> 50*7c478bd9Sstevel@tonic-gate #include <signal.h> 51*7c478bd9Sstevel@tonic-gate #include <string.h> 52*7c478bd9Sstevel@tonic-gate #include <grp.h> 53*7c478bd9Sstevel@tonic-gate /* The following is a kludge to allow for inconsistent header files in SVR4 */ 54*7c478bd9Sstevel@tonic-gate #define _CLOCK_T 55*7c478bd9Sstevel@tonic-gate #include <time.h> 56*7c478bd9Sstevel@tonic-gate #include <sys/stat.h> 57*7c478bd9Sstevel@tonic-gate #include <setjmp.h> 58*7c478bd9Sstevel@tonic-gate #include <sys/utsname.h> 59*7c478bd9Sstevel@tonic-gate #include <limits.h> 60*7c478bd9Sstevel@tonic-gate 61*7c478bd9Sstevel@tonic-gate #ifdef SVR3 62*7c478bd9Sstevel@tonic-gate struct utimbuf { 63*7c478bd9Sstevel@tonic-gate time_t actime; 64*7c478bd9Sstevel@tonic-gate time_t modtime; 65*7c478bd9Sstevel@tonic-gate }; 66*7c478bd9Sstevel@tonic-gate #else 67*7c478bd9Sstevel@tonic-gate # include <utime.h> 68*7c478bd9Sstevel@tonic-gate #endif 69*7c478bd9Sstevel@tonic-gate #include "libmail.h" 70*7c478bd9Sstevel@tonic-gate 71*7c478bd9Sstevel@tonic-gate /* The following typedefs must be used in SVR4 */ 72*7c478bd9Sstevel@tonic-gate #ifdef SVR3 73*7c478bd9Sstevel@tonic-gate # ifndef sun 74*7c478bd9Sstevel@tonic-gate typedef int gid_t; 75*7c478bd9Sstevel@tonic-gate typedef int uid_t; 76*7c478bd9Sstevel@tonic-gate # endif 77*7c478bd9Sstevel@tonic-gate typedef int pid_t; 78*7c478bd9Sstevel@tonic-gate #endif 79*7c478bd9Sstevel@tonic-gate 80*7c478bd9Sstevel@tonic-gate #define CHILD 0 81*7c478bd9Sstevel@tonic-gate #define SAME 0 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gate #define BELL 07 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gate # define PIPER "/usr/lib/mail/mail_pipe" 86*7c478bd9Sstevel@tonic-gate 87*7c478bd9Sstevel@tonic-gate #define SENDMAIL "/usr/lib/sendmail" 88*7c478bd9Sstevel@tonic-gate 89*7c478bd9Sstevel@tonic-gate #define CERROR -1 90*7c478bd9Sstevel@tonic-gate #define CSUCCESS 0 91*7c478bd9Sstevel@tonic-gate 92*7c478bd9Sstevel@tonic-gate #define TRUE 1 93*7c478bd9Sstevel@tonic-gate #define FALSE 0 94*7c478bd9Sstevel@tonic-gate 95*7c478bd9Sstevel@tonic-gate #define HEAD 1 96*7c478bd9Sstevel@tonic-gate #define TAIL 0 97*7c478bd9Sstevel@tonic-gate 98*7c478bd9Sstevel@tonic-gate #define REAL 1 99*7c478bd9Sstevel@tonic-gate #define DEFAULT 0 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gate /* findSurg() return values */ 102*7c478bd9Sstevel@tonic-gate #define NOMATCH -1 103*7c478bd9Sstevel@tonic-gate #define DELIVER 0 104*7c478bd9Sstevel@tonic-gate #define POSTDELIVER 1 105*7c478bd9Sstevel@tonic-gate #define DENY 2 106*7c478bd9Sstevel@tonic-gate #define TRANSLATE 3 107*7c478bd9Sstevel@tonic-gate 108*7c478bd9Sstevel@tonic-gate /* sendsurg() return values */ 109*7c478bd9Sstevel@tonic-gate #define FAILURE 0 110*7c478bd9Sstevel@tonic-gate #define CONTINUE 1 111*7c478bd9Sstevel@tonic-gate #define SUCCESS 2 112*7c478bd9Sstevel@tonic-gate /* TRANSLATE 3 */ 113*7c478bd9Sstevel@tonic-gate 114*7c478bd9Sstevel@tonic-gate #define HDRSIZ 1024 /* maximum length of header line */ 115*7c478bd9Sstevel@tonic-gate 116*7c478bd9Sstevel@tonic-gate #define E_FLGE 1 /* flge error */ 117*7c478bd9Sstevel@tonic-gate #define E_FLGE_OM 2 /* flgE error, mail present but already accessed */ 118*7c478bd9Sstevel@tonic-gate #define E_REMOTE 1 /* unknown remote */ 119*7c478bd9Sstevel@tonic-gate #define E_FILE 2 /* file error */ 120*7c478bd9Sstevel@tonic-gate #define E_SPACE 3 /* no space */ 121*7c478bd9Sstevel@tonic-gate #define E_FRWD 4 /* cannot forward */ 122*7c478bd9Sstevel@tonic-gate #define E_SYNTAX 5 /* syntax error */ 123*7c478bd9Sstevel@tonic-gate #define E_FRWL 6 /* forwarding loop */ 124*7c478bd9Sstevel@tonic-gate #define E_SNDR 7 /* invalid sender */ 125*7c478bd9Sstevel@tonic-gate #define E_USER 8 /* invalid user */ 126*7c478bd9Sstevel@tonic-gate #define E_FROM 9 /* too many From lines */ 127*7c478bd9Sstevel@tonic-gate #define E_PERM 10 /* bad permissions */ 128*7c478bd9Sstevel@tonic-gate #define E_MBOX 11 /* mbox problem */ 129*7c478bd9Sstevel@tonic-gate #define E_TMP 12 /* temporary file problem */ 130*7c478bd9Sstevel@tonic-gate #define E_DEAD 13 /* Cannot create dead.letter */ 131*7c478bd9Sstevel@tonic-gate #define E_UNBND 14 /* Unbounded forwarding */ 132*7c478bd9Sstevel@tonic-gate #define E_LOCK 15 /* cannot create lock file */ 133*7c478bd9Sstevel@tonic-gate #define E_GROUP 16 /* no group id of 'mail' */ 134*7c478bd9Sstevel@tonic-gate #define E_MEM 17 /* malloc failure */ 135*7c478bd9Sstevel@tonic-gate #define E_FORK 18 /* could not fork */ 136*7c478bd9Sstevel@tonic-gate #define E_PIPE 19 /* could not pipe */ 137*7c478bd9Sstevel@tonic-gate #define E_OWNR 20 /* invoker does not own mailfile */ 138*7c478bd9Sstevel@tonic-gate #define E_DENY 21 /* permission denied by mailsurr file */ 139*7c478bd9Sstevel@tonic-gate #define E_SURG 22 /* surrogate command failed - rc != 0 || 99 */ 140*7c478bd9Sstevel@tonic-gate 141*7c478bd9Sstevel@tonic-gate #define H_AFWDCNT 1 /* "Auto-Forward-Count:" */ 142*7c478bd9Sstevel@tonic-gate #define H_AFWDFROM 2 /* "Auto-Forwarded-From:" */ 143*7c478bd9Sstevel@tonic-gate #define H_CLEN 3 /* "Content-Length:" */ 144*7c478bd9Sstevel@tonic-gate #define H_CTYPE 4 /* "Content-Type:" */ 145*7c478bd9Sstevel@tonic-gate #define H_DATE 5 /* "Date:" */ 146*7c478bd9Sstevel@tonic-gate #define H_DEFOPTS 6 /* "Default-Options:" */ 147*7c478bd9Sstevel@tonic-gate #define H_EOH 7 /* "End-of-Header:" */ 148*7c478bd9Sstevel@tonic-gate #define H_FROM 8 /* "From " */ 149*7c478bd9Sstevel@tonic-gate #define H_FROM1 9 /* ">From " */ 150*7c478bd9Sstevel@tonic-gate #define H_FROM2 10 /* "From: " */ 151*7c478bd9Sstevel@tonic-gate #define H_MIMEVERS 11 /* "MIME-Version:" */ 152*7c478bd9Sstevel@tonic-gate #define H_MTSID 12 /* "MTS-Message-ID:" */ 153*7c478bd9Sstevel@tonic-gate #define H_MTYPE 13 /* "Message-Type:" */ 154*7c478bd9Sstevel@tonic-gate #define H_MVERS 14 /* "Message-Version:" */ 155*7c478bd9Sstevel@tonic-gate #define H_MSVC 15 /* "Message-Service:" */ 156*7c478bd9Sstevel@tonic-gate #define H_RECEIVED 16 /* "Received:" */ 157*7c478bd9Sstevel@tonic-gate #define H_RVERS 17 /* "Report-Version:" */ 158*7c478bd9Sstevel@tonic-gate #define H_SUBJ 18 /* "Subject:" */ 159*7c478bd9Sstevel@tonic-gate #define H_TO 19 /* "To:" */ 160*7c478bd9Sstevel@tonic-gate #define H_TCOPY 20 /* ">To:" */ 161*7c478bd9Sstevel@tonic-gate #define H_TROPTS 21 /* "Transport-Options:" */ 162*7c478bd9Sstevel@tonic-gate #define H_UAID 22 /* "UA-Content-ID:" */ 163*7c478bd9Sstevel@tonic-gate #define H_DAFWDFROM 23 /* Hold A-F-F when sending Del. Notf. */ 164*7c478bd9Sstevel@tonic-gate #define H_DTCOPY 24 /* Hold ">To:" when sending Del. Notf.*/ 165*7c478bd9Sstevel@tonic-gate #define H_DRECEIVED 25 /* Hold Rcvd: when sending Del. Notf.*/ 166*7c478bd9Sstevel@tonic-gate #define H_CONT 26 /* Continuation of previous line */ 167*7c478bd9Sstevel@tonic-gate #define H_NAMEVALUE 27 /* unrecognized "name: value" hdr line*/ 168*7c478bd9Sstevel@tonic-gate 169*7c478bd9Sstevel@tonic-gate /* MTA Transport Options */ 170*7c478bd9Sstevel@tonic-gate #define DELIVERY 001 171*7c478bd9Sstevel@tonic-gate #define NODELIVERY 002 172*7c478bd9Sstevel@tonic-gate #define REPORT 010 173*7c478bd9Sstevel@tonic-gate #define RETURN 020 174*7c478bd9Sstevel@tonic-gate #define IGNORE 040 175*7c478bd9Sstevel@tonic-gate 176*7c478bd9Sstevel@tonic-gate /* 177*7c478bd9Sstevel@tonic-gate copylet flags 178*7c478bd9Sstevel@tonic-gate */ 179*7c478bd9Sstevel@tonic-gate #define REMOTE 1 /* remote mail, add rmtmsg */ 180*7c478bd9Sstevel@tonic-gate #define ORDINARY 2 181*7c478bd9Sstevel@tonic-gate #define ZAP 3 /* zap header and trailing empty line */ 182*7c478bd9Sstevel@tonic-gate #define FORWARD 4 183*7c478bd9Sstevel@tonic-gate #define TTY 5 /* suppress binary to tty */ 184*7c478bd9Sstevel@tonic-gate 185*7c478bd9Sstevel@tonic-gate #define LSIZE (2*BUFSIZ) /* maximum size of a line */ 186*7c478bd9Sstevel@tonic-gate #define MAXLET 1000 /* maximum number of letters */ 187*7c478bd9Sstevel@tonic-gate #define FROMLEVELS 20 /* maxium number of forwards */ 188*7c478bd9Sstevel@tonic-gate #ifdef FILENAME_MAX 189*7c478bd9Sstevel@tonic-gate # define MAXFILENAME FILENAME_MAX /* max length of a filename */ 190*7c478bd9Sstevel@tonic-gate #else 191*7c478bd9Sstevel@tonic-gate # define MAXFILENAME 512 /* max length of a filename */ 192*7c478bd9Sstevel@tonic-gate #endif 193*7c478bd9Sstevel@tonic-gate #define DEADPERM 0600 /* permissions of dead.letter */ 194*7c478bd9Sstevel@tonic-gate 195*7c478bd9Sstevel@tonic-gate #ifndef MFMODE 196*7c478bd9Sstevel@tonic-gate #define MFMODE 0660 /* create mode for `/var/mail' files */ 197*7c478bd9Sstevel@tonic-gate #endif 198*7c478bd9Sstevel@tonic-gate 199*7c478bd9Sstevel@tonic-gate #define A_OK 0 /* return value for access */ 200*7c478bd9Sstevel@tonic-gate #define A_EXECUTE 1 201*7c478bd9Sstevel@tonic-gate #define A_EXIST 0 /* access check for existence */ 202*7c478bd9Sstevel@tonic-gate #define A_WRITE 2 /* access check for write permission */ 203*7c478bd9Sstevel@tonic-gate #define A_READ 4 /* access check for read permission */ 204*7c478bd9Sstevel@tonic-gate 205*7c478bd9Sstevel@tonic-gate # define MAILSURR "/etc/mail/mailsurr" 206*7c478bd9Sstevel@tonic-gate # define MAILCNFG "/etc/mail/mailcnfg" 207*7c478bd9Sstevel@tonic-gate 208*7c478bd9Sstevel@tonic-gate struct hdr { 209*7c478bd9Sstevel@tonic-gate char *tag; 210*7c478bd9Sstevel@tonic-gate int default_display; 211*7c478bd9Sstevel@tonic-gate }; 212*7c478bd9Sstevel@tonic-gate 213*7c478bd9Sstevel@tonic-gate struct hdrs { 214*7c478bd9Sstevel@tonic-gate struct hdrs *next; 215*7c478bd9Sstevel@tonic-gate struct hdrs *prev; 216*7c478bd9Sstevel@tonic-gate struct hdrs *cont; /* Continuation lines */ 217*7c478bd9Sstevel@tonic-gate char value[HDRSIZ+1]; 218*7c478bd9Sstevel@tonic-gate }; 219*7c478bd9Sstevel@tonic-gate 220*7c478bd9Sstevel@tonic-gate struct hdrlines { 221*7c478bd9Sstevel@tonic-gate struct hdrs *head; 222*7c478bd9Sstevel@tonic-gate struct hdrs *tail; 223*7c478bd9Sstevel@tonic-gate }; 224*7c478bd9Sstevel@tonic-gate 225*7c478bd9Sstevel@tonic-gate typedef struct recip { 226*7c478bd9Sstevel@tonic-gate struct recip *next; 227*7c478bd9Sstevel@tonic-gate char *name; 228*7c478bd9Sstevel@tonic-gate } recip; 229*7c478bd9Sstevel@tonic-gate 230*7c478bd9Sstevel@tonic-gate typedef struct reciplist { 231*7c478bd9Sstevel@tonic-gate recip *last_recip; 232*7c478bd9Sstevel@tonic-gate recip recip_list; 233*7c478bd9Sstevel@tonic-gate } reciplist; 234*7c478bd9Sstevel@tonic-gate 235*7c478bd9Sstevel@tonic-gate struct let { 236*7c478bd9Sstevel@tonic-gate long adr; /* offset in mailfile of letter n */ 237*7c478bd9Sstevel@tonic-gate char change; /* disposition status of letter n */ 238*7c478bd9Sstevel@tonic-gate char text; /* 1 ==> text content, 0 ==> binary content. 239*7c478bd9Sstevel@tonic-gate * This is determined INDEPENDENTLY of what 240*7c478bd9Sstevel@tonic-gate * the Content-type, if present, says... 241*7c478bd9Sstevel@tonic-gate */ 242*7c478bd9Sstevel@tonic-gate }; 243*7c478bd9Sstevel@tonic-gate 244*7c478bd9Sstevel@tonic-gate typedef enum t_surrtype 245*7c478bd9Sstevel@tonic-gate { 246*7c478bd9Sstevel@tonic-gate t_eof, t_transport = '<', 247*7c478bd9Sstevel@tonic-gate t_accept = 'a', t_deny = 'd', 248*7c478bd9Sstevel@tonic-gate t_translate = 't', t_postprocess = '>' 249*7c478bd9Sstevel@tonic-gate } t_surrtype; 250*7c478bd9Sstevel@tonic-gate 251*7c478bd9Sstevel@tonic-gate typedef struct t_surrfile 252*7c478bd9Sstevel@tonic-gate { 253*7c478bd9Sstevel@tonic-gate /* originator's regular expression */ 254*7c478bd9Sstevel@tonic-gate string *orig_pattern; 255*7c478bd9Sstevel@tonic-gate char *orig_regex; 256*7c478bd9Sstevel@tonic-gate int orig_reglen; 257*7c478bd9Sstevel@tonic-gate int orig_nbra; 258*7c478bd9Sstevel@tonic-gate 259*7c478bd9Sstevel@tonic-gate /* recipient's regular expression */ 260*7c478bd9Sstevel@tonic-gate string *recip_pattern; 261*7c478bd9Sstevel@tonic-gate char *recip_regex; 262*7c478bd9Sstevel@tonic-gate int recip_reglen; 263*7c478bd9Sstevel@tonic-gate int recip_nbra; 264*7c478bd9Sstevel@tonic-gate 265*7c478bd9Sstevel@tonic-gate /* the type of the command string */ 266*7c478bd9Sstevel@tonic-gate t_surrtype surr_type; 267*7c478bd9Sstevel@tonic-gate 268*7c478bd9Sstevel@tonic-gate int batchsize; /* transport translate postprocess */ 269*7c478bd9Sstevel@tonic-gate char *statlist; /* transport */ 270*7c478bd9Sstevel@tonic-gate string *cmd_left; /* transport translate postprocess */ 271*7c478bd9Sstevel@tonic-gate string *cmd_right; /* transport translate postprocess */ 272*7c478bd9Sstevel@tonic-gate int fullyresolved; /* translate */ 273*7c478bd9Sstevel@tonic-gate } t_surrfile; 274*7c478bd9Sstevel@tonic-gate 275*7c478bd9Sstevel@tonic-gate #ifdef __STDC__ 276*7c478bd9Sstevel@tonic-gate # include <stdlib.h> 277*7c478bd9Sstevel@tonic-gate # include <unistd.h> 278*7c478bd9Sstevel@tonic-gate #else 279*7c478bd9Sstevel@tonic-gate extern int chmod(); 280*7c478bd9Sstevel@tonic-gate extern int close(); 281*7c478bd9Sstevel@tonic-gate extern char *ctime(); 282*7c478bd9Sstevel@tonic-gate extern int errno; 283*7c478bd9Sstevel@tonic-gate extern int execl(); 284*7c478bd9Sstevel@tonic-gate extern int execvp(); 285*7c478bd9Sstevel@tonic-gate extern void exit(); 286*7c478bd9Sstevel@tonic-gate extern char *getenv(); 287*7c478bd9Sstevel@tonic-gate extern char *getlogin(); 288*7c478bd9Sstevel@tonic-gate extern long ftell(); 289*7c478bd9Sstevel@tonic-gate extern struct group *getgrnam(); 290*7c478bd9Sstevel@tonic-gate extern struct passwd *getpwent(); 291*7c478bd9Sstevel@tonic-gate extern struct passwd *getpwnam(); 292*7c478bd9Sstevel@tonic-gate extern struct passwd *getpwuid(); 293*7c478bd9Sstevel@tonic-gate extern char *malloc(); 294*7c478bd9Sstevel@tonic-gate extern char *memcpy(); 295*7c478bd9Sstevel@tonic-gate extern char *memmove(); 296*7c478bd9Sstevel@tonic-gate extern char *mktemp(); 297*7c478bd9Sstevel@tonic-gate extern char *realloc(); 298*7c478bd9Sstevel@tonic-gate extern void setpwent(); 299*7c478bd9Sstevel@tonic-gate extern unsigned sleep(); 300*7c478bd9Sstevel@tonic-gate extern char *strchr(); 301*7c478bd9Sstevel@tonic-gate extern char *strcpy(); 302*7c478bd9Sstevel@tonic-gate extern char *strncpy(); 303*7c478bd9Sstevel@tonic-gate extern char *strpbrk(); 304*7c478bd9Sstevel@tonic-gate extern char *strrchr(); 305*7c478bd9Sstevel@tonic-gate extern time_t time(); 306*7c478bd9Sstevel@tonic-gate extern char *tempnam(); 307*7c478bd9Sstevel@tonic-gate extern FILE *tmpfile(); 308*7c478bd9Sstevel@tonic-gate extern int unlink(); 309*7c478bd9Sstevel@tonic-gate #endif 310*7c478bd9Sstevel@tonic-gate 311*7c478bd9Sstevel@tonic-gate extern char *optarg; /* for getopt */ 312*7c478bd9Sstevel@tonic-gate extern int optind; 313*7c478bd9Sstevel@tonic-gate extern char *sys_errlist[]; 314*7c478bd9Sstevel@tonic-gate 315*7c478bd9Sstevel@tonic-gate #ifdef __STDC__ 316*7c478bd9Sstevel@tonic-gate extern void Dout(char *subname, int level, char *fmt, ...); 317*7c478bd9Sstevel@tonic-gate extern void Tout(char *subname, char *msg, ...); 318*7c478bd9Sstevel@tonic-gate extern int add_recip(reciplist *plist, char *name, int checkdups); 319*7c478bd9Sstevel@tonic-gate extern char *altcompile(const char *instring, char *expbuf, char *endbuf); 320*7c478bd9Sstevel@tonic-gate extern int areforwarding(char *mailfile); 321*7c478bd9Sstevel@tonic-gate extern void cat(char*, char*, char*); 322*7c478bd9Sstevel@tonic-gate extern int ckdlivopts(int tcopy_hdr, int *svopts); 323*7c478bd9Sstevel@tonic-gate extern void cksaved(char *user); 324*7c478bd9Sstevel@tonic-gate extern int cksurg_rc(int surr_num, int rc); 325*7c478bd9Sstevel@tonic-gate extern void clr_hinfo(void); 326*7c478bd9Sstevel@tonic-gate extern void clrhdr(int hdrtype); 327*7c478bd9Sstevel@tonic-gate extern void cmdexpand(int letnum, string *instr, string *outstr, char **lbraslist, char **lbraelist); 328*7c478bd9Sstevel@tonic-gate extern void copyback(void); 329*7c478bd9Sstevel@tonic-gate extern int copylet(int letnum, FILE *f, int type); 330*7c478bd9Sstevel@tonic-gate extern void copymt(FILE *f1, FILE *f2); 331*7c478bd9Sstevel@tonic-gate extern void createmf(uid_t uid, char *file); 332*7c478bd9Sstevel@tonic-gate extern void del_reciplist (reciplist *list); 333*7c478bd9Sstevel@tonic-gate extern void delete(int); 334*7c478bd9Sstevel@tonic-gate extern void doFopt(void); 335*7c478bd9Sstevel@tonic-gate extern void done(int); 336*7c478bd9Sstevel@tonic-gate extern void sig_done(int); 337*7c478bd9Sstevel@tonic-gate extern FILE *doopen(char *file, char *type, int errnum); 338*7c478bd9Sstevel@tonic-gate extern int dowait(pid_t pidval); 339*7c478bd9Sstevel@tonic-gate extern void dumpaff(int type, int htype, int *didafflines, int *suppress, FILE *f); 340*7c478bd9Sstevel@tonic-gate extern void dumprcv(int type, int htype, int *didrcvlines, int *suppress, FILE *f); 341*7c478bd9Sstevel@tonic-gate extern void errmsg(int error_value, char *error_message); 342*7c478bd9Sstevel@tonic-gate extern int findSurg(int letnum, string *execbuf, int flag, int *psurr_num, int *paccept, string *lorig, string *lrecipname); 343*7c478bd9Sstevel@tonic-gate extern void gendeliv(FILE *fp, int rc, char *name); 344*7c478bd9Sstevel@tonic-gate extern int getcomment(char *s, char *q); 345*7c478bd9Sstevel@tonic-gate extern int gethead(int current, int all); 346*7c478bd9Sstevel@tonic-gate extern int getline(char *ptr2line, int max, FILE *f); 347*7c478bd9Sstevel@tonic-gate extern int getnumbr(char *s); 348*7c478bd9Sstevel@tonic-gate extern int getsurr(FILE *fp, string *buf, int firstfield); 349*7c478bd9Sstevel@tonic-gate extern void goback(int letnum); 350*7c478bd9Sstevel@tonic-gate extern int init(void); 351*7c478bd9Sstevel@tonic-gate extern void initsurrfile(void); 352*7c478bd9Sstevel@tonic-gate extern int isheader(char *lp, int *ctfp); 353*7c478bd9Sstevel@tonic-gate extern int isit(char *lp, int type); 354*7c478bd9Sstevel@tonic-gate extern int islocal(char *user, uid_t *puid); 355*7c478bd9Sstevel@tonic-gate extern int istext(unsigned char *s, int size); 356*7c478bd9Sstevel@tonic-gate extern int legal(char *file); 357*7c478bd9Sstevel@tonic-gate extern void lock(char *user); 358*7c478bd9Sstevel@tonic-gate extern int madd_recip(reciplist *plist, char *name, int checkdups); 359*7c478bd9Sstevel@tonic-gate extern char *mailcompile(string *pattern, int *retlen, int *retnbra); 360*7c478bd9Sstevel@tonic-gate extern void mkdead(void); 361*7c478bd9Sstevel@tonic-gate extern void mktmp(void); 362*7c478bd9Sstevel@tonic-gate extern void mta_ercode(FILE *outfile); 363*7c478bd9Sstevel@tonic-gate extern void new_reciplist (reciplist *list); 364*7c478bd9Sstevel@tonic-gate extern int notme(char *fto, char *myname); 365*7c478bd9Sstevel@tonic-gate extern int parse(int argc, char **argv); 366*7c478bd9Sstevel@tonic-gate extern int pckaffspot(void); 367*7c478bd9Sstevel@tonic-gate extern int pckrcvspot(void); 368*7c478bd9Sstevel@tonic-gate extern void pickFrom(char *lineptr); 369*7c478bd9Sstevel@tonic-gate extern int pipletr(int letter, char *command, int cltype); 370*7c478bd9Sstevel@tonic-gate extern void poplist (int hdrtype, int where); 371*7c478bd9Sstevel@tonic-gate extern int printhdr (int type, int hdrtype, struct hdrs *hptr, FILE *fp); 372*7c478bd9Sstevel@tonic-gate extern void printmail(void); 373*7c478bd9Sstevel@tonic-gate extern void pushlist(int hdrtype, int where, char *s, int contflg); 374*7c478bd9Sstevel@tonic-gate extern void savdead(void); 375*7c478bd9Sstevel@tonic-gate extern void savehdrs(char *s, int hdrtype); 376*7c478bd9Sstevel@tonic-gate extern int sel_disp (int type, int hdrtype, char *s); 377*7c478bd9Sstevel@tonic-gate extern int sendlist(reciplist *list, int letnum, int level); 378*7c478bd9Sstevel@tonic-gate extern void sendmail(int argc, char **argv); 379*7c478bd9Sstevel@tonic-gate extern int sendsurg(reciplist *plist, int letnum, int flag, int local); 380*7c478bd9Sstevel@tonic-gate extern void setletr(int letter, int status); 381*7c478bd9Sstevel@tonic-gate extern void (*setsig(int i, void(*f)()))(); 382*7c478bd9Sstevel@tonic-gate extern void setsurg_bt(string *st, int *pbatchsize, int *presolved); 383*7c478bd9Sstevel@tonic-gate extern char *setsurg_rc(string *st, int defreal, int *pbatchsize); 384*7c478bd9Sstevel@tonic-gate extern char **setup_exec(char*); 385*7c478bd9Sstevel@tonic-gate extern void stamp(void); 386*7c478bd9Sstevel@tonic-gate extern int systm(char *s); 387*7c478bd9Sstevel@tonic-gate extern void tmperr(void); 388*7c478bd9Sstevel@tonic-gate extern string *tokdef(string *fld, string *tok, char *name); 389*7c478bd9Sstevel@tonic-gate extern int translate(reciplist *plist, char *cmdstr, char *origname); 390*7c478bd9Sstevel@tonic-gate extern void unlock(void); 391*7c478bd9Sstevel@tonic-gate extern int validmsg(int); 392*7c478bd9Sstevel@tonic-gate extern int wtmpf(char *str, int length); 393*7c478bd9Sstevel@tonic-gate #else 394*7c478bd9Sstevel@tonic-gate extern void Dout(); 395*7c478bd9Sstevel@tonic-gate extern void Tout(); 396*7c478bd9Sstevel@tonic-gate extern int add_recip(); 397*7c478bd9Sstevel@tonic-gate extern char *altcompile(); 398*7c478bd9Sstevel@tonic-gate extern int areforwarding(); 399*7c478bd9Sstevel@tonic-gate extern void cat(); 400*7c478bd9Sstevel@tonic-gate extern int ckdlivopts(); 401*7c478bd9Sstevel@tonic-gate extern void cksaved(); 402*7c478bd9Sstevel@tonic-gate extern int cksurg_rc(); 403*7c478bd9Sstevel@tonic-gate extern void clr_hinfo(); 404*7c478bd9Sstevel@tonic-gate extern void clrhdr(); 405*7c478bd9Sstevel@tonic-gate extern void cmdexpand(); 406*7c478bd9Sstevel@tonic-gate extern void copyback(); 407*7c478bd9Sstevel@tonic-gate extern int copylet(); 408*7c478bd9Sstevel@tonic-gate extern void copymt(); 409*7c478bd9Sstevel@tonic-gate extern void createmf(); 410*7c478bd9Sstevel@tonic-gate extern void del_reciplist (); 411*7c478bd9Sstevel@tonic-gate extern void delete(); 412*7c478bd9Sstevel@tonic-gate extern void doFopt(); 413*7c478bd9Sstevel@tonic-gate extern void done(); 414*7c478bd9Sstevel@tonic-gate extern void sig_done(); 415*7c478bd9Sstevel@tonic-gate extern FILE *doopen(); 416*7c478bd9Sstevel@tonic-gate extern int dowait(); 417*7c478bd9Sstevel@tonic-gate extern void dumpaff(); 418*7c478bd9Sstevel@tonic-gate extern void dumprcv(); 419*7c478bd9Sstevel@tonic-gate extern void errmsg(); 420*7c478bd9Sstevel@tonic-gate extern int findSurg(); 421*7c478bd9Sstevel@tonic-gate extern void gendeliv(); 422*7c478bd9Sstevel@tonic-gate extern int getcomment(); 423*7c478bd9Sstevel@tonic-gate extern int gethead(); 424*7c478bd9Sstevel@tonic-gate extern int getline(); 425*7c478bd9Sstevel@tonic-gate extern int getnumbr(); 426*7c478bd9Sstevel@tonic-gate extern int getsurr(); 427*7c478bd9Sstevel@tonic-gate extern void goback(); 428*7c478bd9Sstevel@tonic-gate extern int init(); 429*7c478bd9Sstevel@tonic-gate extern void initsurrfile(); 430*7c478bd9Sstevel@tonic-gate extern int isheader(); 431*7c478bd9Sstevel@tonic-gate extern int isit(); 432*7c478bd9Sstevel@tonic-gate extern int islocal(); 433*7c478bd9Sstevel@tonic-gate extern int istext(); 434*7c478bd9Sstevel@tonic-gate extern int legal(); 435*7c478bd9Sstevel@tonic-gate extern void lock(); 436*7c478bd9Sstevel@tonic-gate extern int madd_recip(); 437*7c478bd9Sstevel@tonic-gate extern char *mailcompile(); 438*7c478bd9Sstevel@tonic-gate extern void mkdead(); 439*7c478bd9Sstevel@tonic-gate extern void mktmp(); 440*7c478bd9Sstevel@tonic-gate extern void mta_ercode(); 441*7c478bd9Sstevel@tonic-gate extern void new_reciplist (); 442*7c478bd9Sstevel@tonic-gate extern int notme(); 443*7c478bd9Sstevel@tonic-gate extern int parse(); 444*7c478bd9Sstevel@tonic-gate extern int pckaffspot(); 445*7c478bd9Sstevel@tonic-gate extern int pckrcvspot(); 446*7c478bd9Sstevel@tonic-gate extern void pickFrom (); 447*7c478bd9Sstevel@tonic-gate extern int pipletr(); 448*7c478bd9Sstevel@tonic-gate extern void poplist (); 449*7c478bd9Sstevel@tonic-gate extern int printhdr (); 450*7c478bd9Sstevel@tonic-gate extern void printmail(); 451*7c478bd9Sstevel@tonic-gate extern void pushlist(); 452*7c478bd9Sstevel@tonic-gate extern void savdead(); 453*7c478bd9Sstevel@tonic-gate extern void savehdrs(); 454*7c478bd9Sstevel@tonic-gate extern int sel_disp (); 455*7c478bd9Sstevel@tonic-gate extern int sendlist(); 456*7c478bd9Sstevel@tonic-gate extern void sendmail(); 457*7c478bd9Sstevel@tonic-gate extern int sendsurg(); 458*7c478bd9Sstevel@tonic-gate extern void setletr(); 459*7c478bd9Sstevel@tonic-gate extern void (*setsig())(); 460*7c478bd9Sstevel@tonic-gate extern void setsurg_bt(); 461*7c478bd9Sstevel@tonic-gate extern char *setsurg_rc(); 462*7c478bd9Sstevel@tonic-gate extern char **setup_exec(); 463*7c478bd9Sstevel@tonic-gate extern void stamp(); 464*7c478bd9Sstevel@tonic-gate extern int systm(); 465*7c478bd9Sstevel@tonic-gate extern void tmperr(); 466*7c478bd9Sstevel@tonic-gate extern string *tokdef(); 467*7c478bd9Sstevel@tonic-gate extern int translate(); 468*7c478bd9Sstevel@tonic-gate extern void unlock(); 469*7c478bd9Sstevel@tonic-gate extern int validmsg(); 470*7c478bd9Sstevel@tonic-gate extern int wtmpf(); 471*7c478bd9Sstevel@tonic-gate #endif 472*7c478bd9Sstevel@tonic-gate 473*7c478bd9Sstevel@tonic-gate extern int ac; /* argument list count */ 474*7c478bd9Sstevel@tonic-gate extern char **av; /* argument list */ 475*7c478bd9Sstevel@tonic-gate extern int affbytecnt; /* Total bytes of Auto-Fwd. info in msg. */ 476*7c478bd9Sstevel@tonic-gate extern int affcnt; /* Number of Auto-Fwd.-From: lines in msg. */ 477*7c478bd9Sstevel@tonic-gate extern int Daffbytecnt; /* Hold affbytecnt when sending Deliv. Notif. */ 478*7c478bd9Sstevel@tonic-gate extern int Daffcnt; /* Hold affcnt when sending Deliv. Notif. */ 479*7c478bd9Sstevel@tonic-gate extern char binmsg[]; 480*7c478bd9Sstevel@tonic-gate extern int changed; /* > 0 says mailfile has changed */ 481*7c478bd9Sstevel@tonic-gate extern char datestring[60]; 482*7c478bd9Sstevel@tonic-gate extern char dbgfname[20]; /* name of file for debugging output */ 483*7c478bd9Sstevel@tonic-gate extern FILE *dbgfp; /* FILE* for debugging output */ 484*7c478bd9Sstevel@tonic-gate extern char dead[]; /* name of dead.letter */ 485*7c478bd9Sstevel@tonic-gate extern int debug; /* Controls debugging level. 0 ==> no debugging */ 486*7c478bd9Sstevel@tonic-gate extern int delflg; 487*7c478bd9Sstevel@tonic-gate extern int dflag; /* 1 says returning unsendable mail */ 488*7c478bd9Sstevel@tonic-gate extern char *errlist[]; 489*7c478bd9Sstevel@tonic-gate extern int error; /* Local value for error */ 490*7c478bd9Sstevel@tonic-gate extern char *failsafe; /* $FAILSAFE */ 491*7c478bd9Sstevel@tonic-gate extern int file_size; 492*7c478bd9Sstevel@tonic-gate extern int flge; /* 1 ==> 'e' option specified */ 493*7c478bd9Sstevel@tonic-gate extern int flgE; /* 1 ==> 'E' option specified */ 494*7c478bd9Sstevel@tonic-gate extern int flgF; /* 1 ==> Installing/Removing Forwarding */ 495*7c478bd9Sstevel@tonic-gate extern int flgf; /* 1 ==> 'f' option specified */ 496*7c478bd9Sstevel@tonic-gate extern int flgh; /* 1 ==> 'h' option specified */ 497*7c478bd9Sstevel@tonic-gate extern int flgm; 498*7c478bd9Sstevel@tonic-gate extern int flgp; /* 1 ==> 'p' option specified */ 499*7c478bd9Sstevel@tonic-gate extern int flgP; /* 1 ==> 'P' option specified */ 500*7c478bd9Sstevel@tonic-gate extern int flgr; /* 1 ==> 'r' option -- print in fifo order */ 501*7c478bd9Sstevel@tonic-gate extern int flgt; /* 1 ==> 't' option -- add To: line to letter */ 502*7c478bd9Sstevel@tonic-gate extern int flgT; /* 1 ==> 'T' option specified */ 503*7c478bd9Sstevel@tonic-gate extern int flgw; /* 1 ==> 'w' option specified */ 504*7c478bd9Sstevel@tonic-gate extern int fnuhdrtype; /* type of first non-UNIX header line */ 505*7c478bd9Sstevel@tonic-gate extern char forwmsg[]; /* " forwarded by %s" */ 506*7c478bd9Sstevel@tonic-gate extern char frwlmsg[]; /* "Forwarding loop detected in mailfile" */ 507*7c478bd9Sstevel@tonic-gate extern char fromS[1024]; /* stored here by sendmail for sendsurg */ 508*7c478bd9Sstevel@tonic-gate extern char fromU[1024]; /* stored here by sendmail for sendsurg */ 509*7c478bd9Sstevel@tonic-gate extern char frwrd[]; /* forwarding sentinel */ 510*7c478bd9Sstevel@tonic-gate extern char fwdFrom[1024]; 511*7c478bd9Sstevel@tonic-gate extern int goerr; /* counts parsing errors */ 512*7c478bd9Sstevel@tonic-gate extern struct group *grpptr; /* pointer to struct group */ 513*7c478bd9Sstevel@tonic-gate extern struct hdrlines hdrlines[H_CONT]; 514*7c478bd9Sstevel@tonic-gate extern struct hdr header[]; /* H_* #define's used to index into array */ 515*7c478bd9Sstevel@tonic-gate extern char *help[]; 516*7c478bd9Sstevel@tonic-gate extern char *hmbox; /* pointer to $HOME/mbox */ 517*7c478bd9Sstevel@tonic-gate extern char *hmdead; /* pointer to $HOME/dead.letter */ 518*7c478bd9Sstevel@tonic-gate extern char *home; /* pointer to $HOME */ 519*7c478bd9Sstevel@tonic-gate extern time_t iop; 520*7c478bd9Sstevel@tonic-gate extern int interactive; /* 1 says user is interactive */ 521*7c478bd9Sstevel@tonic-gate extern int ismail; /* default to program=mail */ 522*7c478bd9Sstevel@tonic-gate extern int deliverflag; /* -d flag, bypass sendmail and go to mbox */ 523*7c478bd9Sstevel@tonic-gate extern int fromflag; /* -f from_user while sending */ 524*7c478bd9Sstevel@tonic-gate extern int keepdbgfile; /* does debug file get deleted at end? */ 525*7c478bd9Sstevel@tonic-gate extern struct let let[MAXLET]; 526*7c478bd9Sstevel@tonic-gate extern char *lettmp; /* pointer to tmp filename */ 527*7c478bd9Sstevel@tonic-gate extern char lfil[MAXFILENAME]; 528*7c478bd9Sstevel@tonic-gate extern char line[LSIZE]; /* holds a line of a letter in many places */ 529*7c478bd9Sstevel@tonic-gate extern char *mailfile; /* pointer to mailfile */ 530*7c478bd9Sstevel@tonic-gate extern char mailcnfg[]; /* /etc/mail/mailcnfg */ 531*7c478bd9Sstevel@tonic-gate extern char maildir[]; /* directory for mail files */ 532*7c478bd9Sstevel@tonic-gate extern gid_t mailgrp; /* numeric id of group 'mail' */ 533*7c478bd9Sstevel@tonic-gate extern char mailsave[]; /* dir for save files */ 534*7c478bd9Sstevel@tonic-gate extern char *mailsurr; /* surrogate file name */ 535*7c478bd9Sstevel@tonic-gate extern FILE *malf; /* File pointer for mailfile */ 536*7c478bd9Sstevel@tonic-gate extern int maxerr; /* largest value of error */ 537*7c478bd9Sstevel@tonic-gate extern char mbox[]; /* name for mbox */ 538*7c478bd9Sstevel@tonic-gate extern uid_t mf_uid; /* uid of user's mailfile */ 539*7c478bd9Sstevel@tonic-gate extern gid_t mf_gid; /* gid of user's mailfile */ 540*7c478bd9Sstevel@tonic-gate extern char *msgtype; 541*7c478bd9Sstevel@tonic-gate extern char my_name[1024]; /* user's name who invoked this command */ 542*7c478bd9Sstevel@tonic-gate extern char from_user[1024];/* name of user mail's from, used w/ -f */ 543*7c478bd9Sstevel@tonic-gate extern uid_t my_euid; /* user's euid */ 544*7c478bd9Sstevel@tonic-gate extern gid_t my_egid; /* user's egid */ 545*7c478bd9Sstevel@tonic-gate extern uid_t my_uid; /* user's uid */ 546*7c478bd9Sstevel@tonic-gate extern gid_t my_gid; /* user's gid */ 547*7c478bd9Sstevel@tonic-gate extern int nlet; /* current number of letters in mailfile */ 548*7c478bd9Sstevel@tonic-gate extern int onlet; /* number of letters in mailfile at startup*/ 549*7c478bd9Sstevel@tonic-gate extern int optcnt; /* Number of options specified */ 550*7c478bd9Sstevel@tonic-gate extern int orig_aff; /* orig. msg. contained H_AFWDFROM lines */ 551*7c478bd9Sstevel@tonic-gate extern int orig_dbglvl; /* argument to -x invocation option */ 552*7c478bd9Sstevel@tonic-gate extern int orig_rcv; /* orig. msg. contained H_RECEIVED lines */ 553*7c478bd9Sstevel@tonic-gate extern int orig_tcopy; /* orig. msg. contained H_TCOPY lines */ 554*7c478bd9Sstevel@tonic-gate extern struct passwd *pwd; /* holds passwd entry for this user */ 555*7c478bd9Sstevel@tonic-gate extern int pflg; /* binary message display override flag */ 556*7c478bd9Sstevel@tonic-gate extern int Pflg; /* Selective display flag; 1 ==> display all */ 557*7c478bd9Sstevel@tonic-gate extern char *program; /* program name */ 558*7c478bd9Sstevel@tonic-gate extern int rcvbytecnt; /* Total bytes of Received: info in msg. */ 559*7c478bd9Sstevel@tonic-gate extern int Drcvbytecnt; /* Hold rcvbytecnt when sending Del. Notif. */ 560*7c478bd9Sstevel@tonic-gate extern char *recipname; /* full recipient name/address */ 561*7c478bd9Sstevel@tonic-gate extern int replying; /* 1 says we are replying to a letter */ 562*7c478bd9Sstevel@tonic-gate extern char RFC822datestring[60];/* Date in RFC822 date format */ 563*7c478bd9Sstevel@tonic-gate extern char rmtmsg[]; /* "remote from %s" */ 564*7c478bd9Sstevel@tonic-gate extern char Rpath[1024]; /* return path to sender of message */ 565*7c478bd9Sstevel@tonic-gate extern char rtrnmsg[]; /* "UNDELIVERABLE MAIL being returned by %s" */ 566*7c478bd9Sstevel@tonic-gate extern int sav_errno; 567*7c478bd9Sstevel@tonic-gate extern char savefile[MAXFILENAME]; /* holds filename of save file */ 568*7c478bd9Sstevel@tonic-gate #ifdef __STDC__ 569*7c478bd9Sstevel@tonic-gate extern void (*saveint)(int); 570*7c478bd9Sstevel@tonic-gate #else 571*7c478bd9Sstevel@tonic-gate extern void (*saveint)(); 572*7c478bd9Sstevel@tonic-gate #endif 573*7c478bd9Sstevel@tonic-gate extern char *seldisp[]; 574*7c478bd9Sstevel@tonic-gate extern int sending; /* TRUE==>sending mail; FALSE==>printing mail */ 575*7c478bd9Sstevel@tonic-gate extern char m_sendto[1024]; 576*7c478bd9Sstevel@tonic-gate extern jmp_buf sjbuf; 577*7c478bd9Sstevel@tonic-gate extern int surg_rc; /* exit code of surrogate command */ 578*7c478bd9Sstevel@tonic-gate extern t_surrfile *surrfile; /* the compiled surrogate file */ 579*7c478bd9Sstevel@tonic-gate extern int surr_len; /* # entries in surrogate file */ 580*7c478bd9Sstevel@tonic-gate extern char *SURRcmdstr; /* save in case of FAILURE */ 581*7c478bd9Sstevel@tonic-gate extern FILE *SURRerrfile; /* stderr from surrogate in case of failure */ 582*7c478bd9Sstevel@tonic-gate extern char *thissys; /* Holds name of the system we are on */ 583*7c478bd9Sstevel@tonic-gate extern FILE *tmpf; /* file pointer for temporary files */ 584*7c478bd9Sstevel@tonic-gate extern mode_t umsave; 585*7c478bd9Sstevel@tonic-gate extern struct utsname utsn; 586*7c478bd9Sstevel@tonic-gate extern struct utimbuf *utimep; 587*7c478bd9Sstevel@tonic-gate extern char uval[1024]; 588*7c478bd9Sstevel@tonic-gate 589*7c478bd9Sstevel@tonic-gate #ifdef NOTDEF 590*7c478bd9Sstevel@tonic-gate #ifdef sun 591*7c478bd9Sstevel@tonic-gate #define _NFILE getdtablesize() 592*7c478bd9Sstevel@tonic-gate #endif 593*7c478bd9Sstevel@tonic-gate #endif /* NOTDEF */ 594*7c478bd9Sstevel@tonic-gate 595*7c478bd9Sstevel@tonic-gate #endif /* _MAIL_H */ 596