294504Re: Why Postfix always complain "unexpected EOF" with my own tcp_table program?
- Jul 28 6:54 AM
On Jul 28, 2013 7:25 AM, "Wietse Venema" <wietse@...> wrote:
> Zhang Huangbin:
> > Dear all,
> > I wrote a simple daemon service in Python, it's used in Postfix transport_maps like this:
> > transport_maps = tcp:127.0.0.1:1234
> > It always returns '200 my_transport\n' as described in Postfix manual page tcp_table(5), but Postfix always complains "unexpected EOF" like below:
> > Jul 27 22:51:53 d7 postfix/trivial-rewrite: warning: read TCP map reply from 127.0.0.1:1234: unexpected EOF (Success)
> > This Python daemon server uses 'asynchat' module, and return '200 my_transport\n' with 'async_chat.push()' method like this:
> > self.push('200 my_transport\n')
> > Any idea why Postfix always complain "unexpected EOF"?
> 1) Use a network sniffer to see what Python actually sends. You may
> assume that your program sends \n, but Postfix does not receive \n.
> 2) Unrelated to this bug: closing the connection after one request
> is inefficient.
But is it the fact that he closes the connection? Keep in mind that any time a network connection is closed it sends EOF. Could it be that Postfix wants to keep a constant connection?
- << Previous post in topic Next post in topic >>