truncate first space of second and subsequent 220 greeting messages
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 29 Apr 1995 22:41:30 +0000 (14:41 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 29 Apr 1995 22:41:30 +0000 (14:41 -0800)
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.71

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

index 18b3002..128ba33 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 8.70 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.71 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)srvrsmtp.c 8.70 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.71 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -140,10 +140,16 @@ smtp(e)
        while ((id = p) != NULL && (p = strchr(id, '\n')) != NULL)
        {
                *p++ = '\0';
        while ((id = p) != NULL && (p = strchr(id, '\n')) != NULL)
        {
                *p++ = '\0';
+               if (isascii(*id) && isspace(*id))
+                       id++;
                message("220-%s", id);
        }
        if (id != NULL)
                message("220-%s", id);
        }
        if (id != NULL)
+       {
+               if (isascii(*id) && isspace(*id))
+                       id++;
                message("220 %s", id);
                message("220 %s", id);
+       }
 
        protocol = NULL;
        sendinghost = macvalue('s', e);
 
        protocol = NULL;
        sendinghost = macvalue('s', e);