have HELP report the version number
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 9 Apr 1995 07:18:01 +0000 (23:18 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 9 Apr 1995 07:18:01 +0000 (23:18 -0800)
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.65

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

index 1dca2ef..282385c 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 8.64 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.65 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)srvrsmtp.c 8.64 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.65 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -1001,24 +1001,32 @@ help(topic)
 {
        register FILE *hf;
        int len;
 {
        register FILE *hf;
        int len;
-       char buf[MAXLINE];
        bool noinfo;
        bool noinfo;
+       char buf[MAXLINE];
+       extern char Version[];
+
 
        if (HelpFile == NULL || (hf = fopen(HelpFile, "r")) == NULL)
        {
                /* no help */
                errno = 0;
 
        if (HelpFile == NULL || (hf = fopen(HelpFile, "r")) == NULL)
        {
                /* no help */
                errno = 0;
-               message("502 HELP not implemented");
+               message("502 Sendmail %s -- HELP not implemented", Version);
                return;
        }
 
        if (topic == NULL || *topic == '\0')
                return;
        }
 
        if (topic == NULL || *topic == '\0')
+       {
                topic = "smtp";
                topic = "smtp";
+               message("214-This is Sendmail version %s", Version);
+               noinfo = FALSE;
+       }
        else
        else
+       {
                makelower(topic);
                makelower(topic);
+               noinfo = TRUE;
+       }
 
        len = strlen(topic);
 
        len = strlen(topic);
-       noinfo = TRUE;
 
        while (fgets(buf, sizeof buf, hf) != NULL)
        {
 
        while (fgets(buf, sizeof buf, hf) != NULL)
        {