Emmanuel Dreyfus wrote:
> On Tue, Dec 20, 2005 at 10:36:12AM +0100, Michael Menge wrote:
>>I havent done any signal handling in my own programs but there are some
>>lines in the code which make me think milter-greylist should dump it's db.
>
> signal handling is forbidden by the milter API. We have a callback on exit,
> but AFAIK that does not work if you get a deadly signal.
Is there a SIGNAL which is not "deadly" and will call the atexit callback?
>
>>After SIGTERM the program should execute exit() by default, but there
>>where no syslog entries form final_dump so it did not get called.
>
> On a fatal signal, the kernel exit the program, by calling the exit system
> call in the kernel, but as the libc exit function in userland is not called,
> the exit hook cannot be run. At least that's how I understand the thing.
>
> If we want to remote control milter-greylist dumping, we need to have
> a socket control. The easiest way is to reuse the MX sync protocol and
> add a dump command. That would be easy.
>
This may be a work around, but you need a telnet connection to tell
milter-greylist to dump his db
and then you have to kill the milter with SIGTERM. After it has written
his db and before it has got new entries in his db.
With about 180.000 eMails per Day like oure site this may be a problem.
If you add a dump and exit funktion to MX sync there could be some
security problems.
--
--------------------------------------------------------------------------------
M.Menge Tel.: (49) 7071/29-70316
Universitaet Tuebingen Fax.: (49) 7071/29-5912
Zentrum fuer Datenverarbeitung mail: menge@...-tuebingen.de
Waechterstrasse 76
72074 Tuebingen