[Pymilter] poll() returned exception for socket, abort

Stuart D Gathman stuart at bmsi.com
Sun Jan 13 15:10:54 EST 2013


On Jan 13, Tom Hendrikx transmitted in part:

>> I'm currently adding daemon support to my milter, using a simplified
>> version of the routine as documented in PEP3143 and implemented in
>> http://pypi.python.org/pypi/python-daemon/
>>
>> For some reason, the milter aborts after processing the single
>> connection. The first connection is handled properly, and a few seconds

Can you post your main code?

Things I can think of:

  o libmilter insists on handling signals, you probably don't want
    daemon to do so.  Making sure you daemonize *before* making any
    milter calls (like register, main) would probably work.  I would
    disable all signal stuff in daemon.

  o The milter setup (register, main) would again need to be after
    daemon.  Closing the socket to sendmail that libmilter opened would be bad.

  o I can't think how you would manage it, other than call daemon from a
    callback, but it should not be called for every connection.

  o Maybe daemon is changing a signal that libmilter depends on?



More information about the Pymilter mailing list