restore -ba mode for UK Grey book
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 4 Feb 1994 00:07:53 +0000 (16:07 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 4 Feb 1994 00:07:53 +0000 (16:07 -0800)
SCCS-vsn: usr.sbin/sendmail/src/headers.c 8.24
SCCS-vsn: usr.sbin/sendmail/src/main.c 8.48
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 8.31
SCCS-vsn: usr.sbin/sendmail/src/err.c 8.21

usr/src/usr.sbin/sendmail/src/envelope.c
usr/src/usr.sbin/sendmail/src/err.c
usr/src/usr.sbin/sendmail/src/headers.c
usr/src/usr.sbin/sendmail/src/main.c

index 8acf6e0..77908d9 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)envelope.c 8.30 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 8.31 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -558,7 +558,7 @@ setsender(from, e, delimptr, internal)
        */
 
        if (bitset(EF_QUEUERUN, e->e_flags) || OpMode == MD_SMTP ||
        */
 
        if (bitset(EF_QUEUERUN, e->e_flags) || OpMode == MD_SMTP ||
-           OpMode == MD_DAEMON)
+           OpMode == MD_ARPAFTP || OpMode == MD_DAEMON)
                realname = from;
        if (realname == NULL || realname[0] == '\0')
                realname = username();
                realname = from;
        if (realname == NULL || realname[0] == '\0')
                realname = username();
index c87a2c2..aa045e4 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)err.c      8.20 (Berkeley) %G%";
+static char sccsid[] = "@(#)err.c      8.21 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -259,7 +259,7 @@ putoutmsg(msg, holdmsg)
                msg[0] = '5';
 
        (void) fflush(stdout);
                msg[0] = '5';
 
        (void) fflush(stdout);
-       if (OpMode == MD_SMTP || OpMode == MD_DAEMON)
+       if (OpMode == MD_SMTP || OpMode == MD_DAEMON || OpMode == MD_ARPAFTP)
                fprintf(OutChannel, "%s\r\n", msg);
        else
                fprintf(OutChannel, "%s\n", &msg[4]);
                fprintf(OutChannel, "%s\r\n", msg);
        else
                fprintf(OutChannel, "%s\n", &msg[4]);
index 4bd05cf..95566a4 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)headers.c  8.23 (Berkeley) %G%";
+static char sccsid[] = "@(#)headers.c  8.24 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <errno.h>
 #endif /* not lint */
 
 # include <errno.h>
@@ -455,6 +455,32 @@ eatheader(e, full)
        if (p != NULL)
                define('a', p, e);
 
        if (p != NULL)
                define('a', p, e);
 
+       /*
+       **  From person in antiquated ARPANET mode
+       **      required by UK Grey Book e-mail gateways (sigh)
+       */
+
+       if (OpMode == MD_ARPAFTP)
+       {
+               register struct hdrinfo *hi;
+
+               for (hi = HdrInfo; hi->hi_field != NULL; hi++)
+               {
+                       if (bitset(H_FROM, hi->hi_flags) &&
+                           (!bitset(H_RESENT, hi->hi_flags) ||
+                            bitset(EF_RESENT, e->e_flags)) &&
+                           (p = hvalue(hi->hi_field, e)) != NULL)
+                               break;
+               }
+               if (hi->hi_field != NULL)
+               {
+                       if (tTd(32, 2))
+                               printf("eatheader: setsender(*%s == %s)\n",
+                                       hi->hi_field, p);
+                       setsender(p, e, NULL, TRUE);
+               }
+       }
+
        /*
        **  Log collection information.
        */
        /*
        **  Log collection information.
        */
index 65e6317..1c0e9b8 100644 (file)
@@ -13,7 +13,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     8.47 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     8.48 (Berkeley) %G%";
 #endif /* not lint */
 
 #define        _DEFINE
 #endif /* not lint */
 
 #define        _DEFINE
@@ -419,6 +419,9 @@ main(argc, argv, envp)
                          case MD_TEST:
                          case MD_INITALIAS:
                          case MD_PRINT:
                          case MD_TEST:
                          case MD_INITALIAS:
                          case MD_PRINT:
+#ifdef MAYBE_NEXT_RELEASE
+                         case MD_ARPAFTP:
+#endif
                                OpMode = j;
                                break;
 
                                OpMode = j;
                                break;