Delete "load limiting" for SMTP connections (a bad ethernet board can
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 14 Jul 1983 01:38:29 +0000 (17:38 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 14 Jul 1983 01:38:29 +0000 (17:38 -0800)
hang up all incoming mail); use sfgets in collect (same reason); check
for I/O error in collect (from Bill Nowicki); switch date format to
RFC822 style.

SCCS-vsn: usr.sbin/sendmail/src/arpadate.c 3.13
SCCS-vsn: usr.sbin/sendmail/src/collect.c 3.61
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 3.55
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.347
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 3.59

usr/src/usr.sbin/sendmail/src/arpadate.c
usr/src/usr.sbin/sendmail/src/collect.c
usr/src/usr.sbin/sendmail/src/daemon.c
usr/src/usr.sbin/sendmail/src/readcf.c
usr/src/usr.sbin/sendmail/src/version.c

index e84a6c9..2463bc9 100644 (file)
@@ -7,7 +7,7 @@
 # endif
 # include "useful.h"
 
 # endif
 # include "useful.h"
 
-SCCSID(@(#)arpadate.c  3.12            %G%);
+SCCSID(@(#)arpadate.c  3.13            %G%);
 
 /*
 **  ARPADATE -- Create date in ARPANET format
 
 /*
 **  ARPADATE -- Create date in ARPANET format
@@ -77,6 +77,13 @@ arpadate(ud)
 
        q = b;
 
 
        q = b;
 
+       p = &ud[0];             /* Mon */
+       *q++ = *p++;
+       *q++ = *p++;
+       *q++ = *p++;
+       *q++ = ',';
+       *q++ = ' ';
+
        p = &ud[8];             /* 16 */
        if (*p == ' ')
                p++;
        p = &ud[8];             /* 16 */
        if (*p == ' ')
                p++;
@@ -91,7 +98,7 @@ arpadate(ud)
        *q++ = *p++;
        *q++ = ' ';
 
        *q++ = *p++;
        *q++ = ' ';
 
-       p = &ud[22];            /* 1979 */
+       p = &ud[22];            /* 79 */
        *q++ = *p++;
        *q++ = *p++;
        *q++ = ' ';
        *q++ = *p++;
        *q++ = *p++;
        *q++ = ' ';
@@ -131,14 +138,6 @@ arpadate(ud)
                *q++ = *p++;
        }
 
                *q++ = *p++;
        }
 
-       p = &ud[0];             /* Mon */
-       *q++ = ' ';
-       *q++ = '(';
-       *q++ = *p++;
-       *q++ = *p++;
-       *q++ = *p++;
-       *q++ = ')';
-
        *q = '\0';
        return (b);
 }
        *q = '\0';
        return (b);
 }
index 2b64770..32655f9 100644 (file)
@@ -1,7 +1,7 @@
 # include <errno.h>
 # include "sendmail.h"
 
 # include <errno.h>
 # include "sendmail.h"
 
-SCCSID(@(#)collect.c   3.60            %G%);
+SCCSID(@(#)collect.c   3.61            %G%);
 
 /*
 **  COLLECT -- read & parse message header & make temp file.
 
 /*
 **  COLLECT -- read & parse message header & make temp file.
@@ -58,14 +58,14 @@ maketemp(from)
        **  Try to read a UNIX-style From line
        */
 
        **  Try to read a UNIX-style From line
        */
 
-       if (fgets(buf, sizeof buf, InChannel) == NULL)
+       if (sfgets(buf, sizeof buf, InChannel) == NULL)
                return;
        fixcrlf(buf, FALSE);
 # ifndef NOTUNIX
        if (!SaveFrom && strncmp(buf, "From ", 5) == 0)
        {
                eatfrom(buf);
                return;
        fixcrlf(buf, FALSE);
 # ifndef NOTUNIX
        if (!SaveFrom && strncmp(buf, "From ", 5) == 0)
        {
                eatfrom(buf);
-               (void) fgets(buf, sizeof buf, InChannel);
+               (void) sfgets(buf, sizeof buf, InChannel);
                fixcrlf(buf, FALSE);
        }
 # endif NOTUNIX
                fixcrlf(buf, FALSE);
        }
 # endif NOTUNIX
@@ -74,12 +74,11 @@ maketemp(from)
        **  Copy InChannel to temp file & do message editing.
        **      To keep certain mailers from getting confused,
        **      and to keep the output clean, lines that look
        **  Copy InChannel to temp file & do message editing.
        **      To keep certain mailers from getting confused,
        **      and to keep the output clean, lines that look
-       **      like UNIX "From" lines are deleted in the header,
-       **      and prepended with ">" in the body.
+       **      like UNIX "From" lines are deleted in the header.
        */
 
        */
 
-       for (; !feof(InChannel); !feof(InChannel) &&
-                                fgets(buf, MAXFIELD, InChannel) != NULL)
+       for (; !feof(InChannel); !feof(InChannel) && !ferror(InChannel) &&
+                                sfgets(buf, MAXFIELD, InChannel) != NULL)
        {
                register char c;
                extern bool isheader();
        {
                register char c;
                extern bool isheader();
@@ -104,7 +103,7 @@ maketemp(from)
                        p = &buf[strlen(buf)];
                        *p++ = '\n';
                        *p++ = c;
                        p = &buf[strlen(buf)];
                        *p++ = '\n';
                        *p++ = c;
-                       if (fgets(p, MAXFIELD - (p - buf), InChannel) == NULL)
+                       if (sfgets(p, MAXFIELD - (p - buf), InChannel) == NULL)
                                break;
                        fixcrlf(p, TRUE);
                }
                                break;
                        fixcrlf(p, TRUE);
                }
@@ -129,7 +128,7 @@ maketemp(from)
        /* throw away a blank line */
        if (buf[0] == '\0')
        {
        /* throw away a blank line */
        if (buf[0] == '\0')
        {
-               (void) fgets(buf, MAXFIELD, InChannel);
+               (void) sfgets(buf, MAXFIELD, InChannel);
                fixcrlf(buf, TRUE);
        }
 
                fixcrlf(buf, TRUE);
        }
 
@@ -137,8 +136,8 @@ maketemp(from)
        **  Collect the body of the message.
        */
 
        **  Collect the body of the message.
        */
 
-       for (; !feof(InChannel); !feof(InChannel) &&
-                                fgets(buf, sizeof buf, InChannel) != NULL)
+       for (; !feof(InChannel); !feof(InChannel) && !ferror(InChannel) &&
+                                sfgets(buf, sizeof buf, InChannel) != NULL)
        {
                register char *bp = buf;
 
        {
                register char *bp = buf;
 
index 12f3a55..2ef0abe 100644 (file)
@@ -3,7 +3,7 @@
 # include <sys/mx.h>
 
 #ifndef DAEMON
 # include <sys/mx.h>
 
 #ifndef DAEMON
-SCCSID(@(#)daemon.c    3.54            %G%     (w/o daemon mode));
+SCCSID(@(#)daemon.c    3.55            %G%     (w/o daemon mode));
 #else
 
 #include <sys/socket.h>
 #else
 
 #include <sys/socket.h>
@@ -11,7 +11,7 @@ SCCSID(@(#)daemon.c   3.54            %G%     (w/o daemon mode));
 #include <netdb.h>
 #include <sys/wait.h>
 
 #include <netdb.h>
 #include <sys/wait.h>
 
-SCCSID(@(#)daemon.c    3.54            %G%     (with daemon mode));
+SCCSID(@(#)daemon.c    3.55            %G%     (with daemon mode));
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
@@ -64,13 +64,11 @@ static FILE *MailPort;      /* port that mail comes in on */
 
 struct sockaddr_in     SendmailAddress;/* internet address of sendmail */
 int    DaemonSocket = -1;              /* fd describing socket */
 
 struct sockaddr_in     SendmailAddress;/* internet address of sendmail */
 int    DaemonSocket = -1;              /* fd describing socket */
-int    MaxConnections = 4;             /* maximum simultaneous sendmails */
 
 getrequests()
 {
        int t;
        union wait status;
 
 getrequests()
 {
        int t;
        union wait status;
-       int numconnections = 0;
        register struct servent *sp;
 
        /*
        register struct servent *sp;
 
        /*
index 033b666..52474f4 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-SCCSID(@(#)readcf.c    3.58            %G%);
+SCCSID(@(#)readcf.c    3.59            %G%);
 
 /*
 **  READCF -- read control file.
 
 /*
 **  READCF -- read control file.
@@ -588,9 +588,6 @@ printrules()
 
 static BITMAP  StickyOpt;              /* set if option is stuck */
 extern char    *WizWord;               /* the stored wizard password */
 
 static BITMAP  StickyOpt;              /* set if option is stuck */
 extern char    *WizWord;               /* the stored wizard password */
-#ifdef DAEMON
-extern int     MaxConnections;         /* max simult. SMTP conns */
-#endif DAEMON
 
 setoption(opt, val, safe, sticky)
        char opt;
 
 setoption(opt, val, safe, sticky)
        char opt;
@@ -725,12 +722,6 @@ setoption(opt, val, safe, sticky)
                MeToo = atobool(val);
                break;
 
                MeToo = atobool(val);
                break;
 
-#ifdef DAEMON
-         case 'N':             /* maximum simultaneous SMTP connections */
-               MaxConnections = atoi(val);
-               break;
-#endif DAEMON
-
          case 'o':             /* assume old style headers */
                if (atobool(val))
                        CurEnv->e_flags |= EF_OLDSTYLE;
          case 'o':             /* assume old style headers */
                if (atobool(val))
                        CurEnv->e_flags |= EF_OLDSTYLE;
index 06ab1f3..5665d92 100644 (file)
@@ -1,5 +1,5 @@
 # ifndef lint
 # ifndef lint
-static char    SccsId[] = "@(#)SendMail version 3.346 of %G%";
+static char    SccsId[] = "@(#)SendMail version 3.347 of %G%";
 # endif lint
 
 # endif lint
 
-char   Version[] = "3.346";
+char   Version[] = "3.347";