pass sending hostname correctly back via the $s macro (broken sometime
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 4 Feb 1987 12:44:04 +0000 (04:44 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Wed, 4 Feb 1987 12:44:04 +0000 (04:44 -0800)
earlier); hack around some name server changes

SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 5.19
SCCS-vsn: usr.sbin/sendmail/src/domain.c 5.5
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.58

usr/src/usr.sbin/sendmail/src/domain.c
usr/src/usr.sbin/sendmail/src/srvrsmtp.c
usr/src/usr.sbin/sendmail/src/version.c

index e868559..1eee7e1 100644 (file)
 
 #ifndef MXDOMAIN
 #ifndef lint
 
 #ifndef MXDOMAIN
 #ifndef lint
-static char    SccsId[] = "@(#)domain.c        5.4 (Berkeley) %G% (no MXDOMAIN)";
+static char    SccsId[] = "@(#)domain.c        5.5 (Berkeley) %G% (no MXDOMAIN)";
 #endif not lint
 #else MXDOMAIN
 
 #ifndef lint
 #endif not lint
 #else MXDOMAIN
 
 #ifndef lint
-static char    SccsId[] = "@(#)domain.c        5.4 (Berkeley) %G%";
+static char    SccsId[] = "@(#)domain.c        5.5 (Berkeley) %G%";
 #endif not lint
 
 # include <sys/param.h>
 #endif not lint
 
 # include <sys/param.h>
@@ -30,9 +30,10 @@ typedef union {
        char qb2[PACKETSZ];
 } querybuf;
 
        char qb2[PACKETSZ];
 } querybuf;
 
-static char hostbuf[BUFSIZ];
+static char    hostbuf[BUFSIZ];
+int            h_errno;
 
 
-int h_errno;
+# define getshort      _getshort       /* XXX hack attack! */
 
 getmxrr(host, mxhosts, maxmx, localhost)
        char *host, **mxhosts;
 
 getmxrr(host, mxhosts, maxmx, localhost)
        char *host, **mxhosts;
index 7f56f2d..f2148e4 100644 (file)
 
 # ifndef SMTP
 # ifndef lint
 
 # ifndef SMTP
 # ifndef lint
-static char    SccsId[] = "@(#)srvrsmtp.c      5.18 (Berkeley) %G%     (no SMTP)";
+static char    SccsId[] = "@(#)srvrsmtp.c      5.19 (Berkeley) %G%     (no SMTP)";
 # endif not lint
 # else SMTP
 
 # ifndef lint
 # endif not lint
 # else SMTP
 
 # ifndef lint
-static char    SccsId[] = "@(#)srvrsmtp.c      5.18 (Berkeley) %G%";
+static char    SccsId[] = "@(#)srvrsmtp.c      5.19 (Berkeley) %G%";
 # endif not lint
 
 /*
 # endif not lint
 
 /*
@@ -130,6 +130,7 @@ smtp()
        expand("\001e", inp, &inp[sizeof inp], CurEnv);
        message("220", inp);
        SmtpPhase = "startup";
        expand("\001e", inp, &inp[sizeof inp], CurEnv);
        message("220", inp);
        SmtpPhase = "startup";
+       sendinghost = NULL;
        for (;;)
        {
                /* arrange for backout */
        for (;;)
        {
                /* arrange for backout */
@@ -199,10 +200,10 @@ smtp()
                                char hostbuf[MAXNAME];
 
                                (void) sprintf(hostbuf, "%s (%s)", p, RealHostName);
                                char hostbuf[MAXNAME];
 
                                (void) sprintf(hostbuf, "%s (%s)", p, RealHostName);
-                               define('s', newstr(hostbuf), CurEnv);
+                               sendinghost = newstr(hostbuf);
                        }
                        else
                        }
                        else
-                               define('s', newstr(p), CurEnv);
+                               sendinghost = newstr(p);
                        message("250", "%s Hello %s, pleased to meet you", HostName, p);
                        break;
 
                        message("250", "%s Hello %s, pleased to meet you", HostName, p);
                        break;
 
@@ -211,7 +212,7 @@ smtp()
 
                        /* force a sending host even if no HELO given */
                        if (RealHostName != NULL && macvalue('s', CurEnv) == NULL)
 
                        /* force a sending host even if no HELO given */
                        if (RealHostName != NULL && macvalue('s', CurEnv) == NULL)
-                               define('s', RealHostName, CurEnv);
+                               sendinghost = RealHostName;
 
                        /* check for validity of this command */
                        if (hasmail)
 
                        /* check for validity of this command */
                        if (hasmail)
@@ -228,6 +229,7 @@ smtp()
                        /* fork a subprocess to process this command */
                        if (runinchild("SMTP-MAIL") > 0)
                                break;
                        /* fork a subprocess to process this command */
                        if (runinchild("SMTP-MAIL") > 0)
                                break;
+                       define('s', sendinghost, CurEnv);
                        initsys();
                        setproctitle("%s %s: %s", CurEnv->e_id,
                                CurHostName, inp);
                        initsys();
                        setproctitle("%s %s: %s", CurEnv->e_id,
                                CurHostName, inp);
index 425641e..869fffd 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)version.c       5.57.1.1 (Berkeley) %G%";
+static char    SccsId[] = "@(#)version.c       5.58 (Berkeley) %G%";
 #endif not lint
 
 #endif not lint
 
-char   Version[] = "5.57.1.1";
+char   Version[] = "5.58";