this is really the way to go, but it seems clearly better than what
i had before. this delta includes many other minor changes, so it
should probably not be blithely removed.
SCCS-vsn: usr.sbin/sendmail/src/alias.c 3.32
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 3.80
SCCS-vsn: usr.sbin/sendmail/src/collect.c 3.39
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 3.70
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 3.42
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 3.30
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.108
SCCS-vsn: usr.sbin/sendmail/src/main.c 3.76
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 3.25
SCCS-vsn: usr.sbin/sendmail/src/macro.c 3.12
SCCS-vsn: usr.sbin/sendmail/src/headers.c 3.19
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 3.10
SCCS-vsn: usr.sbin/sendmail/src/queue.c 3.14
13 files changed:
# include "sendmail.h"
# ifdef DBM
# include "sendmail.h"
# ifdef DBM
-SCCSID(@(#)alias.c 3.31.1.1 %G% (with DBM));
+SCCSID(@(#)alias.c 3.32 %G% (with DBM));
-SCCSID(@(#)alias.c 3.31.1.1 %G% (without DBM));
+SCCSID(@(#)alias.c 3.32 %G% (without DBM));
# include <errno.h>
# include "sendmail.h"
# include <errno.h>
# include "sendmail.h"
-SCCSID(@(#)collect.c 3.38.1.1 %G%);
+SCCSID(@(#)collect.c 3.39 %G%);
/*
** COLLECT -- read & parse message header & make temp file.
/*
** COLLECT -- read & parse message header & make temp file.
finis();
}
chmod(tempfname, 0600);
finis();
}
chmod(tempfname, 0600);
- InFileName = tempfname;
+ CurEnv->e_df = tempfname;
/*
** Create the Mail-From line if we want to.
/*
** Create the Mail-From line if we want to.
- (void) freopen(InFileName, "w", tf);
+ (void) freopen(CurEnv->e_df, "w", tf);
fputs("\nMAIL DELETED BECAUSE OF LACK OF DISK SPACE\n\n", tf);
usrerr("452 Out of disk space for temp file");
}
else
fputs("\nMAIL DELETED BECAUSE OF LACK OF DISK SPACE\n\n", tf);
usrerr("452 Out of disk space for temp file");
}
else
- syserr("collect: Cannot write %s", InFileName);
+ syserr("collect: Cannot write %s", CurEnv->e_df);
(void) freopen("/dev/null", "w", tf);
}
}
(void) freopen("/dev/null", "w", tf);
}
}
.... so we will ignore the problem for the time being */
}
.... so we will ignore the problem for the time being */
}
- if ((TempFile = fopen(InFileName, "r")) == NULL)
- syserr("Cannot reopen %s", InFileName);
+ if ((TempFile = fopen(CurEnv->e_df, "r")) == NULL)
+ syserr("Cannot reopen %s", CurEnv->e_df);
# include <syslog.h>
# endif LOG
# include <syslog.h>
# endif LOG
-SCCSID(@(#)deliver.c 3.79.1.1 %G%);
+SCCSID(@(#)deliver.c 3.80 %G%);
/*
** DELIVER -- Deliver a message to a list of addresses.
/*
** DELIVER -- Deliver a message to a list of addresses.
if (clever)
smtpquit(pv[0]);
# endif SMTP
if (clever)
smtpquit(pv[0]);
# endif SMTP
# include <errno.h>
# include "sendmail.h"
# include <errno.h>
# include "sendmail.h"
-SCCSID(@(#)headers.c 3.18.1.1 %G%);
+SCCSID(@(#)headers.c 3.19 %G%);
/*
** CHOMPHEADER -- process and save a header line.
/*
** CHOMPHEADER -- process and save a header line.
# include "sendmail.h"
# include "conf.h"
# include "sendmail.h"
# include "conf.h"
-SCCSID(@(#)macro.c 3.11.1.1 %G%);
+SCCSID(@(#)macro.c 3.12 %G%);
/*
** EXPAND -- macro expand a string using $x escapes.
/*
** EXPAND -- macro expand a string using $x escapes.
# include <syslog.h>
# endif LOG
# include <syslog.h>
# endif LOG
-SCCSID(@(#)main.c 3.75 %G%);
+SCCSID(@(#)main.c 3.76 %G%);
/*
** SENDMAIL -- Post mail to a set of destinations.
/*
** SENDMAIL -- Post mail to a set of destinations.
# ifdef QUEUE
queueup(CurEnv);
# else QUEUE
# ifdef QUEUE
queueup(CurEnv);
# else QUEUE
- syserr("finis: trying to queue %s", InFileName);
+ syserr("finis: trying to queue %s", CurEnv->e_df);
- (void) unlink(InFileName);
+ (void) unlink(CurEnv->e_df);
e->e_sendqueue = NULL;
e->e_parent = CurEnv;
e->e_df = NULL;
e->e_sendqueue = NULL;
e->e_parent = CurEnv;
e->e_df = NULL;
-SCCSID(@(#)parseaddr.c 3.41.1.1 %G%);
+SCCSID(@(#)parseaddr.c 3.42 %G%);
/*
** PARSE -- Parse an address
/*
** PARSE -- Parse an address
# include <errno.h>
# ifndef QUEUE
# include <errno.h>
# ifndef QUEUE
-SCCSID(@(#)queue.c 3.13.1.1 %G% (no queueing));
+SCCSID(@(#)queue.c 3.14 %G% (no queueing));
-SCCSID(@(#)queue.c 3.13.1.1 %G%);
+SCCSID(@(#)queue.c 3.14 %G%);
/*
** QUEUEUP -- queue a message up for future transmission.
/*
** QUEUEUP -- queue a message up for future transmission.
(void) strcpy(buf, QueueDir);
(void) strcat(buf, "/tfXXXXXX");
(void) mktemp(buf);
(void) strcpy(buf, QueueDir);
(void) strcat(buf, "/tfXXXXXX");
(void) mktemp(buf);
break;
case 'D': /* data file name */
break;
case 'D': /* data file name */
- InFileName = newstr(&buf[1]);
- TempFile = fopen(InFileName, "r");
+ CurEnv->e_df = newstr(&buf[1]);
+ TempFile = fopen(CurEnv->e_df, "r");
- syserr("readqf: cannot open %s", InFileName);
+ syserr("readqf: cannot open %s", CurEnv->e_df);
break;
case 'T': /* timeout */
break;
case 'T': /* timeout */
if (Debug > 0)
printf("timeout(%s)\n", w->w_name);
# endif DEBUG
if (Debug > 0)
printf("timeout(%s)\n", w->w_name);
# endif DEBUG
+ message(Arpa_Info, "Message has timed out");
/* return message to sender */
(void) returntosender("Cannot send mail for three days",
/* return message to sender */
(void) returntosender("Cannot send mail for three days",
-SCCSID(@(#)readcf.c 3.24 %G%);
+SCCSID(@(#)readcf.c 3.25 %G%);
/*
** READCF -- read control file.
/*
** READCF -- read control file.
# include <pwd.h>
# include "sendmail.h"
# include <pwd.h>
# include "sendmail.h"
-SCCSID(@(#)savemail.c 3.29.1.1 %G%);
+SCCSID(@(#)savemail.c 3.30 %G%);
/*
** SAVEMAIL -- Save mail on error
/*
** SAVEMAIL -- Save mail on error
** Fundamentally, this is the mailback case except that
** it returns an OK exit status (assuming the return
** worked).
** Fundamentally, this is the mailback case except that
** it returns an OK exit status (assuming the return
** worked).
+ ** Also, if the from address is not local, mail it back.
*/
if (BerkNet)
{
ExitStat = EX_OK;
*/
if (BerkNet)
{
ExitStat = EX_OK;
+ if (!bitset(M_LOCAL, CurEnv->e_from.q_mailer->m_flags))
+ MailBack = TRUE;
/*
** If writing back, do it.
/*
** If writing back, do it.
p = ttypath();
if (p == NULL || freopen(p, "w", stdout) == NULL)
{
p = ttypath();
if (p == NULL || freopen(p, "w", stdout) == NULL)
{
extern ENVELOPE *newenvelope();
ENVELOPE errenvelope;
extern ENVELOPE *newenvelope();
ENVELOPE errenvelope;
SendBody = sendbody;
ee = newenvelope(&errenvelope);
ee->e_puthdr = putheader;
SendBody = sendbody;
ee = newenvelope(&errenvelope);
ee->e_puthdr = putheader;
# ifdef _DEFINE
# define EXTERN
# ifndef lint
# ifdef _DEFINE
# define EXTERN
# ifndef lint
-static char SmailSccsId[] = "@(#)sendmail.h 3.69 %G%";
+static char SmailSccsId[] = "@(#)sendmail.h 3.70 %G%";
# endif lint
# else _DEFINE
# define EXTERN extern
# endif lint
# else _DEFINE
# define EXTERN extern
EXTERN int AliasLevel; /* depth of aliasing */
EXTERN time_t QueueIntvl; /* intervals between running the queue */
EXTERN char *HostName; /* name of this host for SMTP messages */
EXTERN int AliasLevel; /* depth of aliasing */
EXTERN time_t QueueIntvl; /* intervals between running the queue */
EXTERN char *HostName; /* name of this host for SMTP messages */
-EXTERN char *InFileName; /* input file name */
EXTERN char *Transcript; /* the transcript file name */
extern char *XcriptFile; /* template for Transcript */
extern char *AliasFile; /* location of alias file */
EXTERN char *Transcript; /* the transcript file name */
extern char *XcriptFile; /* template for Transcript */
extern char *AliasFile; /* location of alias file */
# include "sendmail.h"
# ifndef SMTP
# include "sendmail.h"
# ifndef SMTP
-SCCSID(@(#)usersmtp.c 3.9.1.1 %G% (no SMTP));
+SCCSID(@(#)usersmtp.c 3.10 %G% (no SMTP));
-SCCSID(@(#)usersmtp.c 3.9.1.1 %G%);
+SCCSID(@(#)usersmtp.c 3.10 %G%);
/*
** SMTPINIT -- initialize SMTP.
/*
** SMTPINIT -- initialize SMTP.
-static char SccsId[] = "@(#)SendMail version 3.107 of %G%";
+static char SccsId[] = "@(#)SendMail version 3.108 of %G%";
-char Version[] = "3.107 [%G%]";
+char Version[] = "3.108 [%G%]";