Re: Policy server problem: connection timed out or connection reset by peer

2016-08-19 Thread Zhang Huangbin
> On Aug 19, 2016, at 11:56 AM, Bill Cole > wrote: > > So, is this policy server listening on port 1234 or port ? > I'll assume this is just inconsistent (and pointless) obfuscation... Just a pointless obfuscation. Sorry about this. > As Wietse noted more tersely, the only way to handle c

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-19 Thread Zhang Huangbin
> On Aug 19, 2016, at 10:10 AM, Richard James Salts > wrote: > > It sounds like similar behaviour to what postfix is logging, so at least you > have a way to replicate it now. Try checking netstat -antp | grep : and > see what state all the tcp sockets are in. If you're seeing a lot in SY

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-19 Thread Benning, Markus
On 2016-08-17 17:34, Zhang Huangbin wrote: I got a problem with my own Postfix policy server (written in Python). Postfix usually works fine with it, but sometimes it raised error like this: Aug 17 08:32:52 mail1 postfix/smtpd[24298]: warning: problem talking to server 127.0.0.1:1234: Connection

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-18 Thread Bill Cole
On 18 Aug 2016, at 21:32, Zhang Huangbin wrote: Dear Bill, Thanks very much for helping. On Aug 19, 2016, at 4:17 AM, Bill Cole wrote: What do you mean "run" the policy service? It's a python program. Which must be running in order for it to be listening for connections. Likely mechani

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-18 Thread Richard James Salts
On 19/08/16 11:32, Zhang Huangbin wrote: Dear Bill, Thanks very much for helping. On Aug 19, 2016, at 4:17 AM, Bill Cole wrote: What do you mean "run" the policy service? It's a python program. Which must be running in order for it to be listening for connections. Likely mechanisms would

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-18 Thread Zhang Huangbin
Dear Bill, Thanks very much for helping. > On Aug 19, 2016, at 4:17 AM, Bill Cole > wrote: > >> What do you mean "run" the policy service? It's a python program. > > Which must be running in order for it to be listening for connections. > Likely mechanisms would be via a SysV init script in /

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-18 Thread Bill Cole
On 18 Aug 2016, at 11:14, Zhang Huangbin wrote: On Aug 18, 2016, at 10:02 PM, Wietse Venema wrote: What are you using to "run" the policy service? Try using "telnet 127.0.0.1 9998" or "nc 127.0.0.1 9998" to test it. Thanks Wietse. :) What do you mean "run" the policy service? It's a pyth

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-18 Thread Wietse Venema
Zhang Huangbin: > > > On Aug 18, 2016, at 10:02 PM, Wietse Venema wrote: > > > > What are you using to "run" the policy service? Try using "telnet > > 127.0.0.1 9998" or "nc 127.0.0.1 9998" to test it. > > Thanks Wietse. :) > > What do you mean "run" the policy service? It's a python program.

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-18 Thread Zhang Huangbin
> On Aug 18, 2016, at 10:02 PM, Wietse Venema wrote: > > What are you using to "run" the policy service? Try using "telnet > 127.0.0.1 9998" or "nc 127.0.0.1 9998" to test it. Thanks Wietse. :) What do you mean "run" the policy service? It's a python program. > In particular, what happens whe

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-18 Thread Wietse Venema
Zhang Huangbin: [ Charset windows-1252 converted... ] > > > On Aug 18, 2016, at 8:46 AM, Noel Jones wrote: > > > > There was an example on the link I sent earlier. > > > > # main.cf > > 127.0.0.1:1234_time_limit = 3600 > > Seems this setting is not ok for me: The example in Postfix doc > does

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-17 Thread Bill Cole
On 17 Aug 2016, at 11:34, Zhang Huangbin wrote: Dear all, I got a problem with my own Postfix policy server (written in Python). Postfix usually works fine with it, but sometimes it raised error like this: Aug 17 08:32:52 mail1 postfix/smtpd[24298]: warning: problem talking to server 127.0

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-17 Thread Richard James Salts
On 18/08/16 10:46, Noel Jones wrote: On 8/17/2016 7:26 PM, Zhang Huangbin wrote: On Aug 18, 2016, at 12:17 AM, Noel Jones wrote: Have you defined a time limit as described in http://www.postfix.org/SMTPD_POLICY_README.html#client_config The default time limit of 1000s may be too short. My pol

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-17 Thread Zhang Huangbin
> On Aug 18, 2016, at 8:46 AM, Noel Jones wrote: > > There was an example on the link I sent earlier. > > # main.cf > 127.0.0.1:1234_time_limit = 3600 Seems this setting is not ok for me: The example in Postfix doc does have a transport (127.0.0.1:9998) defined in master.cf, but i don't have

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-17 Thread Zhang Huangbin
> On Aug 18, 2016, at 8:46 AM, Noel Jones wrote: > > # main.cf > 127.0.0.1:1234_time_limit = 3600 "postfix check" reported "unused parameter: 127.0.0.0:1234_time_limit=3600s", i thought it was illegal parameter. I added this one and restarted Postfix, let's see whether or not it fixes my issu

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-17 Thread Noel Jones
On 8/17/2016 7:26 PM, Zhang Huangbin wrote: > >> On Aug 18, 2016, at 12:17 AM, Noel Jones wrote: >> >> Have you defined a time limit as described in >> http://www.postfix.org/SMTPD_POLICY_README.html#client_config >> The default time limit of 1000s may be too short. > > My policy server is a ine

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-17 Thread Zhang Huangbin
> On Aug 18, 2016, at 12:17 AM, Noel Jones wrote: > > Have you defined a time limit as described in > http://www.postfix.org/SMTPD_POLICY_README.html#client_config > The default time limit of 1000s may be too short. My policy server is a inet server (check_policy_service inet:127.0.0.1:1234),

Re: Policy server problem: connection timed out or connection reset by peer

2016-08-17 Thread Noel Jones
On 8/17/2016 10:34 AM, Zhang Huangbin wrote: > Dear all, > > I got a problem with my own Postfix policy server (written in Python). > Postfix usually works fine with it, but sometimes it raised error like this: > > Aug 17 08:32:52 mail1 postfix/smtpd[24298]: warning: problem talking to > server

Policy server problem: connection timed out or connection reset by peer

2016-08-17 Thread Zhang Huangbin
Dear all, I got a problem with my own Postfix policy server (written in Python). Postfix usually works fine with it, but sometimes it raised error like this: Aug 17 08:32:52 mail1 postfix/smtpd[24298]: warning: problem talking to server 127.0.0.1:1234: Connection reset by peer Aug 17 08:34:05 m