On Fri, Apr 16, 2021 at 11:50:12AM -0400, post...@ptld.com wrote: > master.cf: > userpolicy unix - n n - 0 spawn user=mail > argv=/usr/libexec/postfix/per-user-policy
This means one process per connection. So when there are multiple smtpd(8) processes, each one will spawn a separate policy service. The policy service should exit once smtpd(8) disconnects. > My postfix setup it is not reusing connections. Every email spawns a new > instance. And since the script waits for the next request it doesn't > self terminate causing the system to fill up with zombie instances of > the script. I would be very surprised if actual zombie processes were involved. The spawn(8) services waits for its child process, and master(8) waits for its child spawn(8) processes, so if there are zombie processes, they are perhaps because your script forks a subprocess and does not collect its status in a timely manner. I really would not recommend PHP by the way. Try Python, Perl or Ruby. -- Viktor.