[Python-modules-commits] [authres] 01/06: Import authres_0.900.orig.tar.gz
Scott Kitterman
kitterman at moszumanska.debian.org
Sun Dec 11 07:01:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
kitterman pushed a commit to branch master
in repository authres.
commit a9c3e2e2b2a3b762151eb21d425048b0201071c4
Author: Scott Kitterman <scott at kitterman.com>
Date: Sun Dec 11 01:38:02 2016 -0500
Import authres_0.900.orig.tar.gz
---
CHANGES | 6 +++++-
PKG-INFO | 4 ++--
README | 27 +++++++++++++++++----------
authres/__init__.py | 6 +++---
authres/__main__.py | 6 +++---
authres/core.py | 15 +++++++++++----
authres/dkim_adsp.py | 2 +-
authres/dkim_b.py | 2 +-
authres/dmarc.py | 2 +-
authres/rrvs.py | 2 +-
authres/smime.py | 2 +-
authres/tests | 29 +++++++++++++++++++++++++++++
authres/vbr.py | 2 +-
setup.py | 4 ++--
14 files changed, 78 insertions(+), 31 deletions(-)
diff --git a/CHANGES b/CHANGES
index b66b96f..90f8078 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,7 +4,11 @@
# ! = Changed something significant, or removed a feature
# * = Fixed a bug, or made a minor improvement
---- 0.800 (2015-03009 22:40 -0400))
+--- 0.900 (2016-12-11)
+ + Add support for RFC 7601 use of SMTP auth with the mailfrom property
+ * Updated README and docstring reference to refer to RFC 7601
+
+--- 0.800 (2015-03-09 22:40 -0400))
+ Add support for RFC 7293, The Require-Recipient-Valid-Since Header Field
and SMTP Service Extension, header field types
diff --git a/PKG-INFO b/PKG-INFO
index e1a7579..6610fe7 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,13 +1,13 @@
Metadata-Version: 1.1
Name: authres
-Version: 0.800
+Version: 0.900
Summary: authres - Authentication Results Header Module
Home-page: https://launchpad.net/authentication-results-python
Author: Julian Mehnle, Scott Kitterman
Author-email: julian at mehnle.net
License: Apache 2.0
Description: UNKNOWN
-Keywords: dkim,spf,dmarc,email,authentication,rfc5451,rfc7001
+Keywords: dkim,spf,dmarc,email,authentication,rfc5451,rfc7001,rfc7601
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: No Input/Output (Daemon)
diff --git a/README b/README
index c38f736..6805a0c 100644
--- a/README
+++ b/README
@@ -1,6 +1,7 @@
This module (authres) is designed to provide support for RFC 5451/7001,
-originally http://tools.ietf.org/html/rfc5451 and currently
-http://tools.ietf.org/html/rfc7001, processing in Python.
+originally http://tools.ietf.org/html/rfc5451 (and then
+http://tools.ietf.org/html/rfc7001) and currently
+http://tools.ietf.org/html/rfc7601, processing in Python.
It also supports Authentication Results extensions:
@@ -13,16 +14,21 @@ RFC 7281 Authentication-Results Registration for S/MIME
RFC 7293, The Require-Recipient-Valid-Since Header Field
and SMTP Service Extension, header field types
-import authres only provides the RFC 5451/7001 types. Individual additions can be
-imported by name, import authres.dkim_b, authres.dkim_adsp, authres.vbr,
-authres.dmarc, and authres.smime. To use all the features, the feature context
-authres.all_features() is provided.
+
+RFC 7410, A Property Types Registry for the Authentication-Results Header
+Field, added the possibility for new ptypes to be created, but so far none
+have been registered.
+
+import authres only provides the RFC 5451/7001/7601 types. Individual
+additions can be imported by name, import authres.dkim_b, authres.dkim_adsp,
+authres.vbr, authres.dmarc, and authres.smime. To use all the features, the
+feature context authres.all_features() is provided.
Header folding and unfolding is the responsibility of the calling application.
-Between docstrings and RFC 5451/7001 the API should be reasonably clear, but the
-docstrings are still a work in progress. Additional examples are available in
-the file authres/tests. The API is completely reworked from version 0.1.
+Between docstrings and RFC 5451/7001/7601 the API should be reasonably clear,
+but the docstrings are still a work in progress. Additional examples are
+available in the file authres/tests.
SPF authentication results can relate to either the HELO identity or the Mail
From. When creating header fields with SPF results, only set the identity
@@ -30,7 +36,8 @@ used to evaluate the SPF result that's reported. You can use multiple objects
to report both in a single header field. See the example in the tests file.
This package requires python2.6 or later (including python3). It has been
-tested with python2.6, python2.7, python3.2, python3.3, and python3.4.
+tested with python2.6, python2.7, python3.2, python3.3, python3.4, and
+python3.5.
To execute doctests, run the module as main: python -m authres
diff --git a/authres/__init__.py b/authres/__init__.py
index e06e0f4..75bdae0 100644
--- a/authres/__init__.py
+++ b/authres/__init__.py
@@ -17,8 +17,8 @@
"""
Package for parsing ``Authentication-Results`` headers as defined in RFC
-5451/7001. Optional support for authentication methods defined in RFCs 5617,
-6008, 6212, and 7281.
+5451/7001/7601. Optional support for authentication methods defined in RFCs
+5617, 6008, 6212, and 7281.
Examples:
RFC 5451 B.2
@@ -94,7 +94,7 @@ MODULE = 'authres'
__author__ = 'Julian Mehnle, Scott Kitterman'
__email__ = 'julian at mehnle.net'
-__version__ = '0.800'
+__version__ = '0.900'
import authres.core
diff --git a/authres/__main__.py b/authres/__main__.py
index c998c6d..49424b9 100644
--- a/authres/__main__.py
+++ b/authres/__main__.py
@@ -17,13 +17,13 @@
"""
Package for parsing ``Authentication-Results`` headers as defined in RFC
-5451/7001. Optional support for authentication methods defined in RFCs 5617,
-6008, 6212, and 7281.
+5451/7001/7601. Optional support for authentication methods defined in RFCs
+5617, 6008, 6212, and 7281.
"""
__author__ = 'Julian Mehnle, Scott Kitterman'
__email__ = 'scott at kitterman.com'
-__version__ = '0.800'
+__version__ = '0.900'
def _test():
import doctest
diff --git a/authres/core.py b/authres/core.py
index 5afcfd5..afca844 100644
--- a/authres/core.py
+++ b/authres/core.py
@@ -16,15 +16,15 @@
# limitations under the License.
"""
-Module for parsing ``Authentication-Results`` headers as defined in RFC 5451
-and 7001.
+Module for parsing ``Authentication-Results`` headers as defined in RFC 5451,
+7001, and 7601.
"""
#MODULE = 'authres'
__author__ = 'Julian Mehnle, Scott Kitterman'
__email__ = 'julian at mehnle.net'
-__version__ = '0.800'
+__version__ = '0.900'
import re
@@ -391,13 +391,20 @@ class SMTPAUTHAuthenticationResult(AuthenticationResult):
result = None, result_comment = None,
reason = None, reason_comment = None,
properties = None,
- smtp_auth = None, smtp_auth_comment = None
+ # Added in RFC 7601, SMTP Auth method can refer to either the identity
+ # confirmed in the auth command or the identity in auth parameter of
+ # the SMTP Mail command, so we cover either option.
+ smtp_auth = None, smtp_auth_comment = None,
+ smtp_mailfrom = None, smtp_mailfrom_comment = None,
):
AuthenticationResult.__init__(self, self.METHOD, version,
result, result_comment, reason, reason_comment, properties)
if smtp_auth: self.smtp_auth = smtp_auth
if smtp_auth_comment: self.smtp_auth_comment = smtp_auth_comment
+ if smtp_mailfrom: self.smtp_mailfrom = smtp_mailfrom
+ if smtp_mailfrom_comment: self.smtp_mailfrom_comment = smtp_mailfrom_comment
+ smtp_mailfrom, smtp_mailfrom_comment = make_result_class_properties('smtp', 'mailfrom')
smtp_auth, smtp_auth_comment = make_result_class_properties('smtp', 'auth')
# AuthenticationResultsHeader class
diff --git a/authres/dkim_adsp.py b/authres/dkim_adsp.py
index 002b443..5c2ef79 100644
--- a/authres/dkim_adsp.py
+++ b/authres/dkim_adsp.py
@@ -23,7 +23,7 @@ authres extension module for the RFC 5617 DKIM/ADSP authentication method.
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.800'
+__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/authres/dkim_b.py b/authres/dkim_b.py
index 2278c7d..261127f 100644
--- a/authres/dkim_b.py
+++ b/authres/dkim_b.py
@@ -23,7 +23,7 @@ authres extension module for RFC 6008 DKIM signature identification (header.b).
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.800'
+__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/authres/dmarc.py b/authres/dmarc.py
index 66b02d8..fd02582 100644
--- a/authres/dmarc.py
+++ b/authres/dmarc.py
@@ -24,7 +24,7 @@ authentication method.
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.800'
+__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/authres/rrvs.py b/authres/rrvs.py
index 7b76057..e054890 100644
--- a/authres/rrvs.py
+++ b/authres/rrvs.py
@@ -24,7 +24,7 @@ authres extension module for RFC 7293, The Require-Recipient-Valid-Since
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.800'
+__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/authres/smime.py b/authres/smime.py
index 72ea424..863d0e8 100644
--- a/authres/smime.py
+++ b/authres/smime.py
@@ -24,7 +24,7 @@ for S/MIME Signature Verification authentication method.
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.800'
+__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/authres/tests b/authres/tests
index 0df7f98..5ed56fd 100644
--- a/authres/tests
+++ b/authres/tests
@@ -603,4 +603,33 @@ Syntax error: Expected end of text at: :748:100:40::2:2 (mout0.freenet.de); spf.
>>> str(authres.AuthenticationResultsHeader(authserv_id='example.net',results = [rrvs_fail]))
"Authentication-Results: example.net; rrvs=fail (Mail box expired.) smtp.rrvs=user at example.com (These are not the droids you're looking for.)"
+# New for RFC 7601 SMTP Auth Mail From
+
+>>> import authres
+>>> arobj = authres.AuthenticationResultsHeader.parse('Authentication-Results: example.com; auth=pass smtp.mailfrom=sender at example.net')
+>>> str(arobj.authserv_id)
+'example.com'
+>>> str(arobj.results[0])
+'auth=pass smtp.mailfrom=sender at example.net'
+>>> str(arobj.results[0].method)
+'auth'
+>>> str(arobj.results[0].result)
+'pass'
+>>> str(arobj.results[0].smtp_mailfrom)
+'sender at example.net'
+>>> str(arobj.results[0].properties[0].type)
+'smtp'
+>>> str(arobj.results[0].properties[0].name)
+'mailfrom'
+>>> str(arobj.results[0].properties[0].value)
+'sender at example.net'
+
+# Create header field with RFC 7601 SMTP Auth Mail From
+>>> import authres
+>>> mfrom_auth = authres.SMTPAUTHAuthenticationResult(result = 'pass',
+... smtp_mailfrom = 'mailauth at example.net')
+>>> str(authres.AuthenticationResultsHeader(authserv_id = 'example.com',
+... results = [mfrom_auth]))
+'Authentication-Results: example.com; auth=pass smtp.mailfrom=mailauth at example.net'
+
# vim:sw=4 sts=4
diff --git a/authres/vbr.py b/authres/vbr.py
index cc43868..87bddb3 100644
--- a/authres/vbr.py
+++ b/authres/vbr.py
@@ -24,7 +24,7 @@ authentication method.
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.800'
+__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/setup.py b/setup.py
index 72975e0..6e84ef2 100755
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@
from distutils.core import setup
setup(name='authres',
- version='0.800',
+ version='0.900',
description='authres - Authentication Results Header Module',
author='Julian Mehnle, Scott Kitterman',
author_email='julian at mehnle.net',
@@ -24,7 +24,7 @@ setup(name='authres',
license='Apache 2.0',
packages = ['authres',],
package_data = {'authres': ['tests']},
- keywords = ['dkim', 'spf', 'dmarc', 'email', 'authentication', 'rfc5451', 'rfc7001'],
+ keywords = ['dkim', 'spf', 'dmarc', 'email', 'authentication', 'rfc5451', 'rfc7001', 'rfc7601'],
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: No Input/Output (Daemon)',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/authres.git
More information about the Python-modules-commits
mailing list