On Sun, 28 Sep 2008, John Peacock wrote: > [EMAIL PROTECTED] wrote: > > Is there a way to not accept any more connections, let the current > > connections finish, and then restart qpsmtpd? Something has to be better > > than my current heavy hammer approach. > > I use 'svc -t' instead of HUP, because it will kill all of the connections > associated with the master process. And I do it whenever I feel like it. > > The SMTP protocol was designed specifically to be very tolerant of > disruptions; > all legitimate servers will happily resend an e-mail because of a snipped > connection (though at their internal retry interval). It is really not > possible > to lose legitimate e-mail by randomly stopping your SMTP server to reload > plugins. On the other hand, most zombie SMTP clients can't handle anything > out > of the ordinary, so that's once piece of spam you probably won't receive...
Thank-you for your response. This I am aware of, and is not a problem. My concern with killing all of the connections is that I have some internal processes that (I think) will occasionally corrupt log and data files when this happens. Perl's flock() is not reliable enough (all processes accessing these files were using flock() ), and I found the most often accessed files were being corrupted very often. Many processes are after the same file. I wrote a file access arbitrator daemon (based on IO::Select and IO::Socket), which has proven much more robust, but is still not adequate. I have a couple more ideas for improving it, but if I can reduce the killed processes (that is, letting my internal processes finish what they start), then that will help in the meantime. On further examination/testing, I think "svc -h' may be what I want (for now), and I should just avoid killing the current connections and let them finish. The only problem is that it can often take a while to drain the queue.