SCCS-vsn: usr.sbin/sendmail/src/recipient.c 8.58
SCCS-vsn: usr.sbin/sendmail/src/main.c 8.70
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 8.44
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 8.76
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 8.44
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.50
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 8.49
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 8.114
-static char sccsid[] = "@(#)deliver.c 8.113 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c 8.114 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
- if (a->q_status != NULL)
- free(a->q_status);
+ if (a->q_rstatus != NULL)
+ free(a->q_rstatus);
if (strlen(msg) > 4)
{
register char *p, *q;
if (strlen(msg) > 4)
{
register char *p, *q;
*p++ = '\0';
msg = buf;
}
*p++ = '\0';
msg = buf;
}
- a->q_status = newstr(msg);
+ a->q_rstatus = newstr(msg);
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 8.69 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 8.70 (Berkeley) %G%";
#endif /* not lint */
#define _DEFINE
#endif /* not lint */
#define _DEFINE
for (j = '\0'; j <= '\177'; j++)
if (bitnset(j, m->m_flags))
(void) putchar(j);
for (j = '\0'; j <= '\177'; j++)
if (bitnset(j, m->m_flags))
(void) putchar(j);
+ printf("L=%d E=", m->m_linelimit);
+ if (m->m_defcharset != NULL)
+ printf(" C=%s", m->m_defcharset);
+ if (m->m_mtstype != NULL)
+ printf(" T=%s", m->m_mtstype);
if (m->m_argv != NULL)
{
char **a = m->m_argv;
if (m->m_argv != NULL)
{
char **a = m->m_argv;
-static char sccsid[] = "@(#)parseaddr.c 8.43 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c 8.44 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
-static char sccsid[] = "@(#)readcf.c 8.48 (Berkeley) %G%";
+static char sccsid[] = "@(#)readcf.c 8.49 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
m->m_defcharset = newstr(p);
break;
m->m_defcharset = newstr(p);
break;
+ case 'T': /* MTS Type */
+ m->m_mtstype = newstr(p);
+ break;
+
case 'U': /* user id */
if (isascii(*p) && !isdigit(*p))
{
case 'U': /* user id */
if (isascii(*p) && !isdigit(*p))
{
-static char sccsid[] = "@(#)recipient.c 8.57 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c 8.58 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
/* q_flags bits inherited from ctladdr */
#define QINHERITEDBITS (QPINGONSUCCESS|QPINGONFAILURE|QPINGONDELAY|QHAS_RET_PARAM|QRET_HDRS)
/* q_flags bits inherited from ctladdr */
#define QINHERITEDBITS (QPINGONSUCCESS|QPINGONFAILURE|QPINGONDELAY|QHAS_RET_PARAM|QRET_HDRS)
ADDRESS *
sendto(list, copyf, ctladdr, qflags)
char *list;
ADDRESS *
sendto(list, copyf, ctladdr, qflags)
char *list;
/* break aliasing loops */
if (aliaslevel > MAXRCRSN)
{
/* break aliasing loops */
if (aliaslevel > MAXRCRSN)
{
- usrerr("554 aliasing/forwarding loop broken");
+ usrerr("554 aliasing/forwarding loop broken (%d aliases deep; %d max",
+ aliaslevel, MAXRCRSN);
-static char sccsid[] = "@(#)savemail.c 8.43 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 8.44 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
putline(buf, mci);
/* Received-From: shows where we got this message from */
putline(buf, mci);
/* Received-From: shows where we got this message from */
- expand("Received-From: \201_", buf, &buf[sizeof buf - 1],
- e->e_parent);
- putline(buf, mci);
+ if (RealHostName != NULL)
+ {
+ (void) sprintf(buf, "Received-From: %s", RealHostName);
+ putline(buf, mci);
+ }
/* Arrival-Date: -- when it arrived here */
(void) sprintf(buf, "Arrival-Date: %s",
/* Arrival-Date: -- when it arrived here */
(void) sprintf(buf, "Arrival-Date: %s",
strcpy(buf, "Status: ");
if (q->q_status != NULL)
strcat(buf, q->q_status);
strcpy(buf, "Status: ");
if (q->q_status != NULL)
strcat(buf, q->q_status);
+ else if (q->q_fstatus != NULL)
+ strcat(buf, q->q_fstatus);
else if (bitset(QBADADDR, q->q_flags))
strcat(buf, "500");
else if (bitset(QQUEUEUP, q->q_flags))
else if (bitset(QBADADDR, q->q_flags))
strcat(buf, "500");
else if (bitset(QQUEUEUP, q->q_flags))
- /* Original-Rcpt: -- passed from on high */
+ /* Original-Recipient: -- passed from on high */
if (q->q_orcpt != NULL)
{
if (q->q_orcpt != NULL)
{
- (void) sprintf(buf, "Original-Rcpt: %s",
+ (void) sprintf(buf, "Original-Recipient: %s",
q->q_orcpt);
putline(buf, mci);
}
q->q_orcpt);
putline(buf, mci);
}
- /* Final-Rcpt: -- if through alias */
+ /* Final-Recipient: -- if through alias */
if (q->q_alias != NULL)
{
if (q->q_alias != NULL)
{
- (void) sprintf(buf, "Final-Rcpt: %s",
+ (void) sprintf(buf, "Final-Recipient: %s",
q->q_paddr);
putline(buf, mci);
}
/* Final-Status: -- same as Status? XXX */
q->q_paddr);
putline(buf, mci);
}
/* Final-Status: -- same as Status? XXX */
+ if (q->q_fstatus != NULL && q->q_status != NULL)
+ {
+ (void) sprintf(buf, "Final-Status: %s",
+ q->q_fstatus);
+ putline(buf, mci);
+ }
/* Remote-MTS-Type: -- always INET? XXX */
/* Remote-MTS-Type: -- always INET? XXX */
+ if (q->q_mailer->m_mtstype != NULL)
+ {
+ (void) sprintf(buf, "Remote-MTS-Type: %s",
+ q->q_mailer->m_mtstype);
+ putline(buf, mci);
+ }
/* Remote-MTA: -- who was I talking to? */
if (q->q_statmta != NULL)
/* Remote-MTA: -- who was I talking to? */
if (q->q_statmta != NULL)
- /* Remote-Rcpt: -- same as Final-Rcpt? XXX */
+ /* Remote-Recipient: -- same as Final-Recipient? XXX */
+ if (strcmp(q->q_user, q->q_paddr) != 0)
+ {
+ (void) sprintf(buf, "Remote-Recipient: %s",
+ q->q_user);
+ putline(buf, mci);
+ }
- /* Remote-Status: -- same as Final-Status? XXX */
+ /* Remote-Status: -- return code from remote mailer */
+ if (q->q_rstatus != NULL)
+ {
+ (void) sprintf(buf, "Remote-Status: %s",
+ q->q_rstatus);
+ putline(buf, mci);
+ }
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)sendmail.h 8.75 (Berkeley) %G%
+ * @(#)sendmail.h 8.76 (Berkeley) %G%
# ifdef _DEFINE
# define EXTERN
# ifndef lint
# ifdef _DEFINE
# define EXTERN
# ifndef lint
-static char SmailSccsId[] = "@(#)sendmail.h 8.75 %G%";
+static char SmailSccsId[] = "@(#)sendmail.h 8.76 %G%";
# endif
# else /* _DEFINE */
# define EXTERN extern
# endif
# else /* _DEFINE */
# define EXTERN extern
{
char *m_name; /* symbolic name of this mailer */
char *m_mailer; /* pathname of the mailer to use */
{
char *m_name; /* symbolic name of this mailer */
char *m_mailer; /* pathname of the mailer to use */
+ char *m_mtstype; /* type of this MTS */
BITMAP m_flags; /* status flags, see below */
short m_mno; /* mailer number internally */
char **m_argv; /* template argument vector */
BITMAP m_flags; /* status flags, see below */
short m_mno; /* mailer number internally */
char **m_argv; /* template argument vector */
extern char *hvalue __P((char *, HDR *));
extern char *defcharset __P((ENVELOPE *));
extern bool emptyaddr __P((ADDRESS *));
extern char *hvalue __P((char *, HDR *));
extern char *defcharset __P((ENVELOPE *));
extern bool emptyaddr __P((ADDRESS *));
+extern int sendtolist __P((char *, ADDRESS *, ADDRESS **, int, ENVELOPE *));
/* ellipsis is a different case though */
#ifdef __STDC__
/* ellipsis is a different case though */
#ifdef __STDC__
-static char sccsid[] = "@(#)srvrsmtp.c 8.49 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.50 (Berkeley) %G% (with SMTP)";
-static char sccsid[] = "@(#)srvrsmtp.c 8.49 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.50 (Berkeley) %G% (without SMTP)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */