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
# 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
+ 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++;
- p = &ud[22]; /* 1979 */
*q++ = *p++;
*q++ = *p++;
*q++ = ' ';
*q++ = *p++;
*q++ = *p++;
*q++ = ' ';
- p = &ud[0]; /* Mon */
- *q++ = ' ';
- *q++ = '(';
- *q++ = *p++;
- *q++ = *p++;
- *q++ = *p++;
- *q++ = ')';
-
# 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.
** 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
** 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();
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);
}
/* 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);
** 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;
# 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>
#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.
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;
/*
-SCCSID(@(#)readcf.c 3.58 %G%);
+SCCSID(@(#)readcf.c 3.59 %G%);
/*
** READCF -- read control file.
/*
** READCF -- read control file.
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;
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;
-static char SccsId[] = "@(#)SendMail version 3.346 of %G%";
+static char SccsId[] = "@(#)SendMail version 3.347 of %G%";
-char Version[] = "3.346";
+char Version[] = "3.347";