Merge 8.9.2+patches -> 8.9.3 changes into mainline.
This commit is contained in:
parent
f179d96746
commit
b2307dea9c
@ -18,7 +18,7 @@ static char copyright[] =
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)mailstats.c 8.28 (Berkeley) 9/14/1998";
|
||||
static char sccsid[] = "@(#)mailstats.c 8.29 (Berkeley) 1/25/1999";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NOT_SENDMAIL
|
||||
@ -283,7 +283,7 @@ main(argc, argv)
|
||||
frmsgs, frbytes, tomsgs, tobytes, rejmsgs, dismsgs);
|
||||
close(fd);
|
||||
fd = open(sfile, O_RDWR | O_TRUNC);
|
||||
if (fd > 0)
|
||||
if (fd >= 0)
|
||||
close(fd);
|
||||
}
|
||||
else
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)conf.c 8.450 (Berkeley) 12/17/1998";
|
||||
static char sccsid[] = "@(#)conf.c 8.452 (Berkeley) 1/26/1999";
|
||||
#endif /* not lint */
|
||||
|
||||
# include "sendmail.h"
|
||||
@ -284,8 +284,7 @@ setdefaults(e)
|
||||
ColonOkInAddr = TRUE;
|
||||
DontLockReadFiles = TRUE;
|
||||
DoubleBounceAddr = "postmaster";
|
||||
MaxHeaderLines = MAXHDRLINES;
|
||||
MaxHeaderLineLength = MAXHDRLINELEN;
|
||||
MaxHeadersLength = MAXHDRSLEN;
|
||||
snprintf(buf, sizeof buf, "%s%sdead.letter",
|
||||
_PATH_VARTMP,
|
||||
_PATH_VARTMP[sizeof _PATH_VARTMP - 2] == '/' ? "" : "/");
|
||||
|
@ -9,7 +9,7 @@
|
||||
* the sendmail distribution.
|
||||
*
|
||||
*
|
||||
* @(#)conf.h 8.380 (Berkeley) 11/9/1998
|
||||
* @(#)conf.h 8.385 (Berkeley) 1/28/1999
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -69,11 +69,8 @@ struct rusage; /* forward declaration to get gcc to shut up in wait.h */
|
||||
# else
|
||||
# define MAXMACNAMELEN 20 /* max macro name length */
|
||||
# endif
|
||||
# ifndef MAXHDRLINES
|
||||
# define MAXHDRLINES 1000 /* max lines in a message header */
|
||||
# endif
|
||||
# ifndef MAXHDRLINELEN
|
||||
# define MAXHDRLINELEN SMTPLINELIM /* max length of a header line */
|
||||
# ifndef MAXHDRSLEN
|
||||
# define MAXHDRSLEN (32 * 1024) /* max size of message headers */
|
||||
# endif
|
||||
|
||||
/**********************************************************************
|
||||
@ -1302,10 +1299,12 @@ extern void *malloc();
|
||||
# endif
|
||||
# define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */
|
||||
# define SPT_PADCHAR '\0' /* pad process title with nulls */
|
||||
# ifndef TZ_TYPE
|
||||
# define TZ_TYPE TZ_NONE /* no standard for Linux */
|
||||
# endif
|
||||
# ifndef _PATH_SENDMAILPID
|
||||
# define _PATH_SENDMAILPID "/var/run/sendmail.pid"
|
||||
# endif
|
||||
# define TZ_TYPE TZ_TZNAME
|
||||
# include <sys/sysmacros.h>
|
||||
# undef atol /* wounded in <stdlib.h> */
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)headers.c 8.134 (Berkeley) 11/29/1998";
|
||||
static char sccsid[] = "@(#)headers.c 8.136 (Berkeley) 1/26/1999";
|
||||
#endif /* not lint */
|
||||
|
||||
# include <errno.h>
|
||||
@ -77,6 +77,7 @@ chompheader(line, def, hdrp, e)
|
||||
bool headeronly;
|
||||
STAB *s;
|
||||
struct hdrinfo *hi;
|
||||
bool nullheader = FALSE;
|
||||
BITMAP mopts;
|
||||
|
||||
if (tTd(31, 6))
|
||||
@ -123,11 +124,17 @@ chompheader(line, def, hdrp, e)
|
||||
return 0;
|
||||
}
|
||||
*fvalue = '\0';
|
||||
fvalue = p;
|
||||
|
||||
/* strip field value on front */
|
||||
if (*fvalue == ' ')
|
||||
fvalue++;
|
||||
if (*p == ' ')
|
||||
p++;
|
||||
fvalue = p;
|
||||
|
||||
/* if the field is null, go ahead and use the default */
|
||||
while (isascii(*p) && isspace(*p))
|
||||
p++;
|
||||
if (*p == '\0')
|
||||
nullheader = TRUE;
|
||||
|
||||
/* security scan: long field names are end-of-header */
|
||||
if (strlen(fname) > 100)
|
||||
@ -236,6 +243,11 @@ chompheader(line, def, hdrp, e)
|
||||
bitset(H_DEFAULT, h->h_flags) &&
|
||||
!bitset(H_FORCE, h->h_flags))
|
||||
{
|
||||
if (nullheader)
|
||||
{
|
||||
/* user-supplied value was null */
|
||||
return 0;
|
||||
}
|
||||
h->h_value = NULL;
|
||||
if (!cond)
|
||||
{
|
||||
@ -1149,6 +1161,7 @@ crackaddr(addr)
|
||||
** mci -- the connection information.
|
||||
** h -- the header to put.
|
||||
** e -- envelope to use.
|
||||
** flags -- MIME conversion flags.
|
||||
**
|
||||
** Returns:
|
||||
** none.
|
||||
@ -1165,10 +1178,11 @@ crackaddr(addr)
|
||||
#endif
|
||||
|
||||
void
|
||||
putheader(mci, hdr, e)
|
||||
putheader(mci, hdr, e, flags)
|
||||
register MCI *mci;
|
||||
HDR *hdr;
|
||||
register ENVELOPE *e;
|
||||
int flags;
|
||||
{
|
||||
register HDR *h;
|
||||
char buf[MAX(MAXLINE,BUFSIZ)];
|
||||
@ -1251,9 +1265,16 @@ putheader(mci, hdr, e)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* suppress Content-Transfer-Encoding: if we are MIMEing */
|
||||
/*
|
||||
** Suppress Content-Transfer-Encoding: if we are MIMEing
|
||||
** and we are potentially converting from 8 bit to 7 bit
|
||||
** MIME. If converting, add a new CTE header in
|
||||
** mime8to7().
|
||||
*/
|
||||
if (bitset(H_CTE, h->h_flags) &&
|
||||
bitset(MCIF_CVT8TO7|MCIF_CVT7TO8|MCIF_INMIME, mci->mci_flags))
|
||||
bitset(MCIF_CVT8TO7|MCIF_CVT7TO8|MCIF_INMIME,
|
||||
mci->mci_flags) &&
|
||||
!bitset(M87F_NO8TO7, flags))
|
||||
{
|
||||
if (tTd(34, 11))
|
||||
printf(" (skipped (content-transfer-encoding))\n");
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)savemail.c 8.139 (Berkeley) 8/5/1998";
|
||||
static char sccsid[] = "@(#)savemail.c 8.140 (Berkeley) 1/18/1999";
|
||||
#endif /* not lint */
|
||||
|
||||
# include "sendmail.h"
|
||||
@ -395,7 +395,7 @@ savemail(e, sendbody)
|
||||
mcibuf.mci_contentlen = 0;
|
||||
|
||||
putfromline(&mcibuf, e);
|
||||
(*e->e_puthdr)(&mcibuf, e->e_header, e);
|
||||
(*e->e_puthdr)(&mcibuf, e->e_header, e, M87F_OUTER);
|
||||
(*e->e_putbody)(&mcibuf, e, NULL);
|
||||
putline("\n", &mcibuf);
|
||||
(void) fflush(fp);
|
||||
@ -1139,7 +1139,7 @@ errbody(mci, e, separator)
|
||||
}
|
||||
}
|
||||
putline("", mci);
|
||||
putheader(mci, e->e_parent->e_header, e->e_parent);
|
||||
putheader(mci, e->e_parent->e_header, e->e_parent, M87F_OUTER);
|
||||
if (sendbody)
|
||||
putbody(mci, e->e_parent, e->e_msgboundary);
|
||||
else if (e->e_msgboundary == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user