On 3-Dec-07, at 2:45 PM, Niklas Therning wrote:
I'm writing a qpsmtpd plugin for our custom spam filter. The plugin
reads a couple of custom configuration files at startup. The config
files may change at any time and I would like my plugin to pick up
those changes automatically.
Now, I've tried to periodically check the timestamp of the files in
my plugin and reload them if necessary but never got that to work.
I've posted on this list before about that problem but got no
replies (http://www.nntp.perl.org/group/perl.qpsmtpd/2007/11/
msg7501.html). Now I'm trying to come up with an alternative solution.
Is there any way I could tell a running qpsmtpd-forkserver instance
(version 0.32) to reload its plugins without having to restart the
process? I guess it would work to restart it entirely but it seems
to me that it would be better to just have it reload the plugins so
that any running connections don't have to be killed.
I'd be happy to upgrade to a newer qpsmtpd version if that is
required or use a different daemon instead of forkserver if that
would solve my problem.
Under forkserver, config information should be loaded by each child
anyway.
Or do you mean reloading the entire plugin? That's another matter...
And something I'm working on as a background task.