[Pymilter] Milter as a daemon?

Michael Munger michael at highpoweredhelp.com
Thu Jun 22 18:15:16 EDT 2017


I have written a milter that works when run from the command line
(directly). I was refactoring it to be a python-daemon compatible daemon
for this mail server, but I have hit a snag:

When the daemon starts, the script loads into the daemon context and
runs; however, when it gets to
Milter.runmilter("pythonfilter",socketname,timeout), execution seems to
stop. The service is still running, and the process is alive, but it
doesn't process mail. Additionally, syslog and mail.log shows this
error, which tells me the socket is not listening /reading / writing
correctly:

syslog:
Jun 22 18:13:10 d8 mcdb_mailcache.py: pythonfilter: st_optionneg[0]:
xxfi_negotiate returned 1 (protocol options=0x1fffff, actions=0x1ff)

mail.log:
Jun 22 18:13:10 d8 postfix/smtpd[22936]: warning: milter
local:/var/run/mcdbcache/mcdb.sock: can't read SMFIC_OPTNEG reply packet
header: Success
Jun 22 18:13:10 d8 postfix/smtpd[22936]: warning: milter
local:/var/run/mcdbcache/mcdb.sock: read error in initial handshake

My suspicion is that it's because the socket is dead and the milter code
is not actually running.

I cannot figure out where the next path in the code execution is. I
think we just hand it off to libmilter, but not sure. I am 99.9% done
with this little project, and if I can just get this thing to run as a
daemon, there will be much rejoicing.

...as it is, there is only gnashing of teeth.

Thanks in advance...

-- 
Michael Munger, dCAP, MCPS, MCNPS, MBSS
High Powered Help, Inc.
Microsoft Certified Professional
Microsoft Certified Small Business Specialist
Digium Certified Asterisk Professional
michael at highpoweredhelp.com <mailto:michael at highpoweredhelp.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gathman.org/pipermail/pymilter/attachments/20170622/4dd5ab12/attachment.html>


More information about the Pymilter mailing list