Re: Why Postfix always complain "unexpected EOF" with my own tcp_table program?

2013-07-28 Thread John Fawcett
On 28/07/13 08:27, Zhang Huangbin wrote: > 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 a

minor typo in log message

2013-07-28 Thread John Fawcett
I noticed this minor typo in a log message in util/vstring_vstream.c in function vstring_get_null_bound I guess if (bound <= 0) msg_panic("vstring_get_nonl_bound: invalid bound %ld", (long) bound); should be if (bound <= 0) msg_panic("vstring_get_null_bound: invalid boun

Reducing SPAM connections

2013-07-28 Thread Carsten S.
Hi I am receiving a considerable amount of connection from SPAM hosts and I'm starting to wonder if this is normal ? Also, could setting up a spamd help decrease number of connections ? Thanks for any advice. Carsten S. ... ** Detail (10)

Re: minor typo in log message

2013-07-28 Thread Wietse Venema
John Fawcett: > I noticed this minor typo in a log message in util/vstring_vstream.c in > function vstring_get_null_bound > > I guess > > if (bound <= 0) > msg_panic("vstring_get_nonl_bound: invalid bound %ld", (long) > bound); > > should be > > if (bound <= 0) > msg_pan

Re: Why Postfix always complain "unexpected EOF" with my own tcp_table program?

2013-07-28 Thread Wietse Venema
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 "unexp

Re: Reducing SPAM connections

2013-07-28 Thread /dev/rob0
On Sun, Jul 28, 2013 at 02:07:46PM +0200, Carsten S. wrote: > I am receiving a considerable amount of connection from SPAM hosts > and I'm starting to wonder if this is normal ? For many years now, the vast majority of Internet mail traffic is spam and abuse. Yes, it's normal. > Also, could set

Re: Why Postfix always complain "unexpected EOF" with my own tcp_table program?

2013-07-28 Thread Sam Flint
On Jul 28, 2013 7:25 AM, "Wietse Venema" 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 man

Re: Why Postfix always complain "unexpected EOF" with my own tcp_table program?

2013-07-28 Thread Zhang Huangbin
On Sunday, July 28, 2013 at 8:24 PM, Wietse Venema wrote: > > 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. Thanks Wietse, and John. I think this is the root cause, will try a network sniffer later. >

Re: Why Postfix always complain "unexpected EOF" with my own tcp_table program?

2013-07-28 Thread Wietse Venema
Zhang Huangbin: > On Sunday, July 28, 2013 at 8:24 PM, Wietse Venema wrote: > > > 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. > > Thanks Wietse, and John. > I think this is the root cause, will try a n

smtpd_client_restrictions = reject_unauth_pipelining weirdness

2013-07-28 Thread Jeffrey 'jf' Lim
Am I misunderstanding something here, that setting 'smtpd_client_restrictions = reject_unauth_pipelining' should reject a client that sends the EHLO, or HELO before the smtp banner? (http://www.postfix.org/postconf.5.html#reject_unauth_pipelining: 'Reject the request when the client sends SMTP comm

Re: smtpd_client_restrictions = reject_unauth_pipelining weirdness

2013-07-28 Thread Wietse Venema
Jeffrey 'jf' Lim: > Am I misunderstanding something here, that setting > 'smtpd_client_restrictions = reject_unauth_pipelining' should reject a > client that sends the EHLO, or HELO before the smtp banner? > (http://www.postfix.org/postconf.5.html#reject_unauth_pipelining: > 'Reject the request whe

Re: smtpd_client_restrictions = reject_unauth_pipelining weirdness

2013-07-28 Thread Jeffrey 'jf' Lim
On Mon, Jul 29, 2013 at 3:56 AM, Wietse Venema wrote: > Jeffrey 'jf' Lim: >> Am I misunderstanding something here, that setting >> 'smtpd_client_restrictions = reject_unauth_pipelining' should reject a >> client that sends the EHLO, or HELO before the smtp banner? >> (http://www.postfix.org/postco

Re: smtpd_client_restrictions = reject_unauth_pipelining weirdness

2013-07-28 Thread Wietse Venema
Jeffrey 'jf' Lim: > On Mon, Jul 29, 2013 at 3:56 AM, Wietse Venema wrote: > > Jeffrey 'jf' Lim: > >> Am I misunderstanding something here, that setting > >> 'smtpd_client_restrictions = reject_unauth_pipelining' should reject a > >> client that sends the EHLO, or HELO before the smtp banner? > >>

Re: smtpd_client_restrictions = reject_unauth_pipelining weirdness

2013-07-28 Thread Jeffrey 'jf' Lim
On Mon, Jul 29, 2013 at 4:13 AM, Wietse Venema wrote: > Jeffrey 'jf' Lim: >> On Mon, Jul 29, 2013 at 3:56 AM, Wietse Venema wrote: >> > Jeffrey 'jf' Lim: >> >> Am I misunderstanding something here, that setting >> >> 'smtpd_client_restrictions = reject_unauth_pipelining' should reject a >> >> cli

Re: smtpd_client_restrictions = reject_unauth_pipelining weirdness

2013-07-28 Thread Wietse Venema
Jeffrey 'jf' Lim: > > Allow me to repeat my reply above: > > > > Current reject_unauth_pipelining implementations [...] don't reject > > clients that talk before Postfix greets them. > > > > To reject clients that talk before Postfix greets them, use > > Postscreen's pregreet detection feature. > >

Re: smtpd_client_restrictions = reject_unauth_pipelining weirdness

2013-07-28 Thread Jeffrey 'jf' Lim
On Mon, Jul 29, 2013 at 4:51 AM, Wietse Venema wrote: > Jeffrey 'jf' Lim: >> > Allow me to repeat my reply above: >> > >> > Current reject_unauth_pipelining implementations [...] don't reject >> > clients that talk before Postfix greets them. >> > >> > To reject clients that talk before Postfix gr

Re: Why Postfix always complain "unexpected EOF" with my own tcp_table program?

2013-07-28 Thread King Cao
You can enable the debug mode of postfix smtp daemon ( http://www.postfix.org/DEBUG_README.html). Then you can see the request and response which postfix talked with your tcp_table script. PS: From the postfix source code, it seems postfix has not received any response from your tcp_table. Howe