Commit Graph

64 Commits

Author SHA1 Message Date
Daniel Kahn Gillmor bb44f36519 When Socket is absolute path, do not strip leading /
This appears to just be an untested codepath.
2019-02-21 19:21:38 -05:00
Daniel Kahn Gillmor 9e11b75ec3 Avoid AttributeError on simple connection and disconnection
Without this patch, this simple script for miltertest:

----
conn = mt.connect("unix:milter.sock")
if conn == nil then
  error "mt.connect() failed"
end
if mt.conninfo(conn, nil, "unspec") ~= nil then
  error "mt.conninfo() failed"
end
if mt.getreply(conn) ~= SMFIR_CONTINUE then
     error "mt.conninfo() unexpected reply"
end
mt.disconnect(conn)
----

Produces the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/Milter/__init__.py", line 702, in connect_callback
    return m.connect(hostname,family,hostaddr)
  File "/usr/lib/python2.7/dist-packages/Milter/__init__.py", line 173, in wrapper
    rc = func(self,*args)
  File "/home/dkg/src/dkimpy-milter/dkimpy-milter/dkimpy_milter/__init__.py", line 64, in connect
    self.receiver = self.getsymval('j').strip()
AttributeError: 'NoneType' object has no attribute 'strip'
2019-02-21 19:21:38 -05:00
Scott Kitterman 51c8fdcb6c Bump version to 1.0.1, update TODO, set release date 2019-02-11 15:14:11 -05:00
Scott Kitterman aa4dadc22f * Reorder milter start and dropping privileges so permissions on Unix socket
are correct (LP: 1797720)
2019-02-11 15:09:34 -05:00
Scott Kitterman b1abbf9d61 - Make domain checks case insensitive for determining if signing should be
done (LP: #1815311)
2019-02-11 14:55:35 -05:00
Scott Kitterman f38fed3bee Rip out unused whichbd module in preparation for python3 port 2019-02-11 03:16:53 -05:00
Scott Kitterman c91a12f0d1 Documentation updates for 1.0.0 release 2018-05-11 14:29:15 -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 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 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 86eb152f93 Enhanced signature verification logging to provide more useful information, added signing success logging, and more PEP 8 2018-03-10 19:02:37 -05:00
Scott Kitterman 126966e110 - Update Authentication Results result comment not to mention key size for
ed25519 signatures, since it's irrelevant
2018-03-10 18:18:01 -05:00
Scott Kitterman 1843ca6244 - Added support for SyslogSuccess option
- Rationalized logging to be much less verbose unless SyslogSuccess or
   debugLevel are set - default is generally start/stop/errors only
2018-03-10 16:06:22 -05:00
Scott Kitterman f9358d594c Delete unused import 2018-03-10 15:36:40 -05:00
Scott Kitterman a8aa422b03 Post pep-8 cleanup 2018-03-10 15:34:56 -05:00
Scott Kitterman 70606ac58c pep8 and a few other cleanups 2018-03-10 02:45:35 -05:00
Scott Kitterman 6348bdcdc7 Cleanup, indentation, pyflakes 2018-03-10 00:52:45 -05:00
Scott Kitterman fd39384e78 Fix for DiagnosticDirectory 2018-03-09 23:49:57 -05:00
Scott Kitterman efeabd19d3 Added support for MacroListVerify option 2018-03-09 22:39:55 -05:00
Scott Kitterman a9b8a44bfc Add support for MacroList option 2018-03-09 21:53:58 -05:00
Scott Kitterman e795db7c69 Start 0.9.5: Beta 1 (updated Alpha -> Beta warning in README and trove classifiers) 2018-03-09 18:08:42 -05:00
Scott Kitterman 36ff60d8d3 - Added support for DiagnosticDirectory and updated dkimpy-milter specifics in
dkimpy-milter.conf.5
2018-03-09 17:10:48 -05:00
Scott Kitterman 4769bde19c - Added support for InternalHosts option (ipaddress and either dns (dnspython)
or pydns (DNS) modules are now required)
2018-03-09 16:29:49 -05:00
Scott Kitterman e6021dd960 Add dnsplug.py so either DNS or dns can be used for host/domain based dataset processing 2018-03-09 13:51:36 -05:00
Scott Kitterman df19aa081e - Added support for AuthservID option 2018-03-04 15:15:37 -05:00
Scott Kitterman fb32a8fe0b Implement detection of type db datasets, but not used yet 2018-03-04 13:56:06 -05:00
A. Schulze 3e57876361 - Make RSA signatures in dkimpy-milter optional, so dkimpy-milter can be
added after an existing DKIM signing application to add an Ed25519
   signature (Thanks to A. Schulze for the patch)
2018-03-04 13:33:32 -05:00
Scott Kitterman 7683fa7187 - Fixed a bug where dkim fail might be reported as pass when verifying
multiple signatures and a previous signature had passed
2018-03-04 13:18:06 -05:00
Scott Kitterman c01c04b83f - Fix header folding to use \n only to align with milter protocol
requirements
2018-03-03 14:39:20 -05:00
Scott Kitterman ebfb0b5fc3 Fix crash when verifying if domain for signing was not set 2018-03-03 10:42:59 -05:00
Scott Kitterman 48a44916e7 Create PID directory if it is missing 2018-03-03 01:45:15 -05:00
Scott Kitterman 5a81886a5e Start 0.9.4 2018-03-03 00:59:43 -05:00
Scott Kitterman 5e2cff5e5d - Fold added authres header fields
- Fix pidfile permissions
 - Fix socket setup sequence so Unix sockets work
2018-03-02 16:14:46 -05:00
Scott Kitterman 5886edda42 Fixup file dataset support 2018-03-02 15:04:19 -05:00
Scott Kitterman e4a17d7be6 Ignore errors parsing broken authres header fields 2018-03-02 15:02:31 -05:00
Scott Kitterman ced16fda72 Fixup csl dataset and initial (untested) file dataset 2018-02-25 15:57:41 -05:00
Scott Kitterman 02ad614657 Bump version for next release 2018-02-19 17:32:55 -05:00
Scott Kitterman 98e5c17858 - Implemented support for Canonicalization option
- 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
2018-02-19 13:31:28 -05:00
Scott Kitterman a71d3b5d99 Impelment SyslogFacility, enhance README. 2018-02-19 02:11:13 -05:00
Scott Kitterman 51464bd7f8 Add support for Canonicalization option 2018-02-18 00:56:02 -05:00
Scott Kitterman 716752e2fb Move version definition to dkim_milter/__init__.py and improve setup.py requirements 2018-02-17 15:08:25 -05:00
Scott Kitterman bd46a7bcc7 Add header 'a' to AR field 2018-02-17 03:52:55 -05:00
Scott Kitterman 7b8fccf801 Bug fixes for RSA/Ed25519 signing (now works), syslog fixes, update TODO verification status 2018-02-17 02:10:21 -05:00
Scott Kitterman 246bdba859 Read key files in before dropping priviledges 2018-02-16 22:09:05 -05:00
Scott Kitterman 5fbe139faa Implemented signing both RSA and Ed25519, updated TODO. Required creation of SelectorEd25519 option. 2018-02-16 18:10:51 -05:00
Scott Kitterman 2399ee0010 Implement and test PidFile option. Update TODO 2018-02-16 17:12:41 -05:00
Scott Kitterman 3e032ad6ad Add initial support for Syslog option 2018-02-16 14:11:48 -05:00