Wietse Venema:
> Rafael Azevedo:
> > Hi there,
> >
> > We're testing a custom filter for PHP using spawn services.
> >
> > During our tests, we noticed that every time that we invoke the
> > check_policy_service through docker container it takes about 1 second to
> > run the filter script.
>
> The mistake is to EXIT the PHP script. It should be written as a loop:
What you see is the one-second delay built into the Postfix SMTP
daemon, when it discovers that the policy server (your PHP script)
has closed the connection. This delay is a safety feature that avoids
server meltdown when policy server crashes.
So don't EXIT your script, instead run it in a loop until it reads EOF.
Wietse