Thanks - it looks interesting. One question about the plugins - how do you maintain a database connection persistent for a worker process? The docs only say:
in reply to Re: Simple (but robust) email server (receiver)
in thread Simple (but robust) email server (receiver)
There is no restriction, what you can do in “register()”, but creating database connections and reuse them later in the process may not be a good idea. This initialisation happens before any “fork()” is done. Therefore the file handle will be shared by all qpsmtpd processes and the database will probably be confused if several different queries arrive on the same file handle at the same time (and you may get the wrong answer, if any).
So is there a way to initialize the connection just after the fork - and before any request is served?