[Pymilter] Signal handling of miltermodule

Stuart D. Gathman stuart at bmsi.com
Tue Dec 13 12:34:07 EST 2005


On Tue, 13 Dec 2005, Sami-Pekka Hallikas wrote:

> Is it possible to use signal handling with milter module?

No.  The libmilter C library eats them.  In some systems, it is
possible to direct signals to a particular thread (e.g. a Python thread).  But
this is not available everywhere.  This is a posix limitation.

> It would be nice to give commands, like reload config
> with SIGHUP, without quiting milter. I've got my handler
> working just great without miltermodule, but when milter
> is active it seems to eat all signals...

We could provide a command program that connects to a socket, like
rndc for named.  Or we could check the timestamp on the config file.

> Is it possible to miltermodule to pass those signals to main thread?

Not portably.  However, if you want to have an alarm in your milter,
you can create a thread that sleeps and then posts a semaphore (all
in Python).

> And thanks for miltermodule anyway, it has been very nice to
> use python to process mails.

Thank you.  I agree.

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the Pymilter mailing list