SCCS-vsn: usr.sbin/sendmail/src/deliver.c 3.115
SCCS-vsn: usr.sbin/sendmail/src/queue.c 3.43
# include "sendmail.h"
# include <sys/stat.h>
# include "sendmail.h"
# include <sys/stat.h>
-SCCSID(@(#)deliver.c 3.114 %G%);
+SCCSID(@(#)deliver.c 3.115 %G%);
/*
** DELIVER -- Deliver a message to a list of addresses.
/*
** DELIVER -- Deliver a message to a list of addresses.
** p -- the value to put in it.
** fp -- file to put it to.
** oldstyle -- TRUE if this is an old style header.
** p -- the value to put in it.
** fp -- file to put it to.
** oldstyle -- TRUE if this is an old style header.
-** m -- a pointer to the mailer descriptor.
+** m -- a pointer to the mailer descriptor. If NULL,
+** don't transform the name at all.
{
register char *obp;
int opos;
{
register char *obp;
int opos;
- bool fullsmtp = bitset(M_FULLSMTP, m->m_flags);
bool firstone = TRUE;
char obuf[MAXLINE];
bool firstone = TRUE;
char obuf[MAXLINE];
printf("commaize(%s: %s)\n", h->h_field, p);
# endif DEBUG
printf("commaize(%s: %s)\n", h->h_field, p);
# endif DEBUG
+ if (m != NULL && bitset(M_FULLSMTP, m->m_flags))
+ fullsmtp = TRUE;
+
obp = obuf;
(void) sprintf(obp, "%s: ", capitalize(h->h_field));
opos = strlen(h->h_field) + 2;
obp = obuf;
(void) sprintf(obp, "%s: ", capitalize(h->h_field));
opos = strlen(h->h_field) + 2;
*p = '\0';
/* translate the name to be relative */
*p = '\0';
/* translate the name to be relative */
- name = remotename(name, m, bitset(H_FROM, h->h_flags));
+ if (m != NULL)
+ name = remotename(name, m, bitset(H_FROM, h->h_flags));
if (*name == '\0')
{
*p = savechar;
if (*name == '\0')
{
*p = savechar;
# include <errno.h>
# ifndef QUEUE
# include <errno.h>
# ifndef QUEUE
-SCCSID(@(#)queue.c 3.42 %G% (no queueing));
+SCCSID(@(#)queue.c 3.43 %G% (no queueing));
-SCCSID(@(#)queue.c 3.42 %G%);
+SCCSID(@(#)queue.c 3.43 %G%);
/*
** QUEUEUP -- queue a message up for future transmission.
/*
** QUEUEUP -- queue a message up for future transmission.
fprintf(tfp, "H");
if (h->h_mflags != 0 && bitset(H_CHECK|H_ACHECK, h->h_flags))
mfdecode(h->h_mflags, tfp);
fprintf(tfp, "H");
if (h->h_mflags != 0 && bitset(H_CHECK|H_ACHECK, h->h_flags))
mfdecode(h->h_mflags, tfp);
- fprintf(tfp, "%s: ", h->h_field);
if (bitset(H_DEFAULT, h->h_flags))
{
(void) expand(h->h_value, buf, &buf[sizeof buf], e);
if (bitset(H_DEFAULT, h->h_flags))
{
(void) expand(h->h_value, buf, &buf[sizeof buf], e);
- fprintf(tfp, "%s\n", buf);
+ fprintf(tfp, "%s: %s\n", h->h_field, buf);
- fprintf(tfp, "%s\n", h->h_value);
+ commaize(h, h->h_value, tfp, e->e_oldstyle, NULL);