Ilja Booij <[EMAIL PROTECTED]> said:

[snip]

> > 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.
> > 
> > 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 :)

The LMTP code is based off of a snapshot of the POP3 code. IIRC, the original
ci_write functions made some assumptions about IMAP's ci structure, which
isn't used directly by the LMTP code.

..and having just updated my CVS tree, looks like this has been well taken
care of!

> > 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.

The LMTP code has a genetic relationship with the POP3 code and is only more
distantly related to the rather complex IMAP code. You can easily learn how
both the POP3 and LMTP code work by reading them side by side.

> Ilja
> 
--

Reply via email to