home *** CD-ROM | disk | FTP | other *** search
- Index: alias.c
- *** smail2.5/alias.c Mon Dec 21 18:29:55 1987
- --- smail/alias.c Thu Sep 24 13:00:56 1987
- ***************
- *** 460,462 ****
-
- ! while((*p != NULL) && (*p != '#')) {
- b = p;
- --- 460,462 ----
-
- ! while((*p != '\0') && (*p != '#')) {
- b = p;
- Index: defs.h
- *** smail2.5/defs.h Mon Dec 21 18:29:57 1987
- --- smail/defs.h Wed Dec 30 11:30:40 1987
- ***************
- *** 18,19 ****
- --- 18,47 ----
-
- + /*
- + ** Modified for SCO Xenix by Chip Salzenberg (chip@ateng.UUCP).
- + ** Released to Usenet on 01 Dec 1987.
- + ** Further modified 23 Dec 1987.
- + **
- + ** Additions:
- + **
- + ** EXECMAIL is defined as the renamed /usr/lib/mail/execmail.
- + ** Under Xenix, this is the local delivery agent.
- + **
- + ** SMARTMAILER is now automatically defined if either SENDMAIL
- + ** or EXECMAIL is defined. This is useful for code that depends
- + ** on properties that these programs have in common (automatic
- + ** bouncing of failed mail, for example).
- + **
- + ** MICNET should be defined if Micnet or Xenix-Net is in use.
- + ** In this case, execmail is used for _all_ mail, which allows
- + ** the automatic routing of UUCP mail to a gateway. However,
- + ** execmail sends one file per recipient, even if the recipients
- + ** are all on the same (remote) machine. This is not exactly
- + ** a bug; it just increases UUCP connect time. I personally
- + ** leave MICNET undefined.
- + **
- + ** HOSTFILE is the name of a file containing the hostname.
- + ** Under Xenix, this is "/etc/systemid". HOSTFILE overrides
- + ** UNAME/GETHOSTNAME.
- + */
- +
- #ifndef VERSION
- ***************
- *** 32,34 ****
-
- ! /* if defined, HOSTNAME overrides UNAME and GETHOSTNAME */
- /*#define HOSTNAME "host" /* literal name */
- --- 60,69 ----
-
- ! /* if defined, HOSTFILE overrides UNAME and GETHOSTNAME */
- ! #ifndef HOSTFILE
- ! #ifdef M_XENIX
- ! #define HOSTFILE "/etc/systemid" /* read host name from this file */
- ! #endif
- ! #endif
- !
- ! /* if defined, HOSTNAME overrides HOSTFILE, UNAME, and GETHOSTNAME */
- /*#define HOSTNAME "host" /* literal name */
- ***************
- *** 105,107 ****
-
- ! #define ALIAS "/usr/lib/aliases" /* location of mail aliases */
- /*#define CASEALIAS /* make aliases case sensitive */
- --- 140,147 ----
-
- ! /* Location of mail aliases */
- ! #ifdef M_XENIX
- ! #define ALIAS "/usr/lib/mail/saliases"
- ! #else
- ! #define ALIAS "/usr/lib/aliases"
- ! #endif
- /*#define CASEALIAS /* make aliases case sensitive */
- ***************
- *** 125,126 ****
- --- 165,170 ----
-
- + /* list of Full Name, address pairs */
- + #ifdef M_XENIX
- + #define FULLNAME "/usr/lib/mail/fullnames"
- + #else
- #define FULLNAME "/usr/lib/fullnames"
- ***************
- *** 126,128 ****
- #define FULLNAME "/usr/lib/fullnames"
- ! /* list of Full Name, address pairs */
-
- --- 170,172 ----
- #define FULLNAME "/usr/lib/fullnames"
- ! #endif
-
- ***************
- *** 144,146 ****
-
- ! /*#define LOG "/usr/spool/uucp/mail.log" /* log of uucp mail */
- /*#define RECORD "/tmp/mail.log" /* record of uucp mail */
- --- 188,190 ----
-
- ! #define LOG "/usr/spool/uucp/mail.log" /* log of uucp mail */
- /*#define RECORD "/tmp/mail.log" /* record of uucp mail */
- ***************
- *** 162,165 ****
-
- ! #ifndef SMAIL
- ! #define SMAIL "/bin/smail" /* location of smail command */
- #endif
- --- 206,212 ----
-
- ! #ifndef SMAIL /* location of smail command */
- ! #ifdef M_XENIX
- ! #define SMAIL "/usr/bin/smail"
- ! #else
- ! #define SMAIL "/bin/smail"
- #endif
- ***************
- *** 165,166 ****
- --- 212,214 ----
- #endif
- + #endif
-
- ***************
- *** 179,182 ****
-
- ! #define RMAIL(flags,from,sys) "%s -a%s %s - %s!rmail",UUX,from,flags,sys /* */
- ! /*#define RMAIL(flags,from,sys) "%s %s - %s!rmail",UUX,flags,sys /* */
-
- --- 227,230 ----
-
- ! /*#define RMAIL(flags,from,sys) "%s -a%s %s - %s!rmail",UUX,from,flags,sys /* */
- ! #define RMAIL(flags,from,sys) "%s %s - %s!rmail",UUX,flags,sys /* */
-
- ***************
- *** 187,188 ****
- --- 235,238 ----
-
- + /* We're letting sendmail do lots of work for us. */
- +
- #define HANDLE JUSTUUCP /* see HANDLE definition below */
- ***************
- *** 195,197 ****
-
- ! #else
-
- --- 245,247 ----
-
- ! #else /* !SENDMAIL */
-
- ***************
- *** 197,200 ****
-
- ! #define HANDLE ALL
- ! #define ROUTING JUSTDOMAIN
-
- --- 247,249 ----
-
- ! /* We don't have sendmail, so we'll do the work ourselves. */
-
- ***************
- *** 200,205 ****
-
- ! #ifdef BSD
- ! #define LMAIL(frm,sys) "/bin/mail" /* BSD local delivery agent */
- ! #else
- ! #define LMAIL(frm,sys) "/bin/lmail" /* SV local delivery agent */
- #endif
- --- 249,255 ----
-
- ! #define HANDLE ALL /* see HANDLE definition below */
- ! #define ROUTING ALWAYS /* see ROUTING definition below */
- !
- ! #ifdef BSD /* BSD local delivery agent */
- ! #define LMAIL(frm,sys) "/bin/mail"
- #endif
- ***************
- *** 206,207 ****
- --- 256,267 ----
-
- + #ifdef M_XENIX /* Xenix local delivery agent (renamed) */
- + #define EXECMAIL "/usr/lib/mail/execmail.x"
- + #define LMAIL(frm,sys) "%s -m -f '%s'",EXECMAIL,frm
- + /*#define MICNET /* give all mail to execmail, never uux */
- + #endif
- +
- + #ifndef LMAIL /* Default local delivery agent */
- + #define LMAIL(frm,sys) "/bin/lmail"
- + #endif
- +
- #define LARG(user) " '%s'",postmaster(user)
- ***************
- *** 210,211 ****
- --- 270,280 ----
-
- + #endif /* !SENDMAIL */
- +
- + /* Sendmail and Execmail are "smart" mailers */
- + #ifdef SENDMAIL
- + #define SMARTMAILER
- + #endif
- +
- + #ifdef EXECMAIL
- + #define SMARTMAILER
- #endif
- Index: deliver.c
- *** smail2.5/deliver.c Mon Dec 21 18:29:59 1987
- --- smail/deliver.c Wed Dec 23 12:19:33 1987
- ***************
- *** 7,8 ****
- --- 7,24 ----
-
- + /*
- + ** Modified for SCO Xenix by Chip Salzenberg (chip@ateng.UUCP).
- + ** Released to Usenet on 01 Dec 1987.
- + ** Further modified 23 Dec 1987.
- + **
- + ** Additions:
- + **
- + ** If MICNET is defined, then LMAIL (execmail) is used to
- + ** deliver all mail, even remote mail. See defs.h for a
- + ** discussion of the tradeoffs of this feature.
- + **
- + ** Some #ifdefs are now SMARTMAILER instead of SENDMAIL.
- + ** This is because execmail has some of the intelligent
- + ** features of sendmail, i.e. automatic mail return.
- + */
- +
- #ifndef lint
- ***************
- *** 219,222 ****
- command = scommand;
- - } else if (form == LOCAL) {
- - command = lcommand;
- } else {
- --- 235,236 ----
- ***************
- *** 222,226 ****
- } else {
- ! command = rcommand;
- ! if(flags == uux_noqueue) {
- ! noqcnt++;
- }
- --- 236,250 ----
- } else {
- ! #ifdef MICNET
- ! /* Xenix system running Micnet -- let execmail
- ! * handle all messages except retries.
- ! */
- ! command = lcommand;
- ! #else
- ! if (form == LOCAL) {
- ! command = lcommand;
- ! } else {
- ! command = rcommand;
- ! if(flags == uux_noqueue) {
- ! noqcnt++;
- ! }
- }
- ***************
- *** 226,227 ****
- --- 250,252 ----
- }
- + #endif
- }
- ***************
- *** 271,273 ****
- if (form == LOCAL) {
- ! #ifdef SENDMAIL
- (void) sprintf(buf, LFROM(from, nows, hostname));
- --- 296,298 ----
- if (form == LOCAL) {
- ! #ifdef SMARTMAILER
- (void) sprintf(buf, LFROM(from, nows, hostname));
- ***************
- *** 283,285 ****
- } else {
- ! *p = NULL;
- (void) sprintf(buf, RFROM(p+1, nows, from));
- --- 308,310 ----
- } else {
- ! *p = '\0';
- (void) sprintf(buf, RFROM(p+1, nows, from));
- ***************
- *** 372,378 ****
- (void) fseek(spoolfp, message, 0);
- ! #ifdef SENDMAIL
- ! /* if we have sendmail, then it
- ! ** was handed the mail, which failed.
- ! ** sendmail returns the failed mail
- ! ** for us, so we need not do it again.
- */
- --- 397,402 ----
- (void) fseek(spoolfp, message, 0);
- ! #ifdef SMARTMAILER
- ! /* Mail is automatically returned
- ! ** by sendmail and execmail, so we
- ! ** need not do it again.
- */
- Index: headers.c
- *** smail2.5/headers.c Mon Dec 21 18:30:06 1987
- --- smail/headers.c Wed Dec 23 12:26:43 1987
- ***************
- *** 5,6 ****
- --- 5,18 ----
-
- + /*
- + ** Modified for SCO Xenix by Chip Salzenberg (chip@ateng.UUCP).
- + ** Released to Usenet on 01 Dec 1987.
- + ** Further modified 23 Dec 1987.
- + **
- + ** Additions:
- + **
- + ** Understand "a%b" to mean "a@b". (This is a judgement call.
- + ** I prefer to accept any mail that I can understand, not just
- + ** that which is "correct.")
- + */
- +
- #ifndef lint
- ***************
- *** 155,156 ****
- --- 167,179 ----
- }
- + /*
- + ** Try splitting at %. If it works, this is user%domain, which we choose
- + ** to understand as user@domain. Prefer the righthand % in a%b%c.
- + ** (This code allows 'user%foo@mydom' to mean '@mydom,user@foo'.)
- + */
- + if ((parts = ssplit(address, '%', partv)) >= 2) {
- + (void) strcpy(domain, partv[parts-1]);
- + (void) strncpy(user, partv[0], partv[parts-1]-partv[0]-1);
- + user[partv[parts-1]-partv[0]-1] = '\0';
- + return (DOMAIN);
- + }
- /*
- Index: misc.c
- *** smail2.5/misc.c Mon Dec 21 18:30:19 1987
- --- smail/misc.c Wed Dec 23 12:30:02 1987
- ***************
- *** 5,6 ****
- --- 5,21 ----
-
- + /*
- + ** Modified for SCO Xenix by Chip Salzenberg (chip@ateng.UUCP).
- + ** Released to Usenet on 01 Dec 1987.
- + ** Further modified 23 Dec 1987.
- + **
- + ** Additions:
- + **
- + ** If HOSTFILE is defined, read it to look for the hostname.
- + ** (This file is typically "/etc/systemid" on Xenix systems.)
- + ** If HOSTFILE is missing, try uname() or gethostname().
- + **
- + ** Write only the basename of the program in the log file,
- + ** just to make the log file easier to read.
- + */
- +
- #ifndef lint
- ***************
- *** 53,57 ****
-
- ! logtime = strcpy(tbuf, nows);
- ! logtime[16] = '\0';
- ! logtime += 4;
-
- --- 68,75 ----
-
- ! /* To make the log file look nicer, show only the basename of
- ! * the command.
- ! */
- ! if (*command == '/')
- ! {
- ! char *p, *ecmd;
-
- ***************
- *** 57,58 ****
- --- 75,92 ----
-
- + if ( (ecmd = index(command, ' ')) != 0 )
- + *ecmd = '\0';
- +
- + if ( (p = rindex(command, '/')) != 0 )
- + command = p + 1;
- +
- + if ( ecmd != 0 )
- + *ecmd = ' ';
- + }
- +
- + /* Time (now).
- + */
- + strcpy(tbuf, nows);
- + tbuf[16] = '\0';
- + logtime = &tbuf[4];
- +
- cmask = umask(0);
- ***************
- *** 313,314 ****
- --- 347,363 ----
- (void) strcpy(hostname, HOSTNAME);
- + #endif
- + #ifdef HOSTFILE
- + if (!*hostname) {
- + FILE *fp;
- + char *p;
- +
- + if ((fp = fopen(HOSTFILE, "r")) != NULL) {
- + if (fgets(hostname, SMLBUF - 1, fp) != NULL
- + && (p = index(hostname, '\n')) != NULL)
- + *p = '\0';
- + else
- + *hostname = '\0';
- + fclose(fp);
- + }
- + }
- #endif
- Index: nptx.c
- *** smail2.5/nptx.c Mon Dec 21 18:30:20 1987
- --- smail/nptx.c Thu Sep 24 13:07:13 1987
- ***************
- *** 127,129 ****
- (void) strcpy(nl[i], p+1);
- ! *p = NULL;
- }
- --- 127,129 ----
- (void) strcpy(nl[i], p+1);
- ! *p = '\0';
- }
- ***************
- *** 164,166 ****
- (void) strcpy(il[ii], pi+1);
- ! *pi = NULL;
- }
- --- 164,166 ----
- (void) strcpy(il[ii], pi+1);
- ! *pi = '\0';
- }
-