I just made some changes: // Just as an example smtpd_policy_service_request_limit = 5
In the policy server: bytes = recv( sock_c, buff, MAXBUF, 0 ); printf( "1 Received %d bytes...\n", bytes ); bytes = recv( sock_c, buff, MAXBUF, 0 ); printf( "2 Received %d bytes...\n", bytes ); Just for the hack of it. Then I send 2 e-mails. I would expect to not get blocked on the recv call, since there will be a second request according to you. The result: 1 Received 576 bytes... And then the server blocks on the second receive. So even if you use one connection, really, it's not happening like you said. I must be missing something here, I don't understand why people say you can have multiple policy requests at once. If this would have been possible, I'm sure Postfix would have wanted a little more than just an actin= and would also want to have some identification number to identify what answer belongs to what request... But again, please let me know where I go wrong, I really appreciate some help here. -----Original Message----- From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] On Behalf Of Noel Jones Sent: vrijdag 26 februari 2016 18:51 To: postfix-users@postfix.org Subject: Re: Postfix & check_policyd_service no concurrent connections? On 2/26/2016 11:13 AM, Saskia van Schagen wrote: > Not quite true, one can set smtpd_policy_service_request_limit to 1 > and have a new connection for each request. Yes, you can force a new connection for each request, which will reduce performance considerably. This should only be used if the policy service is incapable of processing multiple requests over the same connection. > But even if you don't and you keep using the same connection, Postfix > is still not giving the next request before receiving the answer of > the previous request. One smtpd process --> one policy service connection. The connection stays open as long as the smtpd process runs. A busy server may have thousands of active smtpd processes, each with its own connection to the policy service. > This is not strange, if you talk over the same pipe, Postfix could > never know to what request the answer belongs to, cause we're talking > over 1 pipeline / socket. So with this design, it's not strange that > Postfix wants an answer before sending the next request. One socket with thousands of long-running connections to it. This is a common high performance design. -- Noel Jones