# include <errno.h>
# include "dlvrmail.h"
-static char SccsId[] = "@(#)collect.c 1.5 %G%";
+static char SccsId[] = "@(#)collect.c 1.6 %G%";
/*
** MAKETEMP -- read & parse message header & make temp file.
** temp buffer can be deallocated.
*/
-char MsgId[MAXNAME];
+char MsgId[MAXNAME]; /* message-id, determined or created */
+long MsgSize; /* size of message in bytes */
char *
maketemp()
if (firstline && !SaveFrom)
continue;
fputs(">", tf);
+ MsgSize++;
}
if (inheader && !isspace(buf[0]))
if (p != NULL && MsgId[0] == '\0')
prescan(p, MsgId, &MsgId[sizeof MsgId - 1], '\0');
}
+ MsgSize += strlen(buf);
fputs(buf, tf);
firstline = FALSE;
if (ferror(tf))
# include <log.h>
# endif LOG
-static char SccsId[] = "@(#)deliver.c 1.10 %G%";
+static char SccsId[] = "@(#)deliver.c 1.11 %G%";
/*
** DELIVER -- Deliver a message to a particular address.
extern char *SysExMsg[];
register int i;
extern int N_SysEx;
+ extern long MsgSize;
+ char buf[30];
i = stat - EX__BASE;
if (i < 0 || i > N_SysEx)
** that.
*/
-# ifdef LOG
if (statmsg == NULL)
- logmsg(LOG_INFO, "%s->%s: error %d", From.q_paddr, To, stat);
- else
- logmsg(LOG_INFO, "%s->%s: %s", From.q_paddr, To, statmsg);
+ {
+ sprintf(buf, "error %d", stat);
+ statmsg = buf;
+ }
+
+# ifdef LOG
+ logmsg(LOG_INFO, "%s->%s: %ld: %s", From.q_paddr, To, MsgSize, statmsg);
# endif LOG
setstat(stat);
return (stat);