On Fri, Apr 16, 2021 at 01:22:25PM -0400, post...@ptld.com wrote: > On 04-16-2021 1:04 pm, Wietse Venema wrote: > > As Viktor noted, each smtpd(8) process makes its own connection to > > a policy service. Then, an smtpd(8) process will reuse its own > > policy service connection, not a connection that belongs to a > > different smtpd(8) process. > > Okay, if im understanding, the expected behavior is it is supposed to be > one new spawn for each client connection/event?
No. One per smtpd(8) process. Each smtpd(8) process may handle multiple client connections (up to $max_use). > So the answer im looking for is my script should self terminate when > it detects the client (postfix) disconnect? Of course. Since it is spawned for a single connection, once that connection is closed, it couldn't possibly get any further requests. This is not the same as handling one request, you still need a loop to handle one or requests until EOF. -- Viktor.