Compare commits

...

19 Commits

Author SHA1 Message Date
Scott Kitterman a188bd3960 Deleted reference to obsolete syslog target in unit file 2018-05-11 14:31:15 -04:00
Scott Kitterman c91a12f0d1 Documentation updates for 1.0.0 release 2018-05-11 14:29:15 -04:00
Scott Kitterman 286ffbb6c9 Add release date for 0.9.7 to CHANGES 2018-03-19 01:07:52 -04:00
Scott Kitterman ec3252c367 - Minor sysv init improvments 2018-03-15 23:59:03 -04:00
Scott Kitterman a2ff03727d - Put version directly in setup.py and do not import dkimpy_milter to ease
install via pip
2018-03-15 23:44:31 -04:00
Scott Kitterman af4b05e242 - Add missing documentation key to system/dkimpy-milter.service 2018-03-15 20:49:35 -04:00
Scott Kitterman 6509eaad35 - Made sysv init executable 2018-03-15 20:44:16 -04:00
Scott Kitterman f9483fea8c - Added protection for malformed From addresses. If the From does not at
least have an '@' in the address, then the signing domain is not extracted
   and the message will not be signed
2018-03-15 20:42:49 -04:00
Scott Kitterman 7a3a7bfb43 Bump version to 0.9.6 2018-03-12 22:08:07 -04:00
Scott Kitterman 8a0e1bdd97 - Fixed typo in path for fallback location of the config file if one is not
provided
2018-03-12 22:03:45 -04:00
Scott Kitterman e3005aa723 Move OversignHeaders up earlier on TODO. 2018-03-12 22:03:36 -04:00
Scott Kitterman 45d3ba13ca Added more to README about first run with systemd 2018-03-11 00:42:22 -05:00
Scott Kitterman f05309437f Fix merge conflict 2018-03-11 00:28:08 -05:00
Scott Kitterman d4499f6990 Fixed typo in package installation section of README 2018-03-11 00:27:19 -05:00
Scott Kitterman 7d87309f4b Fixed typo in package installation section of README 2018-03-11 00:24:39 -05:00
Scott Kitterman 1d8c309da9 Fix setup.py install locations so they are installed correctly and drop unneeded README changes. 2018-03-10 20:06:21 -05:00
Scott Kitterman 4d5961e4d5 Bump version 2018-03-10 19:52:29 -05:00
Scott Kitterman 59448e8e57 - Add information to README about manually putting init scripts in the right
locations
2018-03-10 19:51:29 -05:00
Scott Kitterman 695de0db14 - Add conf file location to systemd unit file 2018-03-10 19:43:37 -05:00
7 changed files with 66 additions and 28 deletions
+24
View File
@@ -1,3 +1,27 @@
1.0.0 2018-05-11
- Minor documentation updates
- Deleted reference to obsolete syslog target in unit file
0.9.7 2018-03-19
- Made sysv init executable
- Add missing documentation key to system/dkimpy-milter.service
- Put version directly in setup.py and do not import dkimpy_milter to ease
install via pip
- Minor sysv init improvments
0.9.6 2018-03-13
- Fixed typo in package installation section of README
- Added more to README about first run with systemd
- Fixed typo in path for fallback location of the config file if one is not
provided
- Added protection for malformed From addresses. If the From does not at
least have an '@' in the address, then the signing domain is not extracted
and the message will not be signed
0.9.5.1 2018-03-10
- Add conf file location to systemd unit file
- Fix setup.py install locations so they are installed correctly
0.9.5 2018-03-10 0.9.5 2018-03-10
- Beta 1 (updated Alpha -> Beta warning in README and trove classifiers) - Beta 1 (updated Alpha -> Beta warning in README and trove classifiers)
- Added support for MacroList option - Added support for MacroList option
+25 -12
View File
@@ -1,6 +1,5 @@
This is a DKIM signing and verification milter. In theory it works with both This is a DKIM signing and verification milter. In theory it has been tested
Postfix and Sendmail, but the author has zero experience with Sendmail, so with both Postfix and Sendmail.
reports of success/failure with Sendmail and patches are welcom.
The configuration file is designed to be compatible with OpenDKIM, but only The configuration file is designed to be compatible with OpenDKIM, but only
a subset of OpenDKIM options are supported. If an unsupported option is a subset of OpenDKIM options are supported. If an unsupported option is
@@ -16,8 +15,8 @@ python setup.py install --single-version-externally-managed --record=/dev/null
For users of Debian Stable (Debian 9, Codename Squueze), all dependencies are For users of Debian Stable (Debian 9, Codename Squueze), all dependencies are
available in either the main or backports repositories: available in either the main or backports repositories:
[sudo] apt install python-milter python-nacl pthon-ipaddress python-dnspython [sudo] apt install python-milter python-nacl python-ipaddress python-dnspython
[sudo] apt install -t squeeze-backports python-authres python-dkim [sudo] apt install -t stretch-backports python-authres python-dkim
The preferred method of installation is from PyPi using pip (if distribution The preferred method of installation is from PyPi using pip (if distribution
packages are not available): packages are not available):
@@ -25,7 +24,10 @@ packages are not available):
[sudo] pip install dkimpy_milter [sudo] pip install dkimpy_milter
Using pip will cause required packages to be installed via easy_install if they Using pip will cause required packages to be installed via easy_install if they
have not been previously installed. have not been previously installed. Because pymilter and PyNaCl are compiled
Python extensions, the system will need appropriate development packages and
an C compiler. Alternately, install these dependencies from dsitribution/OS
packages and then pip install dkimpy_milter.
The milter will work with either pydns (DNS) or dnspython (dns), preferring The milter will work with either pydns (DNS) or dnspython (dns), preferring
dnspython is both are available. The dkimpy DKIM module also works with dnspython is both are available. The dkimpy DKIM module also works with
@@ -48,6 +50,14 @@ As an example, using the default dkimpy-user on Debian, the command would be:
Since /var/run or /run is sometimes on a tempfs, if the PID file directory is Since /var/run or /run is sometimes on a tempfs, if the PID file directory is
missing, the milter will create it on startup. missing, the milter will create it on startup.
To start dkimpy-milter with systemd for the first time, you will need to take
the following steps:
[sudo] systemctl daemon-reload
[sudo] systemctl enable dkimpy-milter
[sudo] systemctl start dkimpy-milter
[sudo] systemctl status dkimpy-milter (to verify it started correctly)
As with all milters, dkimpy-milter needs to be integrated with your MTA of As with all milters, dkimpy-milter needs to be integrated with your MTA of
choice (Sendmail or Postfix). choice (Sendmail or Postfix).
@@ -118,10 +128,13 @@ MacroListVerify daemon_name|VERIFYING
The python DKIM library, dkimpy, requires the entire message being signed or The python DKIM library, dkimpy, requires the entire message being signed or
verified to be in memory, so dkimpy-milter does not write messages out to a temp verified to be in memory, so dkimpy-milter does not write messages out to a
file. This may impact performance on low-memory systems. temp file. This may impact performance on low-memory systems.
This is an beta grade release to support interoperability testing with Ed25519 This is an initial production release to support interoperability testing with
signatures sufficient functionality for basic use. The documented Ed25519 signatures sufficient functionality for basic use. The documented
functionality has been implemented and at least partially tested. It is free functionality has been implemented and at generally partially tested. It is
of known major defects, but is not fully tested in a variety of environments. free of known defects, but is not fully tested in a variety of environments.
DKIM Ed25519 signatures are still in development, but the specification is
technically stable. Version 1.0.0 supports draft-ietf-dcrup-dkim-crypto-09.
+1 -1
View File
@@ -53,6 +53,7 @@ ClockDrift (requires dkimpy change)
DNSTimeout (requires dkmpy change) DNSTimeout (requires dkmpy change)
MilterDebug MilterDebug
MinimumKeyBits MinimumKeyBits
OversignHeaders (may require dkimpy changes)
PeerList PeerList
SignatureAlgorithm SignatureAlgorithm
@@ -83,7 +84,6 @@ On-InternalError
On-KeyNotFound On-KeyNotFound
On-NoSignature On-NoSignature
On-SignatureError On-SignatureError
OversignHeaders
RemoveARAll RemoveARAll
RemoveARFrom RemoveARFrom
RemoveOldSignatures RemoveOldSignatures
+5 -2
View File
@@ -39,7 +39,7 @@ from dkimpy_milter.util import read_keyfile
from dkimpy_milter.util import own_socketfile from dkimpy_milter.util import own_socketfile
from dkimpy_milter.util import fold from dkimpy_milter.util import fold
__version__ = "0.9.5" __version__ = "1.0.0"
FWS = re.compile(r'\r?\n[ \t]+') FWS = re.compile(r'\r?\n[ \t]+')
@@ -130,7 +130,10 @@ class dkimMilter(Milter.Base):
self.has_dkim += 1 self.has_dkim += 1
if lname == 'from': if lname == 'from':
fname, self.author = parseaddr(val) fname, self.author = parseaddr(val)
try:
self.fdomain = self.author.split('@')[1] self.fdomain = self.author.split('@')[1]
except IndexError as er:
self.fdomain = '' # self.author was not a proper email address
if (milterconfig.get('Syslog') and if (milterconfig.get('Syslog') and
milterconfig.get('debugLevel') >= 1): milterconfig.get('debugLevel') >= 1):
syslog.syslog("{0}: {1}".format(name, val)) syslog.syslog("{0}: {1}".format(name, val))
@@ -324,7 +327,7 @@ def main():
global privateEd25519 global privateEd25519
privateRSA = False privateRSA = False
privateEd25519 = False privateEd25519 = False
configFile = '/etc/dkimpy-milter.conf' configFile = '/usr/local/etc/dkimpy-milter.conf'
if len(sys.argv) > 1: if len(sys.argv) > 1:
if sys.argv[1] in ('-?', '--help', '-h'): if sys.argv[1] in ('-?', '--help', '-h'):
print('usage: dkimpy-milter [<configfilename>]') print('usage: dkimpy-milter [<configfilename>]')
+4 -5
View File
@@ -18,7 +18,6 @@
from setuptools import setup from setuptools import setup
import os import os
import dkimpy_milter
description = "Domain Keys Identified Mail (DKIM) signing/verifying milter for Postfix/Sendmail." description = "Domain Keys Identified Mail (DKIM) signing/verifying milter for Postfix/Sendmail."
@@ -31,14 +30,14 @@ except ImportError: # If PyDNS is not installed, prefer dnspython
setup( setup(
name='dkimpy-milter', name='dkimpy-milter',
version=dkimpy_milter.__version__, version='1.0.0',
author='Scott Kitterman', author='Scott Kitterman',
author_email='scott@kitterman.com', author_email='scott@kitterman.com',
url='https://launchpad.net/dkimpy-milter', url='https://launchpad.net/dkimpy-milter',
description=description, description=description,
download_url = "https://pypi.python.org/pypi/dkimpy-milter", download_url = "https://pypi.python.org/pypi/dkimpy-milter",
classifiers= [ classifiers= [
'Development Status :: 4 - Beta', 'Development Status :: 5 - Production/Stable',
'Environment :: No Input/Output (Daemon)', 'Environment :: No Input/Output (Daemon)',
'Intended Audience :: System Administrators', 'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License (GPL)', 'License :: OSI Approved :: GNU General Public License (GPL)',
@@ -59,8 +58,8 @@ setup(
data_files=[(os.path.join('share', 'man', 'man5'), data_files=[(os.path.join('share', 'man', 'man5'),
['man/dkimpy-milter.conf.5']), (os.path.join('share', 'man', 'man8'), ['man/dkimpy-milter.conf.5']), (os.path.join('share', 'man', 'man8'),
['man/dkimpy-milter.8']), ('etc', ['etc/dkimpy-milter.conf']), ['man/dkimpy-milter.8']), ('etc', ['etc/dkimpy-milter.conf']),
(os.path.join('/lib', 'systemd', 'system'), (os.path.join('lib', 'systemd', 'system'),
['system/dkimpy-milter.service']),(os.path.join('/etc', 'init.d'), ['system/dkimpy-milter.service']),(os.path.join('etc', 'init.d'),
['system/dkimpy-milter'])], ['system/dkimpy-milter'])],
zip_safe = False, zip_safe = False,
**kw **kw
Regular → Executable
+3 -5
View File
@@ -13,8 +13,6 @@
# Provides: dkim-milter dkim-milter-python dkimpy-milter # Provides: dkim-milter dkim-milter-python dkimpy-milter
# Required-Start: $remote_fs $syslog $network $time # Required-Start: $remote_fs $syslog $network $time
# Required-Stop: $remote_fs $syslog $network # Required-Stop: $remote_fs $syslog $network
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: 0 1 6 # Default-Stop: 0 1 6
# Short-Description: dkimpy-milter # Short-Description: dkimpy-milter
@@ -31,7 +29,7 @@ NAME=dkimpy-milter
DESC="Python DKIM Milter" DESC="Python DKIM Milter"
USER=dkimpy-milter USER=dkimpy-milter
GROUP=dkimpy-milter GROUP=dkimpy-milter
SOCKET=$RUNDIR/dkimpy-milter.pid SOCKET=$RUNDIR/dkimpy-milter.sock
test -x $DAEMON || exit 0 test -x $DAEMON || exit 0
@@ -70,8 +68,8 @@ case "$1" in
fi fi
fi fi
start-stop-daemon --start --chuid $USER --background --quiet --pidfile \ start-stop-daemon --start --quiet --pidfile $RUNDIR/$NAME.pid --startas \
$RUNDIR/$NAME.pid --exec $DAEMON $sysconfdir/$NAME.conf $DAEMON $sysconfdir/$NAME.conf --name $NAME --test > /dev/null \
echo "$NAME." echo "$NAME."
;; ;;
stop) stop)
+3 -2
View File
@@ -1,11 +1,12 @@
[Unit] [Unit]
Description=DKIMpy Milter Description=DKIMpy Milter
After=syslog.target network.target Documentation=man:dkimpy-milter(8) man:dkimpy-milter.conf(5)
After=network.target
[Service] [Service]
Type=simple Type=simple
PIDFile=/var/run/dkimpy-milter/dkimpy-milter.pid PIDFile=/var/run/dkimpy-milter/dkimpy-milter.pid
ExecStart=/usr/local/bin/dkimpy-milter ExecStart=/usr/local/bin/dkimpy-milter /usr/local/etc/dkimpy-milter.conf
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target