don't pass through NOTIFY= unless it was given in the SMTP RCPT
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 25 Mar 1995 23:39:37 +0000 (15:39 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 25 Mar 1995 23:39:37 +0000 (15:39 -0800)
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 8.40
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 8.74
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 8.60
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 8.106
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.61

usr/src/usr.sbin/sendmail/src/parseaddr.c
usr/src/usr.sbin/sendmail/src/recipient.c
usr/src/usr.sbin/sendmail/src/sendmail.h
usr/src/usr.sbin/sendmail/src/srvrsmtp.c
usr/src/usr.sbin/sendmail/src/usersmtp.c

index 672fcf7..0315056 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)parseaddr.c        8.59 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c        8.60 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -1982,6 +1982,7 @@ struct qflags     AddressFlags[] =
        "QPINGONSUCCESS",       QPINGONSUCCESS,
        "QPINGONFAILURE",       QPINGONFAILURE,
        "QPINGONDELAY",         QPINGONDELAY,
        "QPINGONSUCCESS",       QPINGONSUCCESS,
        "QPINGONFAILURE",       QPINGONFAILURE,
        "QPINGONDELAY",         QPINGONDELAY,
+       "QHASNOTIFY",           QHASNOTIFY,
        "QRELAYED",             QRELAYED,
        NULL
 };
        "QRELAYED",             QRELAYED,
        NULL
 };
index 9cb3bff..dc74e8a 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)recipient.c        8.73 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c        8.74 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -48,7 +48,7 @@ static char sccsid[] = "@(#)recipient.c       8.73 (Berkeley) %G%";
 #define MAXRCRSN       10      /* maximum levels of alias recursion */
 
 /* q_flags bits inherited from ctladdr */
 #define MAXRCRSN       10      /* maximum levels of alias recursion */
 
 /* q_flags bits inherited from ctladdr */
-#define QINHERITEDBITS (QPINGONSUCCESS|QPINGONFAILURE|QPINGONDELAY)
+#define QINHERITEDBITS (QPINGONSUCCESS|QPINGONFAILURE|QPINGONDELAY|QHASNOTIFY)
 
 int
 ADDRESS *
 
 int
 ADDRESS *
index c1669cb..b911e54 100644 (file)
@@ -5,7 +5,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)sendmail.h  8.105 (Berkeley) %G%
+ *     @(#)sendmail.h  8.106 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -15,7 +15,7 @@
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
-static char SmailSccsId[] =    "@(#)sendmail.h 8.105           %G%";
+static char SmailSccsId[] =    "@(#)sendmail.h 8.106           %G%";
 # endif
 # else /*  _DEFINE */
 # define EXTERN extern
 # endif
 # else /*  _DEFINE */
 # define EXTERN extern
@@ -144,6 +144,7 @@ typedef struct address ADDRESS;
 # define QPINGONSUCCESS        0x00001000      /* give return on successful delivery */
 # define QPINGONFAILURE        0x00002000      /* give return on failure */
 # define QPINGONDELAY  0x00004000      /* give return on message delay */
 # 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      0x00020000      /* relayed to non-DSN aware mailer */
 
 # define NULLADDR      ((ADDRESS *) NULL)
 # define QRELAYED      0x00020000      /* relayed to non-DSN aware mailer */
 
 # define NULLADDR      ((ADDRESS *) NULL)
index aa96d68..8e9eedb 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 8.60 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.61 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)srvrsmtp.c 8.60 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.61 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -888,6 +888,7 @@ rcpt_esmtp_args(a, kp, vp, e)
                        /* NOTREACHED */
                }
                a->q_flags &= ~(QPINGONSUCCESS|QPINGONFAILURE|QPINGONDELAY);
                        /* NOTREACHED */
                }
                a->q_flags &= ~(QPINGONSUCCESS|QPINGONFAILURE|QPINGONDELAY);
+               a->q_flags |= QHASNOTIFY;
                if (strcasecmp(vp, "never") == 0)
                        return;
                for (p = vp; p != NULL; vp = p)
                if (strcasecmp(vp, "never") == 0)
                        return;
                for (p = vp; p != NULL; vp = p)
index 0d10946..4086589 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)usersmtp.c 8.39 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.40 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)usersmtp.c 8.39 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.40 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -494,31 +494,34 @@ smtprcpt(to, m, mci, e)
        strcpy(optbuf, "");
        if (bitset(MCIF_DSN, mci->mci_flags))
        {
        strcpy(optbuf, "");
        if (bitset(MCIF_DSN, mci->mci_flags))
        {
-               bool firstone = TRUE;
-
                /* NOTIFY= parameter */
                /* NOTIFY= parameter */
-               strcat(optbuf, " NOTIFY=");
-               if (bitset(QPINGONSUCCESS, to->q_flags))
-               {
-                       strcat(optbuf, "SUCCESS");
-                       firstone = FALSE;
-               }
-               if (bitset(QPINGONFAILURE, to->q_flags))
+               if (bitset(QHASNOTIFY, to->q_flags))
                {
                {
-                       if (!firstone)
-                               strcat(optbuf, ",");
-                       strcat(optbuf, "FAILURE");
-                       firstone = FALSE;
-               }
-               if (bitset(QPINGONDELAY, to->q_flags))
-               {
-                       if (!firstone)
-                               strcat(optbuf, ",");
-                       strcat(optbuf, "DELAY");
-                       firstone = FALSE;
+                       bool firstone = TRUE;
+
+                       strcat(optbuf, " NOTIFY=");
+                       if (bitset(QPINGONSUCCESS, to->q_flags))
+                       {
+                               strcat(optbuf, "SUCCESS");
+                               firstone = FALSE;
+                       }
+                       if (bitset(QPINGONFAILURE, to->q_flags))
+                       {
+                               if (!firstone)
+                                       strcat(optbuf, ",");
+                               strcat(optbuf, "FAILURE");
+                               firstone = FALSE;
+                       }
+                       if (bitset(QPINGONDELAY, to->q_flags))
+                       {
+                               if (!firstone)
+                                       strcat(optbuf, ",");
+                               strcat(optbuf, "DELAY");
+                               firstone = FALSE;
+                       }
+                       if (firstone)
+                               strcat(optbuf, "NEVER");
                }
                }
-               if (firstone)
-                       strcat(optbuf, "NEVER");
 
                /* ORCPT= parameter */
                if (to->q_orcpt != NULL)
 
                /* ORCPT= parameter */
                if (to->q_orcpt != NULL)