I looked into it, and changed to "usedmem -= 2" because we only want to clip 
off the very final .\r\n, and that last \n is only written on the other side 
of the if block. 
 
Now if we can just pin down the possible remaining nul issues... 
 
Thanks! 
Aaron 
 
 
Blake Mitchell <[EMAIL PROTECTED]> said: 
 
>  
It's working well for me too :-D 
> here's the changes I made: 
>  
> cvs server: Diffing . 
> Index: pipe.c 
> =================================================================== 
> RCS file: /cvsroot-dbmail/dbmail/pipe.c,v 
> retrieving revision 1.116 
> diff -r1.116 pipe.c 
> 467c467 
> <                        && ringbuf[(ringpos - 5) % RING_SIZE] == '\r') { 
> --- 
>  >                        /* && ringbuf[(ringpos - 5) % RING_SIZE] ==  
> '\r' */) { 
> 470,471c470,471 
> <                               if (usedmem > 4) 
> <                                       usedmem -= 4; 
> --- 
>  >                               if (usedmem > 3) 
>  >                                       usedmem -= 3; 
>  
> I've also attached a lmtpd log from the session. 
>  
> I can see from the log that the message now has a trailing carriage  
> return, but not a trailing newline. I guess it doesn't matter too much  
> either way, but what is the preferred behavior, should there be a \r\n  
> on the end of a message? Maybe I shouldn't have messed with usedmem... 
>  
> Thanks Aaron!! 
> Blake 
>  
> Aaron Stone wrote: 
>  
> >I just tested this on my own system, and it seems to be working.  
> >Let me know if it does the trick for you, too!  
> >  
> >""Aaron Stone"" <[EMAIL PROTECTED]> said:  
> >  
> >   
> > 
> >>  
> >>I think that I understand the problem now. If you wouldn't mind getting  
> >>into the source code for a moment, take a look in pipe.c, around line 
470.   
> >>Comment out the line...   
> >>   
> >>       && ringbuf[(ringpos - 5) % RING_SIZE] == '\r') {   
> >>   
> >>and add the ") {" to the line above it. Recompile. See what happens!   
> >>   
> >>What I suspect is that when a message arrives in \n-only format, that 
the   
> >>single-period-on-a-line line looks like this in the stream:   
> >>   
> >>First line\nSecond line\nLast line\n.\r\n   
> >>   
> >>So rather than looking for "\r\n.\r\n", it should be looking for "\n. 
> >>     
> >> 
> >\r\n".   
> >   
> > 
> >>   
> >>Thanks,   
> >>Aaron   
> >>   
> >>   
> >>Blake Mitchell <[EMAIL PROTECTED]> said:   
> >>   
> >>     
> >> 
> >>>   
> >>>Those are only single periods BTW, they were transformed to doubles in    
> >>>transit. I've switched back to CVS from May 2, so my mail is only    
> >>>delivered once.   
> >>>   
> >>>Blake Mitchell wrote:   
> >>>   
> >>>       
> >>> 
> >>>>  
> >>>>Still no good I'm afraid. Now messages get repeatedly delivered, with    
> >>>>things like this on the end:   
> >>>>  
> >>>>_______________________________________________   
> >>>>Dbmail-dev mailing list   
> >>>>Dbmail-dev@dbmail.org   
> >>>>http://twister.fastxs.net/mailman/listinfo/dbmail-dev   
> >>>>..   
> >>>>QUIT   
> >>>>  
> >>>>or   
> >>>>  
> >>>>_______________________________________________   
> >>>>Dbmail-dev mailing list   
> >>>>Dbmail-dev@dbmail.org   
> >>>>http://twister.fastxs.net/mailman/listinfo/dbmail-dev   
> >>>>..   
> >>>>RSET   
> >>>>  
> >>>>  
> >>>>Aaron Stone wrote:   
> >>>>  
> >>>>         
> >>>> 
> >>>>>Definitely my fault :-\ Now fixed in CVS.     
> >>>>>I added a small (six char) ring buffer in store_message_temp in    
> >>>>>pipe.c that, when it is filled with \r\n.\r\n, indicates an end of    
> >>>>>message. All five of those characters are then stripped from the end    
> >>>>>of the storage block. This might not be correct behaviour; it's    
> >>>>>possible that only the final .\r\n should be stripped... I'm not    
> >>>>>clear on this bit of the RFC.     
> >>>>>Aaron     
> >>>>>           
> >>>>> 
> >>>>  
> >>>>_______________________________________________   
> >>>>Dbmail-dev mailing list   
> >>>>Dbmail-dev@dbmail.org   
> >>>>http://twister.fastxs.net/mailman/listinfo/dbmail-dev   
> >>>>.   
> >>>>         
> >>>> 
> >>>   
> >>>   
> >>>_______________________________________________   
> >>>Dbmail-dev mailing list   
> >>>Dbmail-dev@dbmail.org   
> >>>http://twister.fastxs.net/mailman/listinfo/dbmail-dev   
> >>>   
> >>>       
> >>> 
> >>   
> >>   
> >>   
> >>--    
> >>   
> >>   
> >>_______________________________________________  
> >>Dbmail-dev mailing list  
> >>Dbmail-dev@dbmail.org  
> >>http://twister.fastxs.net/mailman/listinfo/dbmail-dev  
> >>  
> >>     
> >> 
> >  
> >  
> >  
> >--   
> >  
> >  
> >_______________________________________________ 
> >Dbmail-dev mailing list 
> >Dbmail-dev@dbmail.org 
> >http://twister.fastxs.net/mailman/listinfo/dbmail-dev 
> >. 
> >   
> > 
>  
>  
>  
 
 
 
--  
 
 

Reply via email to