[Dovecot] LTMP Proxy fails when backend server connection refused
Jack Bates
jbates at brightok.net
Fri Sep 28 23:12:44 EEST 2012
On 9/28/2012 12:44 PM, Jack Bates wrote:
> On 9/28/2012 11:37 AM, Jack Bates wrote:
>> On 9/27/2012 3:30 PM, Jack Bates wrote:
>>> Version: 2.1.9
>>>
>>> Connecting directly to the proxy server on the LMTP port, issue
>>> lhlo, mail from, rcpt to, data. After the . closing of data, it just
>>> hangs there. The logs on the proxy server show:
>>
> Further testing shows that the connection fails are normally handled
> after the DATA block. It works perfectly if you only fail one
> recipient. If all recipients are failed, the code locks up instead of
> telling the client that they are all failed.
>
> Now to find out where between lmtp_client_fail() and some other part
> of the code, we aren't treating it right. :(
It appears that the callbacks for the proxy connections are handled in
the ioloop stuff. If you have at least one valid proxy session open,
then proxy_try_finish will get called and all the replies are sent. The
problem appears to be if all backend proxy sessions are bad (ie single
recipient, proxy server down), there is nothing for ioloop to callback
to. proxy_try_finish will never get called, and we end up locking up at
epoll_wait as there are no events for us to process.
Code needs to be written to handle the special case of us not having any
proxy callbacks as they are all bad.
Jack
More information about the dovecot
mailing list