36
by Julian Mehnle
Split off RFC 5617, 6008, 6212 support into separate submodules and introduce the concept of "feature contexts": lists of add-on features to be used in parsing/constructing A-R headers. |
1 |
# coding: utf-8
|
2 |
||
54
by Julian Mehnle
Prepare 0.403 release; update copyright notices with year of 2013. |
3 |
# Copyright © 2012-2013 Julian Mehnle <julian@mehnle.net>,
|
4 |
# Copyright © 2012-2013 Scott Kitterman <scott@kitterman.com>
|
|
36
by Julian Mehnle
Split off RFC 5617, 6008, 6212 support into separate submodules and introduce the concept of "feature contexts": lists of add-on features to be used in parsing/constructing A-R headers. |
5 |
#
|
6 |
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7 |
# you may not use this file except in compliance with the License.
|
|
8 |
# You may obtain a copy of the License at
|
|
9 |
#
|
|
10 |
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11 |
#
|
|
12 |
# Unless required by applicable law or agreed to in writing, software
|
|
13 |
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15 |
# See the License for the specific language governing permissions and
|
|
16 |
# limitations under the License.
|
|
17 |
||
18 |
"""
|
|
19 |
authres extension module for the RFC 5617 DKIM/ADSP authentication method.
|
|
20 |
"""
|
|
21 |
||
22 |
#MODULE = 'authres'
|
|
23 |
||
24 |
__author__ = 'Scott Kitterman, Julian Mehnle' |
|
25 |
__email__ = 'scott@kitterman.com' |
|
69
by Scott Kitterman
Bump version numbers for 0.601. |
26 |
__version__ = '0.601' |
36
by Julian Mehnle
Split off RFC 5617, 6008, 6212 support into separate submodules and introduce the concept of "feature contexts": lists of add-on features to be used in parsing/constructing A-R headers. |
27 |
|
28 |
import authres.core |
|
29 |
from authres.core import make_result_class_properties |
|
30 |
||
31 |
class DKIMADSPAuthenticationResult(authres.core.AuthenticationResult): |
|
32 |
"DKIM ADSP (RFC 5617) result clause of an ``Authentication-Results`` header"
|
|
33 |
||
34 |
METHOD = 'dkim-adsp' |
|
35 |
||
36 |
def __init__(self, version = None, |
|
37 |
result = None, result_comment = None, |
|
38 |
reason = None, reason_comment = None, |
|
39 |
properties = None, |
|
40 |
header_from = None, header_from_comment = None |
|
41 |
):
|
|
42 |
authres.core.AuthenticationResult.__init__(self, self.METHOD, version, |
|
43 |
result, result_comment, reason, reason_comment, properties) |
|
44 |
if header_from: self.header_from = header_from |
|
45 |
if header_from_comment: self.header_from_comment = header_from_comment |
|
46 |
||
47 |
header_from, header_from_comment = make_result_class_properties('header', 'from') |
|
48 |
||
49 |
RESULT_CLASSES = [ |
|
50 |
DKIMADSPAuthenticationResult
|
|
51 |
]
|
|
52 |
||
53 |
# vim:sw=4 sts=4
|