than mailfile; this fixes a bug with the "from" name and seems like
a better abstraction.
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 3.25
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.71
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 3.32
# include "sendmail.h"
# include <sys/stat.h>
# include "sendmail.h"
# include <sys/stat.h>
-SCCSID(@(#)recipient.c 3.31 %G%);
+SCCSID(@(#)recipient.c 3.32 %G%);
/*
** SENDTO -- Designate a send list.
/*
** SENDTO -- Designate a send list.
{
a->q_mailer = m = ProgMailer;
a->q_user++;
{
a->q_mailer = m = ProgMailer;
a->q_user++;
- if (a->q_alias == NULL && Debug == 0 && !QueueRun)
+ if (a->q_alias == NULL && Debug == 0 && !QueueRun && !ForceMail)
{
usrerr("Cannot mail directly to programs");
a->q_flags |= QDONTSEND;
{
usrerr("Cannot mail directly to programs");
a->q_flags |= QDONTSEND;
if (strncmp(a->q_user, ":include:", 9) == 0)
{
a->q_flags |= QDONTSEND;
if (strncmp(a->q_user, ":include:", 9) == 0)
{
a->q_flags |= QDONTSEND;
- if (a->q_alias == NULL && Debug == 0 && !QueueRun)
+ if (a->q_alias == NULL && Debug == 0 && !QueueRun && !ForceMail)
usrerr("Cannot mail directly to :include:s");
else
{
usrerr("Cannot mail directly to :include:s");
else
{
if ((p = rindex(buf, '/')) != NULL)
{
/* check if writable or creatable */
if ((p = rindex(buf, '/')) != NULL)
{
/* check if writable or creatable */
- if (a->q_alias == NULL && Debug == 0 && !QueueRun)
+ if (a->q_alias == NULL && Debug == 0 && !QueueRun && !ForceMail)
{
usrerr("Cannot mail directly to files");
a->q_flags |= QDONTSEND;
{
usrerr("Cannot mail directly to files");
a->q_flags |= QDONTSEND;
# include <pwd.h>
# include "sendmail.h"
# include <pwd.h>
# include "sendmail.h"
-SCCSID(@(#)savemail.c 3.24 %G%);
+SCCSID(@(#)savemail.c 3.25 %G%);
/*
** SAVEMAIL -- Save mail on error
/*
** SAVEMAIL -- Save mail on error
/*
** In the unhappy event we don't know who to return the mail
/*
** In the unhappy event we don't know who to return the mail
}
if (p != NULL && TempFile != NULL)
{
}
if (p != NULL && TempFile != NULL)
{
/* we have a home directory; open dead.letter */
message(Arpa_Info, "Saving message in dead.letter");
define('z', p);
(void) expand("$z/dead.letter", buf, &buf[sizeof buf - 1]);
To = buf;
/* we have a home directory; open dead.letter */
message(Arpa_Info, "Saving message in dead.letter");
define('z', p);
(void) expand("$z/dead.letter", buf, &buf[sizeof buf - 1]);
To = buf;
- i = mailfile(buf, &From);
- giveresponse(i, TRUE, LocalMailer);
+ q = NULL;
+ sendto(buf, -1, NULL, &q);
+ (void) deliver(q, NULL);
}
/* add terminator to writeback message */
}
/* add terminator to writeback message */
(void) freopen("/dev/null", "w", stdout);
NoAlias++;
(void) freopen("/dev/null", "w", stdout);
NoAlias++;
ErrorMessage = msg;
/* fake up an address header for the from person */
ErrorMessage = msg;
/* fake up an address header for the from person */
-static char SccsId[] = "@(#)SendMail version 3.70 of %G%";
+static char SccsId[] = "@(#)SendMail version 3.71 of %G%";
-char Version[] = "3.70 [%G%]";
+char Version[] = "3.71 [%G%]";