On Wed, 2004-06-16 at 15:33, Paul J Stevens wrote: > Ilja Booij wrote: > > > I wonder how this happens. I haven't been able to reproduce this. Paul > > (J Stevens), you've done some stuff in IMAP wrt a similar problem, do > > you have any clue? The client in this case is Postfix/lmtp > > Ilja, > > Basically, dbmail kept writing to ci->tx even though the client had started > closing the socket. This in turn > triggered a RSET in the client which was pretty much ignored by dbmail. > Perhaps something has triggered the > postfix end to close, but the dbmail-lmtpd doesn't detect the state of the > socket properly. > > A quick glance at the lmtp.c code shows that the ci_write wrapper isn't used > there, and the state of ci->tx > isn't checked at all before a write. Naughty. > > I guess ci_write can safely be moved from imaputils.c to clientinfo.h which > is probably the logical place > anyway. After that all write actions on the socket should use this wrapper > and return on error.
Good idea. I'll have a shot at it :) > That fixed all socket problems in the imap code anyway. > > I'm not familiar with lmtp (yet), and haven't got the time to dive in now. > Hope this helps though. thanks for the quick answer. Ilja
