install new state-driven scanner; make everyone use it, thus fixing
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Tue, 7 Sep 1982 07:25:32 +0000 (23:25 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Tue, 7 Sep 1982 07:25:32 +0000 (23:25 -0800)
problems of quoted commas, etc.

SCCS-vsn: usr.sbin/sendmail/src/main.c 3.108
SCCS-vsn: usr.sbin/sendmail/src/alias.c 3.37
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 3.108
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 3.53
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 3.42
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.187
SCCS-vsn: usr.sbin/sendmail/src/queue.c 3.41
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 3.31
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 3.40
SCCS-vsn: usr.sbin/sendmail/src/headers.c 3.32

usr/src/usr.sbin/sendmail/src/alias.c
usr/src/usr.sbin/sendmail/src/deliver.c
usr/src/usr.sbin/sendmail/src/headers.c
usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/parseaddr.c
usr/src/usr.sbin/sendmail/src/queue.c
usr/src/usr.sbin/sendmail/src/recipient.c
usr/src/usr.sbin/sendmail/src/savemail.c
usr/src/usr.sbin/sendmail/src/srvrsmtp.c
usr/src/usr.sbin/sendmail/src/version.c

index b2ef1b1..a29ffe6 100644 (file)
@@ -4,9 +4,9 @@
 # include "sendmail.h"
 
 # ifdef DBM
 # include "sendmail.h"
 
 # ifdef DBM
-SCCSID(@(#)alias.c     3.36            %G%     (with DBM));
+SCCSID(@(#)alias.c     3.37            %G%     (with DBM));
 # else DBM
 # else DBM
-SCCSID(@(#)alias.c     3.36            %G%     (without DBM));
+SCCSID(@(#)alias.c     3.37            %G%     (without DBM));
 # endif DBM
 
 /*
 # endif DBM
 
 /*
index 2bfd1bf..9be1690 100644 (file)
@@ -3,7 +3,7 @@
 # include "sendmail.h"
 # include <sys/stat.h>
 
 # include "sendmail.h"
 # include <sys/stat.h>
 
-SCCSID(@(#)deliver.c   3.107           %G%);
+SCCSID(@(#)deliver.c   3.108           %G%);
 
 /*
 **  DELIVER -- Deliver a message to a list of addresses.
 
 /*
 **  DELIVER -- Deliver a message to a list of addresses.
@@ -1044,9 +1044,8 @@ commaize(h, p, fp, oldstyle, m)
        {
                register char *name;
                char savechar;
        {
                register char *name;
                char savechar;
-               int commentlevel;
-               bool inquote;
                extern char *remotename();
                extern char *remotename();
+               extern char *DelimChar;         /* defined in prescan */
 
                /*
                **  Find the end of the name.  New style names
 
                /*
                **  Find the end of the name.  New style names
@@ -1056,30 +1055,17 @@ commaize(h, p, fp, oldstyle, m)
                **  signs mean keep going.
                */
 
                **  signs mean keep going.
                */
 
-               /* clean up the leading trash in source */
-               while (*p != '\0' && (isspace(*p) || *p == ','))
+               /* find end of name */
+               while (isspace(*p) || *p == ',')
                        p++;
                name = p;
                        p++;
                name = p;
-
-               /* find end of name */
-               commentlevel = 0;
-               inquote = FALSE;
-               while (*p != '\0' && (*p != ',' || commentlevel > 0 || inquote))
+               for (;;)
                {
                {
-                       extern bool isatword();
                        char *oldp;
                        char *oldp;
+                       extern bool isatword();
 
 
-                       if (*p == '(')
-                               commentlevel++;
-                       else if (*p == ')' && commentlevel > 0)
-                               commentlevel--;
-                       else if (*p == '"')
-                               inquote = !inquote;
-                       if (!oldstyle || !isspace(*p))
-                       {
-                               p++;
-                               continue;
-                       }
+                       (void) prescan(name, oldstyle ? ' ' : ',');
+                       p = DelimChar;
 
                        /* look to see if we have an at sign */
                        oldp = p;
 
                        /* look to see if we have an at sign */
                        oldp = p;
@@ -1462,14 +1448,14 @@ sendall(e, verifyonly)
 
                        /* owner list exists -- add it to the error queue */
                        qq->q_flags &= ~QPRIMARY;
 
                        /* owner list exists -- add it to the error queue */
                        qq->q_flags &= ~QPRIMARY;
-                       sendto(obuf, 1, qq, &e->e_errorqueue);
+                       sendto(obuf, qq, &e->e_errorqueue);
                        MailBack = TRUE;
                        break;
                }
 
                /* if we did not find an owner, send to the sender */
                if (qq == NULL)
                        MailBack = TRUE;
                        break;
                }
 
                /* if we did not find an owner, send to the sender */
                if (qq == NULL)
-                       sendto(e->e_from.q_paddr, 1, qq, &e->e_errorqueue);
+                       sendto(e->e_from.q_paddr, qq, &e->e_errorqueue);
        }
 }
 \f/*
        }
 }
 \f/*
index 289731e..714bb0a 100644 (file)
@@ -1,7 +1,7 @@
 # include <errno.h>
 # include "sendmail.h"
 
 # include <errno.h>
 # include "sendmail.h"
 
-SCCSID(@(#)headers.c   3.31            %G%);
+SCCSID(@(#)headers.c   3.32            %G%);
 
 /*
 **  CHOMPHEADER -- process and save a header line.
 
 /*
 **  CHOMPHEADER -- process and save a header line.
@@ -121,7 +121,7 @@ chompheader(line, def)
 
        /* send to this person if we so desire */
        if (!def && GrabTo && bitset(H_RCPT, h->h_flags))
 
        /* send to this person if we so desire */
        if (!def && GrabTo && bitset(H_RCPT, h->h_flags))
-               sendto(h->h_value, 0, (ADDRESS *) NULL, &CurEnv->e_sendqueue);
+               sendto(h->h_value, (ADDRESS *) NULL, &CurEnv->e_sendqueue);
 
        return (h->h_flags);
 }
 
        return (h->h_flags);
 }
@@ -509,6 +509,10 @@ crackaddr(addr)
        strcpy(buf, "");
        rhs = NULL;
 
        strcpy(buf, "");
        rhs = NULL;
 
+       /* strip leading spaces */
+       while (*addr != '\0' && isspace(*addr))
+               addr++;
+
        /*
        **  See if we have anything in angle brackets.  If so, that is
        **  the address part, and the rest is the comment.
        /*
        **  See if we have anything in angle brackets.  If so, that is
        **  the address part, and the rest is the comment.
@@ -521,10 +525,14 @@ crackaddr(addr)
                *p = '\0';
                strcpy(buf, addr);
                strcat(buf, "<");
                *p = '\0';
                strcpy(buf, addr);
                strcat(buf, "<");
-               *p = '<';
+               *p++ = '<';
+
+               /* skip spaces */
+               while (isspace(*p))
+                       p++;
 
                /* find the matching right angle bracket */
 
                /* find the matching right angle bracket */
-               addr = ++p;
+               addr = p;
                for (i = 0; *p != '\0'; p++)
                {
                        switch (*p)
                for (i = 0; *p != '\0'; p++)
                {
                        switch (*p)
index 9b57413..8bb24b8 100644 (file)
@@ -6,7 +6,7 @@
 # include "sendmail.h"
 # include <sys/stat.h>
 
 # include "sendmail.h"
 # include <sys/stat.h>
 
-SCCSID(@(#)main.c      3.107           %G%);
+SCCSID(@(#)main.c      3.108           %G%);
 
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
 
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
@@ -841,7 +841,7 @@ finis()
        {
                auto ADDRESS *rlist;
 
        {
                auto ADDRESS *rlist;
 
-               sendto(CurEnv->e_receiptto, 1, (ADDRESS *) NULL, &rlist);
+               sendto(CurEnv->e_receiptto, (ADDRESS *) NULL, &rlist);
                (void) returntosender("Return receipt", rlist, FALSE);
        }
 
                (void) returntosender("Return receipt", rlist, FALSE);
        }
 
index e188546..79ded22 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-SCCSID(@(#)parseaddr.c 3.52            %G%);
+SCCSID(@(#)parseaddr.c 3.53            %G%);
 
 /*
 **  PARSE -- Parse an address
 
 /*
 **  PARSE -- Parse an address
@@ -62,7 +62,7 @@ parse(addr, a, copyf)
                printf("\n--parse(%s)\n", addr);
 # endif DEBUG
 
                printf("\n--parse(%s)\n", addr);
 # endif DEBUG
 
-       pvp = prescan(addr, '\0');
+       pvp = prescan(addr, ',');
        if (pvp == NULL)
                return (NULL);
 
        if (pvp == NULL)
                return (NULL);
 
@@ -99,7 +99,14 @@ parse(addr, a, copyf)
        */
 
        if (copyf > 0)
        */
 
        if (copyf > 0)
+       {
+               extern char *DelimChar;
+               char savec = *DelimChar;
+
+               *DelimChar = '\0';
                a->q_paddr = newstr(addr);
                a->q_paddr = newstr(addr);
+               *DelimChar = savec;
+       }
        else
                a->q_paddr = addr;
        if (copyf >= 0)
        else
                a->q_paddr = addr;
        if (copyf >= 0)
@@ -158,7 +165,6 @@ parse(addr, a, copyf)
 **             addr -- the name to chomp.
 **             delim -- the delimiter for the address, normally
 **                     '\0' or ','; \0 is accepted in any case.
 **             addr -- the name to chomp.
 **             delim -- the delimiter for the address, normally
 **                     '\0' or ','; \0 is accepted in any case.
-**                     are moving in place; set buflim to high core.
 **
 **     Returns:
 **             A pointer to a vector of tokens.
 **
 **     Returns:
 **             A pointer to a vector of tokens.
@@ -168,14 +174,34 @@ parse(addr, a, copyf)
 **             none.
 */
 
 **             none.
 */
 
-# define OPER          1
-# define ATOM          2
-# define EOTOK         3
-# define QSTRING       4
-# define SPACE         5
-# define ONEMORE       6
-# define GETONE                7
-# define MACRO         8
+/* states and character types */
+# define OPR           0       /* operator */
+# define ATM           1       /* atom */
+# define QST           2       /* in quoted string */
+# define SPC           3       /* chewing up spaces */
+# define ONE           4       /* pick up one character */
+
+# define NSTATES       5       /* number of states */
+# define TYPE          017     /* mask to select state type */
+
+/* meta bits for table */
+# define M             020     /* meta character; don't pass through */
+# define B             040     /* cause a break */
+# define MB            M|B     /* meta-break */
+
+static short StateTab[NSTATES][NSTATES] =
+{
+   /*  oldst   newst>  OPR     ATM     QST     SPC     ONE     */
+       /*OPR*/         OPR|B,  ATM|B,  QST|MB, SPC|MB, ONE|B,
+       /*ATM*/         OPR|B,  ATM,    QST|MB, SPC|MB, ONE|B,
+       /*QST*/         QST,    QST,    QST|MB, QST,    QST,
+       /*SPC*/         OPR,    ATM,    QST,    SPC|M,  ONE,
+       /*ONE*/         OPR,    OPR,    OPR,    OPR,    OPR,
+};
+
+# define NOCHAR                -1      /* signal nothing in lookahead token */
+
+char   *DelimChar;             /* set to point to the delimiter */
 
 char **
 prescan(addr, delim)
 
 char **
 prescan(addr, delim)
@@ -183,29 +209,61 @@ prescan(addr, delim)
        char delim;
 {
        register char *p;
        char delim;
 {
        register char *p;
-       static char buf[MAXNAME+MAXATOM];
-       static char *av[MAXATOM+1];
+       register char *q;
+       register char c;
        char **avp;
        bool bslashmode;
        int cmntcnt;
        char **avp;
        bool bslashmode;
        int cmntcnt;
-       register char c;
        char *tok;
        char *tok;
-       register char *q;
-       register int state;
-       int nstate;
-       extern char lower();
+       int state;
+       int newstate;
+       static char buf[MAXNAME+MAXATOM];
+       static char *av[MAXATOM+1];
 
        q = buf;
        bslashmode = FALSE;
        cmntcnt = 0;
        avp = av;
 
        q = buf;
        bslashmode = FALSE;
        cmntcnt = 0;
        avp = av;
-       state = OPER;
-       for (p = addr; *p != '\0' && *p != delim; )
+       state = OPR;
+       c = NOCHAR;
+       p = addr;
+# ifdef DEBUG
+       if (tTd(22, 45))
+       {
+               printf("prescan: ");
+               xputs(p);
+               putchar('\n');
+       }
+# endif DEBUG
+
+       do
        {
                /* read a token */
                tok = q;
        {
                /* read a token */
                tok = q;
-               while ((c = *p++) != '\0' && c != delim)
+               for (;;)
                {
                {
+                       /* store away any old lookahead character */
+                       if (c != NOCHAR)
+                       {
+                               /* squirrel it away */
+                               if (q >= &buf[sizeof buf - 5])
+                               {
+                                       usrerr("Address too long");
+                                       DelimChar = p;
+                                       return (NULL);
+                               }
+                               *q++ = c;
+                       }
+
+                       /* read a new input character */
+                       c = *p++;
+                       if (c == '\0')
+                               break;
+# ifdef DEBUG
+                       if (tTd(22, 101))
+                               printf("c=%c, s=%d; ", c, state);
+# endif DEBUG
+
                        /* chew up special characters */
                        c &= ~0200;
                        *q = '\0';
                        /* chew up special characters */
                        c &= ~0200;
                        *q = '\0';
@@ -217,115 +275,72 @@ prescan(addr, delim)
                        else if (c == '\\')
                        {
                                bslashmode = TRUE;
                        else if (c == '\\')
                        {
                                bslashmode = TRUE;
-                               continue;
+                               c = NOCHAR;
                        }
                        }
-                       else if (c == '"')
+                       else if (c == '(')
                        {
                        {
-                               if (state == QSTRING)
-                                       state = OPER;
-                               else
-                                       state = QSTRING;
-                               break;
+                               cmntcnt++;
+                               c = NOCHAR;
                        }
                        }
-
-                       nstate = toktype(c);
-                       switch (state)
+                       else if (c == ')')
                        {
                        {
-                         case QSTRING:         /* in quoted string */
-                               break;
-
-                         case ATOM:            /* regular atom */
-                               if (nstate != ATOM)
+                               if (cmntcnt <= 0)
                                {
                                {
-                                       state = EOTOK;
-                                       p--;
+                                       usrerr("Unbalanced ')'");
+                                       DelimChar = p;
+                                       return (NULL);
                                }
                                }
-                               break;
-
-                         case GETONE:          /* grab one character */
-                               state = OPER;
-                               break;
-
-                         case EOTOK:           /* after atom or q-string */
-                               state = nstate;
-                               if (state == SPACE)
-                                       continue;
-                               break;
-
-                         case SPACE:           /* linear white space */
-                               state = nstate;
-                               break;
-
-                         case OPER:            /* operator */
-                               if (nstate == SPACE)
-                                       continue;
-                               state = nstate;
-                               break;
-
-                         case ONEMORE:         /* $- etc. */
-                               state = GETONE;
-                               break;
-
-                         default:
-                               syserr("prescan: unknown state %d", state);
+                               else
+                                       cmntcnt--;
                        }
                        }
+                       else if (cmntcnt > 0)
+                               c = NOCHAR;
 
 
-                       if (state == EOTOK || state == SPACE)
-                               break;
+                       if (c == NOCHAR)
+                               continue;
 
 
-                       /* squirrel it away */
-                       if (q >= &buf[sizeof buf - 5])
-                       {
-                               usrerr("Address too long");
-                               return (NULL);
-                       }
-                       *q++ = c;
+                       /* see if this is end of input */
+                       if (c == delim)
+                               break;
 
 
-                       /* decide whether this represents end of token */
-                       if (state == OPER || state == GETONE)
+                       newstate = StateTab[state][toktype(c)];
+# ifdef DEBUG
+                       if (tTd(22, 101))
+                               printf("ns=%02o\n", newstate);
+# endif DEBUG
+                       state = newstate & TYPE;
+                       if (bitset(M, newstate))
+                               c = NOCHAR;
+                       if (bitset(B, newstate))
                                break;
                }
                                break;
                }
-               if (c == '\0' || c == delim)
-                       p--;
 
                /* new token */
 
                /* new token */
-               if (tok == q)
-                       continue;
-               *q++ = '\0';
-
-               c = tok[0];
-               if (c == '(')
+               if (tok != q)
                {
                {
-                       cmntcnt++;
-                       continue;
-               }
-               else if (c == ')')
-               {
-                       if (cmntcnt <= 0)
+                       *q++ = '\0';
+# ifdef DEBUG
+                       if (tTd(22, 36))
                        {
                        {
-                               usrerr("Unbalanced ')'");
-                               return (NULL);
+                               printf("tok=");
+                               xputs(tok);
+                               putchar('\n');
                        }
                        }
-                       else
+# endif DEBUG
+                       if (avp >= &av[MAXATOM])
                        {
                        {
-                               cmntcnt--;
-                               continue;
+                               syserr("prescan: too many tokens");
+                               DelimChar = p;
+                               return (NULL);
                        }
                        }
+                       *avp++ = tok;
                }
                }
-               else if (cmntcnt > 0)
-                       continue;
-
-               if (avp >= &av[MAXATOM])
-               {
-                       syserr("prescan: too many tokens");
-                       return (NULL);
-               }
-               *avp++ = tok;
-       }
+       } while (c != '\0' && c != delim);
        *avp = NULL;
        *avp = NULL;
+       DelimChar = --p;
        if (cmntcnt > 0)
                usrerr("Unbalanced '('");
        if (cmntcnt > 0)
                usrerr("Unbalanced '('");
-       else if (state == QSTRING)
+       else if (state == QST)
                usrerr("Unbalanced '\"'");
        else if (av[0] != NULL)
                return (av);
                usrerr("Unbalanced '\"'");
        else if (av[0] != NULL)
                return (av);
@@ -357,14 +372,16 @@ toktype(c)
                (void) strcat(buf, DELIMCHARS);
        }
        if (c == MATCHCLASS || c == MATCHREPL)
                (void) strcat(buf, DELIMCHARS);
        }
        if (c == MATCHCLASS || c == MATCHREPL)
-               return (ONEMORE);
+               return (ONE);
+       if (c == '"')
+               return (QST);
        if (!isascii(c))
        if (!isascii(c))
-               return (ATOM);
-       if (isspace(c))
-               return (SPACE);
+               return (ATM);
+       if (isspace(c) || c == ')')
+               return (SPC);
        if (iscntrl(c) || index(buf, c) != NULL)
        if (iscntrl(c) || index(buf, c) != NULL)
-               return (OPER);
-       return (ATOM);
+               return (OPR);
+       return (ATM);
 }
 \f/*
 **  REWRITE -- apply rewrite rules to token vector.
 }
 \f/*
 **  REWRITE -- apply rewrite rules to token vector.
@@ -781,7 +798,7 @@ cataddr(pvp, buf, sz)
        sz--;
        while (*pvp != NULL && (i = strlen(*pvp)) < sz)
        {
        sz--;
        while (*pvp != NULL && (i = strlen(*pvp)) < sz)
        {
-               natomtok = (toktype(**pvp) == ATOM);
+               natomtok = (toktype(**pvp) == ATM);
                if (oatomtok && natomtok)
                        *p++ = SPACESUB;
                (void) strcpy(p, *pvp);
                if (oatomtok && natomtok)
                        *p++ = SPACESUB;
                (void) strcpy(p, *pvp);
index 13912e9..7525ad9 100644 (file)
@@ -5,10 +5,10 @@
 # include <errno.h>
 
 # ifndef QUEUE
 # include <errno.h>
 
 # ifndef QUEUE
-SCCSID(@(#)queue.c     3.40            %G%     (no queueing));
+SCCSID(@(#)queue.c     3.41            %G%     (no queueing));
 # else QUEUE
 
 # else QUEUE
 
-SCCSID(@(#)queue.c     3.40            %G%);
+SCCSID(@(#)queue.c     3.41            %G%);
 
 /*
 **  QUEUEUP -- queue a message up for future transmission.
 
 /*
 **  QUEUEUP -- queue a message up for future transmission.
index d60a051..3a22237 100644 (file)
@@ -2,7 +2,7 @@
 # include "sendmail.h"
 # include <sys/stat.h>
 
 # include "sendmail.h"
 # include <sys/stat.h>
 
-SCCSID(@(#)recipient.c 3.39            %G%);
+SCCSID(@(#)recipient.c 3.40            %G%);
 
 /*
 **  SENDTO -- Designate a send list.
 
 /*
 **  SENDTO -- Designate a send list.
@@ -18,7 +18,6 @@ SCCSID(@(#)recipient.c        3.39            %G%);
 **
 **     Parameters:
 **             list -- the send list.
 **
 **     Parameters:
 **             list -- the send list.
-**             copyf -- the copy flag; passed to parse.
 **             ctladdr -- the address template for the person to
 **                     send to -- effective uid/gid are important.
 **                     This is typically the alias that caused this
 **             ctladdr -- the address template for the person to
 **                     send to -- effective uid/gid are important.
 **                     This is typically the alias that caused this
@@ -39,14 +38,12 @@ SCCSID(@(#)recipient.c      3.39            %G%);
 ADDRESS *
 sendto(list, copyf, ctladdr, qflags)
        char *list;
 ADDRESS *
 sendto(list, copyf, ctladdr, qflags)
        char *list;
-       int copyf;
        ADDRESS *ctladdr;
        ADDRESS **sendq;
        u_short qflags;
 {
        register char *p;
        ADDRESS *ctladdr;
        ADDRESS **sendq;
        u_short qflags;
 {
        register char *p;
-       bool more;              /* set if more addresses to send to */
-       ADDRESS *al;            /* list of addresses to send to */
+       register ADDRESS *al;           /* list of addresses to send to */
        bool firstone;          /* set on first address sent */
        bool selfref;           /* set if this list includes ctladdr */
        ADDRESS *sibl;          /* sibling pointer in tree */
        bool firstone;          /* set on first address sent */
        bool selfref;           /* set if this list includes ctladdr */
        ADDRESS *sibl;          /* sibling pointer in tree */
@@ -60,32 +57,20 @@ sendto(list, copyf, ctladdr, qflags)
        }
 # endif DEBUG
 
        }
 # endif DEBUG
 
-       more = TRUE;
        firstone = TRUE;
        selfref = FALSE;
        al = NULL;
        firstone = TRUE;
        selfref = FALSE;
        al = NULL;
-       for (p = list; more; )
+       for (p = list; *p != '\0'; )
        {
        {
-               register char *q;
-               register char c;
-               ADDRESS *a;
-
-               /* find the end of this address */
-               while (*p == ' ' || *p == '\t')
-                       p++;
-               q = p;
-               while ((c = *p++) != '\0' && c != ',' && c != '\n')
-                       continue;
-               more = c != '\0';
-               *--p = '\0';
-               if (more)
-                       p++;
-               if (*q == '\0')
-                       continue;
+               register ADDRESS *a;
+               extern char *DelimChar;         /* defined in prescan */
 
                /* parse the address */
 
                /* parse the address */
-               if ((a = parse(q, (ADDRESS *) NULL, copyf)) == NULL)
+               while (isspace(*p) || *p == ',')
+                       p++;
+               if ((a = parse(p, (ADDRESS *) NULL, 1)) == NULL)
                        continue;
                        continue;
+               p = DelimChar;
                a->q_next = al;
                a->q_alias = ctladdr;
                if (ctladdr != NULL)
                a->q_next = al;
                a->q_alias = ctladdr;
                if (ctladdr != NULL)
@@ -94,7 +79,7 @@ sendto(list, copyf, ctladdr, qflags)
 
                /* see if this should be marked as a primary address */
                if (ctladdr == NULL ||
 
                /* see if this should be marked as a primary address */
                if (ctladdr == NULL ||
-                   (firstone && !more && bitset(QPRIMARY, ctladdr->q_flags)))
+                   (firstone && *p == '\0' && bitset(QPRIMARY, ctladdr->q_flags)))
                        a->q_flags |= QPRIMARY;
 
                /* put on send queue or suppress self-reference */
                        a->q_flags |= QPRIMARY;
 
                /* put on send queue or suppress self-reference */
index 0d0a141..4205839 100644 (file)
@@ -1,7 +1,7 @@
 # include <pwd.h>
 # include "sendmail.h"
 
 # include <pwd.h>
 # include "sendmail.h"
 
-SCCSID(@(#)savemail.c  3.41            %G%);
+SCCSID(@(#)savemail.c  3.42            %G%);
 
 /*
 **  SAVEMAIL -- Save mail on error
 
 /*
 **  SAVEMAIL -- Save mail on error
@@ -129,7 +129,6 @@ savemail()
        if (MailBack)
        {
                if (CurEnv->e_errorqueue == NULL)
        if (MailBack)
        {
                if (CurEnv->e_errorqueue == NULL)
-                       sendto(CurEnv->e_from.q_paddr, 1, (ADDRESS *) NULL, &CurEnv->e_errorqueue);
                if (returntosender("Unable to deliver mail", CurEnv->e_returnto, TRUE) == 0)
                        return;
        }
                if (returntosender("Unable to deliver mail", CurEnv->e_returnto, TRUE) == 0)
                        return;
        }
@@ -175,7 +174,7 @@ savemail()
                expand("$z/dead.letter", buf, &buf[sizeof buf - 1], CurEnv);
                CurEnv->e_to = buf;
                q = NULL;
                expand("$z/dead.letter", buf, &buf[sizeof buf - 1], CurEnv);
                CurEnv->e_to = buf;
                q = NULL;
-               sendto(buf, -1, (ADDRESS *) NULL, &q);
+               sendto(buf, (ADDRESS *) NULL, &q);
                (void) deliver(q);
        }
 
                (void) deliver(q);
        }
 
index 4f77986..ec43d6a 100644 (file)
@@ -1,10 +1,10 @@
 # include "sendmail.h"
 
 # ifndef SMTP
 # include "sendmail.h"
 
 # ifndef SMTP
-SCCSID(@(#)srvrsmtp.c  3.30            %G%     (no SMTP));
+SCCSID(@(#)srvrsmtp.c  3.31            %G%     (no SMTP));
 # else SMTP
 
 # else SMTP
 
-SCCSID(@(#)srvrsmtp.c  3.30            %G%);
+SCCSID(@(#)srvrsmtp.c  3.31            %G%);
 
 /*
 **  SMTP -- run the SMTP protocol.
 
 /*
 **  SMTP -- run the SMTP protocol.
index 2ef95f3..2056b1a 100644 (file)
@@ -1,5 +1,5 @@
 # ifndef lint
 # ifndef lint
-static char    SccsId[] = "@(#)SendMail version 3.186 of %G%";
+static char    SccsId[] = "@(#)SendMail version 3.187 of %G%";
 # endif lint
 
 # endif lint
 
-char   Version[] = "3.186 [%G%]";
+char   Version[] = "3.187 [%G%]";