By default, avoid creating a PIDFile.
PIDFiles are racy and potentially dangerous. Modern system
supervision systems don't need them, because they manage the process
groups directly.
If the configuration file doesn't specify a PidFile, dkimpy-milter
shouldn't try to create one.
We want to be able to select the default for Socket differently in the
future.
This change augments the API for dkimpy_milter.util.own_socketfile()
by adding an optional sockname argument. This is a
backward-compatible change. If we aren't committed to API stability
for this function, we could make a more invasive change that would
probably be a more reasonable API going forward, but this is probably
good enough.
This covers conversion of the whole project to python3, *except* for
the strings/bytes distinction in __init__.py, which i'm leaving for a
second commit.
The changes in this commit are intended to be relatively
uncontroversial, so that the following commit contains the tricky
bits.
If a string-based configuation entry had whitespace in it, it would be
reassembled via a round-trip through the python interpreter, resulting
in a line like this:
PidFile /home/dkimpy-milter/pid file
produces a string like "['/home/dkimpy-milter/pid', 'file']", which is
clearly wrong.
I don't want to encourage people to use paths or other strings with
whitespace in them, but if we're going to fail on them we should be
failing explicitly, not doing a weird transformation that will just
break.
This is concretely useful for the DNSOverride mechanism, which is
where i ran into the problem when trying to set up testing that could
work without setting up an emulated DNS system.
Without this fix, a verifying dkimpy-milter that has no explicit
AuthservID produces the following crashing behavior as it tries to
create the authres header:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/Milter/__init__.py", line 772, in <lambda>
milter.set_eom_callback(lambda ctx: ctx.getpriv().eom())
File "…/dkimpy_milter/__init__.py", line 199, in eom
h = fold(str(h))
File "/usr/lib/python2.7/dist-packages/authres/core.py", line 476, in __str__
return ''.join((self.HEADER_FIELD_NAME, ': ', self.header_value()))
File "/usr/lib/python2.7/dist-packages/authres/core.py", line 496, in header_value
return ''.join(strs)
- Implemented support for SyslogFacility option
- Initial dataset support: csl
- Only sign if mail from from a domain in Domain and only if Mode is not
verfication only
- Fixed Canonicalize option
- Move exception hook from config into util
- Make config data conversion work for all used types
- Make syslog work (still need to make it only work if specified)