[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in sm still truncates messages on AIX (New bug)




zmailer version: 2.99.48.p2
AIX version 4.1.5

I've seen this:

May 23 15:16:10 uria sm[15970]: 24601-26122 readalready=32768, bodyoffset=641, 
sizeestimate=54091

When logging in sm.c appendlet():

#ifndef HAVE_MMAP
	/* can we use cache of message body data */
	if (convertmode == _CONVERT_NONE && readalready != 0) {
	syslog(LOG_DEBUG, "%s readalready=%d, bodyoffset=%d, sizeestimate=%d", 
	dp->msgfile, readalready, dp->msgbodyoffset, dp->msgsizeestimate);
	lastch = let_buffer[readalready-1];
	  if (writebuf(mp, fp, let_buffer, readalready) != readalready)
	    return EX_IOERR;
	  if (lastch != '\n')
	    if (writebuf(mp, fp, "\n", 1) != 1)
	      return EX_IOERR;
	  return EX_OK;
	}

Result is (of course) only about 32k of the message being delivered.
I'm trying setting readalready=0 first in appendlet now and will try
it over the weekend. Seems something weird is happening with the
read()'s... Could perhaps check for readalready==32k and reset then
but...


-- 
E-Mail: Martin.Wendel@ITS.UU.SE        Snail-Mail:  ITS
Tel:    018 18 77 80                                Box 887
Int:    +46 18 18 77 80                             S-751 08 Uppsala
Fax:    +46 18 18 79 10                             Sweden
http://www.uu.se/Internservice/ue/personal/MartinWendel.html