updates for new DSN drafts
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 24 Apr 1995 05:03:19 +0000 (21:03 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 24 Apr 1995 05:03:19 +0000 (21:03 -0800)
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 8.48
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 8.82
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 8.64
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 8.67
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 8.127
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 8.68
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 8.147
SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.154
SCCS-vsn: usr.sbin/sendmail/src/alias.c 8.45
SCCS-vsn: usr.sbin/sendmail/src/udb.c 8.20

usr/src/usr.sbin/sendmail/src/alias.c
usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/deliver.c
usr/src/usr.sbin/sendmail/src/envelope.c
usr/src/usr.sbin/sendmail/src/parseaddr.c
usr/src/usr.sbin/sendmail/src/recipient.c
usr/src/usr.sbin/sendmail/src/savemail.c
usr/src/usr.sbin/sendmail/src/sendmail.h
usr/src/usr.sbin/sendmail/src/udb.c
usr/src/usr.sbin/sendmail/src/usersmtp.c

index 8fbf4c2..85e732b 100644 (file)
@@ -9,7 +9,7 @@
 # include "sendmail.h"
 
 #ifndef lint
 # include "sendmail.h"
 
 #ifndef lint
-static char sccsid[] = "@(#)alias.c    8.44 (Berkeley) %G%";
+static char sccsid[] = "@(#)alias.c    8.45 (Berkeley) %G%";
 #endif /* not lint */
 
 
 #endif /* not lint */
 
 
@@ -143,7 +143,7 @@ alias(a, sendq, aliaslevel, e)
                fprintf(e->e_xfp, "Message delivered to mailing list %s\n",
                        a->q_paddr);
        e->e_flags |= EF_SENDRECEIPT;
                fprintf(e->e_xfp, "Message delivered to mailing list %s\n",
                        a->q_paddr);
        e->e_flags |= EF_SENDRECEIPT;
-       a->q_flags |= QREPORT|QEXPLODED;
+       a->q_flags |= QDELIVERED|QEXPANDED;
 }
 \f/*
 **  ALIASLOOKUP -- look up a name in the alias file.
 }
 \f/*
 **  ALIASLOOKUP -- look up a name in the alias file.
index 0d3917d..0b6e04b 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     8.153 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     8.154 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -257,10 +257,10 @@ setupmailers()
        char buf[100];
        extern void makemailer();
 
        char buf[100];
        extern void makemailer();
 
-       strcpy(buf, "prog, P=/bin/sh, F=lsoD, A=sh -c $u");
+       strcpy(buf, "prog, P=/bin/sh, F=lsoD, T=X-Unix, A=sh -c $u");
        makemailer(buf);
 
        makemailer(buf);
 
-       strcpy(buf, "*file*, P=/dev/null, F=lsDFMPEou, A=FILE");
+       strcpy(buf, "*file*, P=/dev/null, F=lsDFMPEou, T=X-Unix, A=FILE");
        makemailer(buf);
 
        strcpy(buf, "*include*, P=/dev/null, F=su, A=INCLUDE");
        makemailer(buf);
 
        strcpy(buf, "*include*, P=/dev/null, F=su, A=INCLUDE");
index 7883361..b0148cf 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)deliver.c  8.146 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c  8.147 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -923,7 +923,7 @@ deliver(e, firstto)
                                    (e->e_receiptto != NULL ||
                                     bitset(QPINGONSUCCESS, to->q_flags)))
                                {
                                    (e->e_receiptto != NULL ||
                                     bitset(QPINGONSUCCESS, to->q_flags)))
                                {
-                                       to->q_flags |= QREPORT;
+                                       to->q_flags |= QDELIVERED;
                                        to->q_status = "2.1.5";
                                        fprintf(e->e_xfp, "%s... Successfully delivered\n",
                                                to->q_paddr);
                                        to->q_status = "2.1.5";
                                        fprintf(e->e_xfp, "%s... Successfully delivered\n",
                                                to->q_paddr);
@@ -1614,7 +1614,7 @@ tryhost:
                            (e->e_receiptto != NULL ||
                             bitset(QPINGONSUCCESS, to->q_flags)))
                        {
                            (e->e_receiptto != NULL ||
                             bitset(QPINGONSUCCESS, to->q_flags)))
                        {
-                               to->q_flags |= QREPORT;
+                               to->q_flags |= QDELIVERED;
                                to->q_status = "2.1.5";
                                fprintf(e->e_xfp, "%s... Successfully delivered\n",
                                        to->q_paddr);
                                to->q_status = "2.1.5";
                                fprintf(e->e_xfp, "%s... Successfully delivered\n",
                                        to->q_paddr);
@@ -2850,55 +2850,3 @@ hostsignature(m, host, e)
                printf("hostsignature(%s) = %s\n", host, s->s_hostsig);
        return s->s_hostsig;
 }
                printf("hostsignature(%s) = %s\n", host, s->s_hostsig);
        return s->s_hostsig;
 }
-\f/*
-**  SETSTATUS -- set the address status for return messages
-**
-**     Parameters:
-**             a -- the address to set.
-**             msg -- the text of the message, which must be in standard
-**                     SMTP form (3 digits, a space, and a message).
-**
-**     Returns:
-**             none.
-*/
-
-setstatus(a, msg)
-       register ADDRESS *a;
-       char *msg;
-{
-       char buf[MAXLINE];
-
-       if (a->q_rstatus != NULL)
-               free(a->q_rstatus);
-       if (strlen(msg) > (SIZE_T) 4)
-       {
-               register char *p, *q;
-               int parenlev = 0;
-
-               strncpy(buf, msg, 4);
-               p = &buf[4];
-               *p++ = '(';
-               for (q = &msg[4]; *q != '\0'; q++)
-               {
-                       switch (*q)
-                       {
-                         case '(':
-                               parenlev++;
-                               break;
-
-                         case ')':
-                               if (parenlev > 0)
-                                       parenlev--;
-                               else
-                                       *p++ = '\\';
-                               break;
-                       }
-                       *p++ = *q;
-               }
-               while (parenlev-- >= 0)
-                       *p++ = ')';
-               *p++ = '\0';
-               msg = buf;
-       }
-       a->q_rstatus = newstr(msg);
-}
index e5b955a..e474e67 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)envelope.c 8.63 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 8.64 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -132,7 +132,7 @@ dropenvelope(e)
                else if (bitset(QPINGONSUCCESS, q->q_flags) &&
                         ((bitset(QSENT, q->q_flags) &&
                           bitnset(M_LOCALMAILER, q->q_mailer->m_flags)) ||
                else if (bitset(QPINGONSUCCESS, q->q_flags) &&
                         ((bitset(QSENT, q->q_flags) &&
                           bitnset(M_LOCALMAILER, q->q_mailer->m_flags)) ||
-                         bitset(QRELAYED|QEXPLODED, q->q_flags)))
+                         bitset(QRELAYED|QEXPANDED|QDELIVERED, q->q_flags)))
                {
                        success_return = TRUE;
                }
                {
                        success_return = TRUE;
                }
@@ -179,7 +179,7 @@ dropenvelope(e)
                        if (bitset(QQUEUEUP, q->q_flags) &&
                            bitset(QPINGONDELAY, q->q_flags))
                        {
                        if (bitset(QQUEUEUP, q->q_flags) &&
                            bitset(QPINGONDELAY, q->q_flags))
                        {
-                               q->q_flags |= QREPORT;
+                               q->q_flags |= QDELAYED;
                                delay_return = TRUE;
                        }
                }
                                delay_return = TRUE;
                        }
                }
index f8943db..0c3e5da 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)parseaddr.c        8.66 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c        8.67 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -2044,7 +2044,6 @@ struct qflags     AddressFlags[] =
        "QNOTREMOTE",           QNOTREMOTE,
        "QSELFREF",             QSELFREF,
        "QVERIFIED",            QVERIFIED,
        "QNOTREMOTE",           QNOTREMOTE,
        "QSELFREF",             QSELFREF,
        "QVERIFIED",            QVERIFIED,
-       "QREPORT",              QREPORT,
        "QBOGUSSHELL",          QBOGUSSHELL,
        "QUNSAFEADDR",          QUNSAFEADDR,
        "QPINGONSUCCESS",       QPINGONSUCCESS,
        "QBOGUSSHELL",          QBOGUSSHELL,
        "QUNSAFEADDR",          QUNSAFEADDR,
        "QPINGONSUCCESS",       QPINGONSUCCESS,
@@ -2052,7 +2051,9 @@ struct qflags     AddressFlags[] =
        "QPINGONDELAY",         QPINGONDELAY,
        "QHASNOTIFY",           QHASNOTIFY,
        "QRELAYED",             QRELAYED,
        "QPINGONDELAY",         QPINGONDELAY,
        "QHASNOTIFY",           QHASNOTIFY,
        "QRELAYED",             QRELAYED,
-       "QEXPLODED",            QEXPLODED,
+       "QEXPANDED",            QEXPANDED,
+       "QDELIVERED",           QDELIVERED,
+       "QDELAYED",             QDELAYED,
        "QTHISPASS",            QTHISPASS,
        NULL
 };
        "QTHISPASS",            QTHISPASS,
        NULL
 };
index 3b3d249..cce65ee 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)recipient.c        8.81 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c        8.82 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -594,12 +594,22 @@ recipient(a, sendq, aliaslevel, e)
                        q->q_flags &= ~QTHISPASS;
                }
                if (nrcpts == 1)
                        q->q_flags &= ~QTHISPASS;
                }
                if (nrcpts == 1)
-                       only->q_flags |= QPRIMARY;
-               else if (!initialdontsend)
+               {
+                       /* check to see if this actually got a new owner */
+                       q = only;
+                       while ((q = q->q_alias) != NULL)
+                       {
+                               if (q->q_owner != NULL)
+                                       break;
+                       }
+                       if (q == NULL)
+                               only->q_flags |= QPRIMARY;
+               }
+               else if (!initialdontsend && nrcpts > 0)
                {
                        /* arrange for return receipt */
                        e->e_flags |= EF_SENDRECEIPT;
                {
                        /* arrange for return receipt */
                        e->e_flags |= EF_SENDRECEIPT;
-                       a->q_flags |= QEXPLODED;
+                       a->q_flags |= QEXPANDED;
                        if (e->e_xfp != NULL)
                                fprintf(e->e_xfp,
                                        "%s... expanded to multiple addresses\n",
                        if (e->e_xfp != NULL)
                                fprintf(e->e_xfp,
                                        "%s... expanded to multiple addresses\n",
index 45d5c3d..8df925c 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)savemail.c 8.67 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 8.68 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -669,35 +669,45 @@ errbody(mci, e, separator)
        printheader = TRUE;
        for (q = e->e_parent->e_sendqueue; q != NULL; q = q->q_next)
        {
        printheader = TRUE;
        for (q = e->e_parent->e_sendqueue; q != NULL; q = q->q_next)
        {
-               if (bitset(QBADADDR|QREPORT|QRELAYED|QEXPLODED, q->q_flags))
+               if (bitset(QBADADDR, q->q_flags))
                {
                {
-                       strcpy(buf, q->q_paddr);
-                       if (bitset(QBADADDR, q->q_flags))
-                               strcat(buf, "  (unrecoverable error)");
-                       else if (!bitset(QPRIMARY, q->q_flags))
+                       if (!bitset(QPINGONFAILURE, q->q_flags))
                                continue;
                                continue;
-                       else if (bitset(QRELAYED, q->q_flags))
-                               strcat(buf, "  (relayed to non-DSN-aware mailer)");
-                       else if (bitset(QSENT, q->q_flags))
-                               strcat(buf, "  (successfully delivered)");
-                       else if (bitset(QEXPLODED, q->q_flags))
-                               strcat(buf, "  (expanded by mailing list)");
+                       p = "unrecoverable error";
+               }
+               else if (!bitset(QPRIMARY, q->q_flags))
+                       continue;
+               else if (bitset(QRELAYED, q->q_flags))
+                       p = "relayed to non-DSN-aware mailer";
+               else if (bitset(QDELIVERED, q->q_flags))
+               {
+                       if (bitset(QEXPANDED, q->q_flags))
+                               p = "successfully delivered to mailing list";
                        else
                        else
-                               strcat(buf, "  (transient failure)");
-                       if (printheader)
-                       {
-                               putline("   ----- The following addresses have delivery notifications -----",
-                                       mci);
-                               printheader = FALSE;
-                       }
+                               p = "successfully delivered to mailbox";
+               }
+               else if (bitset(QEXPANDED, q->q_flags))
+                       p = "expanded by alias";
+               else if (bitset(QDELAYED, q->q_flags))
+                       p = "transient failure";
+               else
+                       continue;
+
+               if (printheader)
+               {
+                       putline("   ----- The following addresses have delivery notifications -----",
+                               mci);
+                       printheader = FALSE;
+               }
+
+               sprintf(buf, "%s  (%s)", q->q_paddr, p);
+               putline(buf, mci);
+               if (q->q_alias != NULL)
+               {
+                       strcpy(buf, "    (expanded from: ");
+                       strcat(buf, q->q_alias->q_paddr);
+                       strcat(buf, ")");
                        putline(buf, mci);
                        putline(buf, mci);
-                       if (q->q_alias != NULL)
-                       {
-                               strcpy(buf, "    (expanded from: ");
-                               strcat(buf, q->q_alias->q_paddr);
-                               strcat(buf, ")");
-                               putline(buf, mci);
-                       }
                }
        }
        if (!printheader)
                }
        }
        if (!printheader)
@@ -716,11 +726,16 @@ errbody(mci, e, separator)
        }
        else
        {
        }
        else
        {
-               putline("   ----- Transcript of session follows -----\n", mci);
+               printheader = TRUE;
                if (e->e_xfp != NULL)
                        (void) fflush(e->e_xfp);
                while (fgets(buf, sizeof buf, xfile) != NULL)
                if (e->e_xfp != NULL)
                        (void) fflush(e->e_xfp);
                while (fgets(buf, sizeof buf, xfile) != NULL)
+               {
+                       if (printheader)
+                               putline("   ----- Transcript of session follows -----\n", mci);
+                       printheader = FALSE;
                        putline(buf, mci);
                        putline(buf, mci);
+               }
                (void) xfclose(xfile, "errbody xscript", p);
        }
        errno = 0;
                (void) xfclose(xfile, "errbody xscript", p);
        }
        errno = 0;
@@ -735,7 +750,7 @@ errbody(mci, e, separator)
                putline("", mci);
                (void) sprintf(buf, "--%s", e->e_msgboundary);
                putline(buf, mci);
                putline("", mci);
                (void) sprintf(buf, "--%s", e->e_msgboundary);
                putline(buf, mci);
-               putline("Content-Type: message/X-delivery-status-04 (Draft of 20 January 1995)", mci);
+               putline("Content-Type: message/X-delivery-status-04a (Draft of 04 April 1995)", mci);
                putline("", mci);
 
                /*
                putline("", mci);
 
                /*
@@ -751,13 +766,12 @@ errbody(mci, e, separator)
                }
 
                /* Reporting-MTA: is us (required) */
                }
 
                /* Reporting-MTA: is us (required) */
-               p = e->e_parent->e_from.q_mailer->m_mtatype;
-               if (p == NULL)
-                       p = "dns";
-               (void) sprintf(buf, "Reporting-MTA: %s; %s", p,
+               (void) sprintf(buf, "Reporting-MTA: dns; %s",
                        xtextify(MyHostName));
                putline(buf, mci);
 
                        xtextify(MyHostName));
                putline(buf, mci);
 
+               /* DSN-Gateway: not relevant since we are not translating */
+
                /* Received-From-MTA: shows where we got this message from */
                if (RealHostName != NULL)
                {
                /* Received-From-MTA: shows where we got this message from */
                if (RealHostName != NULL)
                {
@@ -785,17 +799,21 @@ errbody(mci, e, separator)
                        char *action;
 
                        if (bitset(QBADADDR, q->q_flags))
                        char *action;
 
                        if (bitset(QBADADDR, q->q_flags))
-                               action = "failure";
+                               action = "failed";
                        else if (!bitset(QPRIMARY, q->q_flags))
                                continue;
                        else if (!bitset(QPRIMARY, q->q_flags))
                                continue;
+                       else if (bitset(QDELIVERED, q->q_flags))
+                       {
+                               if (bitset(QEXPANDED, q->q_flags))
+                                       action = "delivered (to mailing list)";
+                               else
+                                       action = "delivered (to mailbox)";
+                       }
                        else if (bitset(QRELAYED, q->q_flags))
                        else if (bitset(QRELAYED, q->q_flags))
-                               action = "relayed";
-                       else if (bitset(QEXPLODED, q->q_flags))
-                               action = "delivered (to mailing list)";
-                       else if (bitset(QSENT, q->q_flags) &&
-                                bitnset(M_LOCALMAILER, q->q_mailer->m_flags))
-                               action = "delivered (final delivery)";
-                       else if (bitset(QREPORT, q->q_flags))
+                               action = "relayed (to non-DSN-aware mailer)";
+                       else if (bitset(QEXPANDED, q->q_flags))
+                               action = "expanded (to multi-recipient alias)";
+                       else if (bitset(QDELAYED, q->q_flags))
                                action = "delayed";
                        else
                                continue;
                                action = "delayed";
                        else
                                continue;
@@ -889,7 +907,7 @@ errbody(mci, e, separator)
                                if (p == NULL)
                                        p = "smtp";
                                (void) sprintf(buf, "Diagnostic-Code: %s; %s",
                                if (p == NULL)
                                        p = "smtp";
                                (void) sprintf(buf, "Diagnostic-Code: %s; %s",
-                                       p, q->q_rstatus);
+                                       p, xtextify(q->q_rstatus));
                                putline(buf, mci);
                        }
 
                                putline(buf, mci);
                        }
 
@@ -900,14 +918,14 @@ errbody(mci, e, separator)
                                arpadate(ctime(&q->q_statdate)));
                        putline(buf, mci);
 
                                arpadate(ctime(&q->q_statdate)));
                        putline(buf, mci);
 
-                       /* Expiry-Date: -- for delayed messages only */
+                       /* Will-Retry-Until: -- for delayed messages only */
                        if (bitset(QQUEUEUP, q->q_flags) &&
                            !bitset(QBADADDR, q->q_flags))
                        {
                                time_t xdate;
 
                                xdate = e->e_ctime + TimeOuts.to_q_return[e->e_timeoutclass];
                        if (bitset(QQUEUEUP, q->q_flags) &&
                            !bitset(QBADADDR, q->q_flags))
                        {
                                time_t xdate;
 
                                xdate = e->e_ctime + TimeOuts.to_q_return[e->e_timeoutclass];
-                               sprintf(buf, "Expiry-Date: %s",
+                               sprintf(buf, "Will-Retry-Until: %s",
                                        arpadate(ctime(&xdate)));
                                putline(buf, mci);
                        }
                                        arpadate(ctime(&xdate)));
                                putline(buf, mci);
                        }
@@ -1064,8 +1082,7 @@ xtextify(t)
                register int c = (*p & 0xff);
 
                /* ASCII dependence here -- this is the way the spec words it */
                register int c = (*p & 0xff);
 
                /* ASCII dependence here -- this is the way the spec words it */
-               if ((c < ' ' || c > '~' || c == '+' || c == '\\' || c == '(') &&
-                   c != '\t')
+               if (c < '!' || c > '~' || c == '+' || c == '\\' || c == '(')
                        nbogus++;
                l++;
        }
                        nbogus++;
                l++;
        }
index 5248312..0a6379e 100644 (file)
@@ -5,7 +5,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)sendmail.h  8.126 (Berkeley) %G%
+ *     @(#)sendmail.h  8.127 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -15,7 +15,7 @@
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
-static char SmailSccsId[] =    "@(#)sendmail.h 8.126           %G%";
+static char SmailSccsId[] =    "@(#)sendmail.h 8.127           %G%";
 # endif
 # else /*  _DEFINE */
 # define EXTERN extern
 # endif
 # else /*  _DEFINE */
 # define EXTERN extern
@@ -138,15 +138,16 @@ typedef struct address ADDRESS;
 # define QNOTREMOTE    0x00000040      /* address not for remote forwarding */
 # define QSELFREF      0x00000080      /* this address references itself */
 # define QVERIFIED     0x00000100      /* verified, but not expanded */
 # define QNOTREMOTE    0x00000040      /* address not for remote forwarding */
 # define QSELFREF      0x00000080      /* this address references itself */
 # define QVERIFIED     0x00000100      /* verified, but not expanded */
-# define QREPORT       0x00000200      /* report this addr in return message */
 # define QBOGUSSHELL   0x00000400      /* user has no valid shell listed */
 # define QUNSAFEADDR   0x00000800      /* address aquired via unsafe path */
 # define QPINGONSUCCESS        0x00001000      /* give return on successful delivery */
 # define QPINGONFAILURE        0x00002000      /* give return on failure */
 # define QPINGONDELAY  0x00004000      /* give return on message delay */
 # define QHASNOTIFY    0x00008000      /* propogate notify parameter */
 # define QBOGUSSHELL   0x00000400      /* user has no valid shell listed */
 # define QUNSAFEADDR   0x00000800      /* address aquired via unsafe path */
 # define QPINGONSUCCESS        0x00001000      /* give return on successful delivery */
 # define QPINGONFAILURE        0x00002000      /* give return on failure */
 # define QPINGONDELAY  0x00004000      /* give return on message delay */
 # define QHASNOTIFY    0x00008000      /* propogate notify parameter */
-# define QRELAYED      0x00010000      /* relayed to non-DSN aware mailer */
-# define QEXPLODED     0x00020000      /* undergone mailing list explosion */
+# define QRELAYED      0x00010000      /* DSN: relayed to non-DSN aware sys */
+# define QEXPANDED     0x00020000      /* DSN: undergone list expansion */
+# define QDELIVERED    0x00040000      /* DSN: successful final delivery */
+# define QDELAYED      0x00080000      /* DSN: message delayed */
 # define QTHISPASS     0x80000000      /* temp: address set this pass */
 
 # define NULLADDR      ((ADDRESS *) NULL)
 # define QTHISPASS     0x80000000      /* temp: address set this pass */
 
 # define NULLADDR      ((ADDRESS *) NULL)
index fed5a46..374b0fc 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef USERDB
 
 #ifndef lint
 #ifdef USERDB
-static char sccsid [] = "@(#)udb.c     8.19 (Berkeley) %G% (with USERDB)";
+static char sccsid [] = "@(#)udb.c     8.20 (Berkeley) %G% (with USERDB)";
 #else
 #else
-static char sccsid [] = "@(#)udb.c     8.19 (Berkeley) %G% (without USERDB)";
+static char sccsid [] = "@(#)udb.c     8.20 (Berkeley) %G% (without USERDB)";
 #endif
 #endif
 
 #endif
 #endif
 
@@ -276,7 +276,7 @@ udbexpand(a, sendq, aliaslevel, e)
                                        a->q_paddr);
                        }
                        e->e_flags |= EF_SENDRECEIPT;
                                        a->q_paddr);
                        }
                        e->e_flags |= EF_SENDRECEIPT;
-                       a->q_flags |= QREPORT|QEXPLODED;
+                       a->q_flags |= QDELIVERED|QEXPANDED;
                        break;
 #endif
 
                        break;
 #endif
 
index 94b3374..abbd3a5 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)usersmtp.c 8.47 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.48 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)usersmtp.c 8.47 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.48 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -550,7 +550,7 @@ smtprcpt(to, m, mci, e)
        SmtpPhase = mci->mci_phase = "client RCPT";
        setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
        r = reply(m, mci, e, TimeOuts.to_rcpt, NULL);
        SmtpPhase = mci->mci_phase = "client RCPT";
        setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
        r = reply(m, mci, e, TimeOuts.to_rcpt, NULL);
-       setstatus(to, SmtpReplyBuffer);
+       to->q_rstatus = newstr(SmtpReplyBuffer);
        to->q_status = smtptodsn(r);
        if (r < 0 || REPLYTYPE(r) == 4)
                return EX_TEMPFAIL;
        to->q_status = smtptodsn(r);
        if (r < 0 || REPLYTYPE(r) == 4)
                return EX_TEMPFAIL;