fix minor syslog problem
SCCS-vsn: usr.sbin/sendmail/src/headers.c 6.2
SCCS-vsn: usr.sbin/sendmail/src/version.c 6.2
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 6.2
SCCS-vsn: usr.sbin/sendmail/src/conf.c 6.2
-static char sccsid[] = "@(#)conf.c 6.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c 6.2 (Berkeley) %G%";
#endif /* not lint */
# include <sys/ioctl.h>
#endif /* not lint */
# include <sys/ioctl.h>
"from", H_FROM,
"reply-to", H_FROM,
"full-name", H_ACHECK,
"from", H_FROM,
"reply-to", H_FROM,
"full-name", H_ACHECK,
- "return-receipt-to", H_FROM,
- "errors-to", H_FROM,
+ "return-receipt-to", H_FROM /* |H_RECEIPTTO */,
+ "errors-to", H_FROM|H_ERRORSTO,
/* destination fields */
"to", H_RCPT,
"resent-to", H_RCPT|H_RESENT,
/* destination fields */
"to", H_RCPT,
"resent-to", H_RCPT|H_RESENT,
-static char sccsid[] = "@(#)headers.c 6.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)headers.c 6.2 (Berkeley) %G%";
#endif /* not lint */
# include <errno.h>
#endif /* not lint */
# include <errno.h>
if (tTd(32, 1))
printf("%s: %s\n", capitalize(h->h_field), h->h_value);
if (tTd(32, 1))
printf("%s: %s\n", capitalize(h->h_field), h->h_value);
/* count the number of times it has been processed */
if (bitset(H_TRACE, h->h_flags))
hopcnt++;
/* count the number of times it has been processed */
if (bitset(H_TRACE, h->h_flags))
hopcnt++;
+
+ /* see if this is a return-receipt header */
+ if (bitset(H_RECEIPTTO, h->h_flags))
+ e->e_receiptto = h->h_value;
+
+ /* see if this is an errors-to header */
+ if (bitset(H_ERRORSTO, h->h_flags))
+ sendtolist(h->h_value, (ADDRESS *) NULL, &e->e_errorqueue, e);
}
if (tTd(32, 1))
printf("----------------------------\n");
}
if (tTd(32, 1))
printf("----------------------------\n");
- e->e_class * WkClassFact
+ e->e_nrcpts * WkRecipFact;
- e->e_class * WkClassFact
+ e->e_nrcpts * WkRecipFact;
- /* return receipt to */
- p = hvalue("return-receipt-to", e);
- if (p != NULL)
- e->e_receiptto = p;
-
- /* errors to */
- p = hvalue("errors-to", e);
- if (p != NULL)
- sendtolist(p, (ADDRESS *) NULL, &e->e_errorqueue, e);
-
/* full name of from person */
p = hvalue("full-name", e);
if (p != NULL)
/* full name of from person */
p = hvalue("full-name", e);
if (p != NULL)
# ifdef LOG
if (!QueueRun && LogLevel > 1)
{
# ifdef LOG
if (!QueueRun && LogLevel > 1)
{
- char *name = hbuf;
- extern char *inet_ntoa();
if (RealHostName == NULL)
name = "local";
else if (RealHostName[0] == '[')
name = RealHostName;
else
if (RealHostName == NULL)
name = "local";
else if (RealHostName[0] == '[')
name = RealHostName;
else
+ {
+ extern char *inet_ntoa();
+
+ name = hbuf;
(void)sprintf(hbuf, "%.80s (%s)",
RealHostName, inet_ntoa(RealHostAddr.sin_addr));
(void)sprintf(hbuf, "%.80s (%s)",
RealHostName, inet_ntoa(RealHostAddr.sin_addr));
- syslog(LOG_INFO,
- "%s: from=%s, size=%ld, class=%d, msgid=%s, received from %s\n",
- e->e_id, e->e_from.q_paddr, e->e_msgsize,
- e->e_class, msgid, name);
+ }
+
+ /* some versions of syslog only take 5 printf args */
+ sprintf(sbuf, "from=%.200s, size=%ld, class=%d, msgid=%.100s",
+ e->e_from.q_paddr, e->e_msgsize, e->e_class, msgid);
+ syslog(LOG_INFO, "%s: %s, received from %s\n",
+ e->e_id, sbuf, name);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)sendmail.h 6.1 (Berkeley) %G%
+ * @(#)sendmail.h 6.2 (Berkeley) %G%
# ifdef _DEFINE
# define EXTERN
# ifndef lint
# ifdef _DEFINE
# define EXTERN
# ifndef lint
-static char SmailSccsId[] = "@(#)sendmail.h 6.1 %G%";
+static char SmailSccsId[] = "@(#)sendmail.h 6.2 %G%";
# endif lint
# else /* _DEFINE */
# define EXTERN extern
# endif lint
# else /* _DEFINE */
# define EXTERN extern
# define H_TRACE 00200 /* this field contains trace information */
# define H_FROM 00400 /* this is a from-type field */
# define H_VALID 01000 /* this field has a validated value */
# define H_TRACE 00200 /* this field contains trace information */
# define H_FROM 00400 /* this is a from-type field */
# define H_VALID 01000 /* this field has a validated value */
+# define H_RECEIPTTO 02000 /* this field has return receipt info */
+# define H_ERRORSTO 04000 /* this field has error address info */
\f/*
** Envelope structure.
** This structure defines the message itself. There is usually
\f/*
** Envelope structure.
** This structure defines the message itself. There is usually
-static char sccsid[] = "@(#)version.c 6.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)version.c 6.2 (Berkeley) %G%";
-char Version[] = "ALPHA-6.1";
+char Version[] = "ALPHA-6.2";