Viktor Dukhovni: > > > On Feb 3, 2017, at 11:43 PM, Jaime Hablutzel Egoavil <hablutz...@gmail.com> > > wrote: > > > > Does this PHP script handle multiple policy lookup requests? > > The smtpd(8) service expects a policy service to handle multiple > > blank-line terminated requests. > > > > Multiple blank-line terminated requests in only one TCP request?. > > TCP is streaming protocol, so it does not really make sense to ask > about "one TCP request". However, multiple policy requests are sent > over a single TCP connection. > > > If so, under which circumstances?. > > Always. Your policy service should loop processing requests until > its client (smtpd(8)) closes the connection.
It's a request-reply protocol over TCP. Postfix sends one request, the policy server sends one reply, and this repeats until Postfix closes the connection. See http://www.postfix.org/SMTPD_POLICY_README.html