~ar-python-hackers/authentication-results-python/trunk

« back to all changes in this revision

Viewing changes to authres/rrvs.py

  • Committer: Scott Kitterman
  • Date: 2011-08-10 20:57:12 UTC
  • Revision ID: scott@kitterman.com-20110810205712-wj9onxv4q5m5pjjv
* Add support files from 0.1 and update for 0.2: setup.py, COPYING, MANIFEST.in, README.
* Add changelog (CHANGES) and add to MANIFEST.in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# coding: utf-8
2
 
 
3
 
# Copyright © 2012-2013 Julian Mehnle <julian@mehnle.net>,
4
 
# Copyright © 2012-2015 Scott Kitterman <scott@kitterman.com>
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 RFC 7293, The Require-Recipient-Valid-Since
20
 
    Header Field and SMTP Service Extension, header field type.
21
 
"""
22
 
 
23
 
#MODULE = 'authres'
24
 
 
25
 
__author__  = 'Scott Kitterman, Julian Mehnle'
26
 
__email__   = 'scott@kitterman.com'
27
 
 
28
 
import authres.core
29
 
from authres.core import make_result_class_properties
30
 
 
31
 
class RRVSAuthenticationResult(authres.core.AuthenticationResult):
32
 
    "RRVS (RFC 7293) result clause of an ``Authentication-Results`` header"
33
 
 
34
 
    METHOD = 'rrvs'
35
 
 
36
 
    def __init__(self, version = None,
37
 
        result               = None,  result_comment               = None,
38
 
        reason               = None,  reason_comment               = None,
39
 
        properties = None,
40
 
        smtp_rrvs            = None,  smtp_rrvs_comment            = None
41
 
    ):
42
 
        authres.core.AuthenticationResult.__init__(self, self.METHOD, version,
43
 
            result, result_comment, reason, reason_comment, properties)
44
 
        if smtp_rrvs:                    self.smtp_rrvs                    = smtp_rrvs
45
 
        if smtp_rrvs_comment:            self.smtp_rrvs_comment            = smtp_rrvs_comment
46
 
 
47
 
    smtp_rrvs,            smtp_rrvs_comment            = make_result_class_properties('smtp', 'rrvs')
48
 
 
49
 
RESULT_CLASSES = [
50
 
    RRVSAuthenticationResult
51
 
]
52
 
 
53
 
# vim:sw=4 sts=4