> > Another question about policy service run under postfix spawn--- > > Using spawn is not mandatory you know.
Yes, I have been considering alternate to run a external daemon instead. According to this thread, I undersatnd if database connections are concern, choice to use external daemon could be best. > You could run a small pool > (1 or more) of processes each of which handles multiple concurrent > smtpd connections. Sorry, sort of beginner programmer question, to be clear what you say, concurrent connections would be handled by a policy server by spawning a new thread when a new connection is made? I can see this could solve problem if all threads see the same DB connection. On other hand, I'm not sure if there would be any concurrency issues multiple threads using same DB connection. > So long as the policy services don't block for > an unpredicably long time while handling smtpd(8) requests, they > should be able to support more than one smtpd(8) connection. > Each such service would have to use asynchronous requests to perform > any "remote" DNS lookups, or any other actions with a potential to > block for a long time (seconds rather than milliseconds). OK, thatnk you for the good advice.