Index: sendmail.h =================================================================== RCS file: /cvs/sendmail/sendmail.h,v retrieving revision 8.919.2.18 diff -u -r8.919.2.18 sendmail.h --- sendmail.h 3 Apr 2003 14:57:20 -0000 8.919.2.18 +++ sendmail.h 12 Apr 2003 02:59:32 -0000 @@ -2534,7 +2534,7 @@ extern void cleanup_shm __P((bool)); #endif /* SM_CONF_SHM */ extern void clrdaemon __P((void)); -extern void collect __P((SM_FILE_T *, bool, HDR **, ENVELOPE *)); +extern void collect __P((SM_FILE_T *, bool, HDR **, ENVELOPE *, bool)); extern time_t convtime __P((char *, int)); extern char **copyplist __P((char **, bool, SM_RPOOL_T *)); extern void copy_class __P((int, int)); Index: collect.c =================================================================== RCS file: /cvs/sendmail/collect.c,v retrieving revision 8.242.2.5 diff -u -r8.242.2.5 collect.c --- collect.c 3 Apr 2003 03:39:50 -0000 8.242.2.5 +++ collect.c 12 Apr 2003 02:59:32 -0000 @@ -263,6 +263,7 @@ ** end of message. ** hdrp -- the location to stash the header. ** e -- the current envelope. +** rsetsize -- reset e_msgsize? ** ** Returns: ** none. @@ -297,11 +298,12 @@ #define MS_DISCARD 3 /* discarding rest of message */ void -collect(fp, smtpmode, hdrp, e) +collect(fp, smtpmode, hdrp, e, rsetsize) SM_FILE_T *fp; bool smtpmode; HDR **hdrp; register ENVELOPE *e; + bool rsetsize; { register SM_FILE_T *volatile df; volatile bool ignrdot; @@ -382,7 +384,8 @@ CollectTimeout = sm_setevent(dbto, collecttimeout, dbto); } - e->e_msgsize = 0; + if (rsetsize) + e->e_msgsize = 0; for (;;) { if (tTd(30, 35)) Index: main.c =================================================================== RCS file: /cvs/sendmail/main.c,v retrieving revision 8.887.2.23 diff -u -r8.887.2.23 main.c --- main.c 3 Apr 2003 23:04:06 -0000 8.887.2.23 +++ main.c 12 Apr 2003 02:59:32 -0000 @@ -2812,7 +2812,7 @@ /* collect body for UUCP return */ if (OpMode != MD_VERIFY) - collect(InChannel, false, NULL, &MainEnvelope); + collect(InChannel, false, NULL, &MainEnvelope, true); finis(true, true, EX_USAGE); /* NOTREACHED */ } @@ -2872,7 +2872,7 @@ MainEnvelope.e_flags &= ~EF_FATALERRS; Errors = 0; buffer_errors(); - collect(InChannel, false, NULL, &MainEnvelope); + collect(InChannel, false, NULL, &MainEnvelope, true); /* header checks failed */ if (Errors > 0) Index: mime.c =================================================================== RCS file: /cvs/sendmail/mime.c,v retrieving revision 8.130 diff -u -r8.130 mime.c --- mime.c 21 May 2002 03:39:34 -0000 8.130 +++ mime.c 12 Apr 2003 02:59:32 -0000 @@ -317,7 +317,7 @@ putline(buf, mci); if (tTd(43, 35)) sm_dprintf(" ...%s\n", buf); - collect(e->e_dfp, false, &hdr, e); + collect(e->e_dfp, false, &hdr, e, false); if (tTd(43, 101)) putline("+++after collect", mci); putheader(mci, hdr, e, flags); @@ -371,7 +371,7 @@ putline("", mci); mci->mci_flags |= MCIF_INMIME; - collect(e->e_dfp, false, &hdr, e); + collect(e->e_dfp, false, &hdr, e, false); if (tTd(43, 101)) putline("+++after collect", mci); putheader(mci, hdr, e, flags); Index: srvrsmtp.c =================================================================== RCS file: /cvs/sendmail/srvrsmtp.c,v retrieving revision 8.829.2.23 diff -u -r8.829.2.23 srvrsmtp.c --- srvrsmtp.c 4 Apr 2003 16:52:14 -0000 8.829.2.23 +++ srvrsmtp.c 12 Apr 2003 02:59:32 -0000 @@ -3064,7 +3064,7 @@ e->e_flags |= EF_NL_NOT_EOL; #endif /* _FFR_ADAPTIVE_EOL */ - collect(InChannel, true, NULL, e); + collect(InChannel, true, NULL, e, true); /* redefine message size */ (void) sm_snprintf(buf, sizeof buf, "%ld", e->e_msgsize);