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

« back to all changes in this revision

Viewing changes to authres/core.py

  • Committer: Scott Kitterman
  • Date: 2016-12-11 05:52:42 UTC
  • Revision ID: scott@kitterman.com-20161211055242-molq08jlvoa07tj0
  + Add support for RFC 7601 use of SMTP auth with the mailfrom property

Show diffs side-by-side

added added

removed removed

Lines of Context:
391
391
        result               = None,  result_comment               = None,
392
392
        reason               = None,  reason_comment               = None,
393
393
        properties = None,
394
 
        smtp_auth            = None,  smtp_auth_comment            = None
 
394
        # Added in RFC 7601, SMTP Auth method can refer to either the identity
 
395
        # confirmed in the auth command or the identity in auth parameter of
 
396
        # the SMTP Mail command, so we cover either option.
 
397
        smtp_auth            = None,  smtp_auth_comment            = None,
 
398
        smtp_mailfrom        = None,  smtp_mailfrom_comment        = None,
395
399
    ):
396
400
        AuthenticationResult.__init__(self, self.METHOD, version,
397
401
            result, result_comment, reason, reason_comment, properties)
398
402
        if smtp_auth:                    self.smtp_auth                    = smtp_auth
399
403
        if smtp_auth_comment:            self.smtp_auth_comment            = smtp_auth_comment
 
404
        if smtp_mailfrom:                self.smtp_mailfrom                = smtp_mailfrom
 
405
        if smtp_mailfrom_comment:        self.smtp_mailfrom_comment        = smtp_mailfrom_comment
400
406
 
 
407
    smtp_mailfrom,        smtp_mailfrom_comment        = make_result_class_properties('smtp', 'mailfrom')
401
408
    smtp_auth,            smtp_auth_comment            = make_result_class_properties('smtp', 'auth')
402
409
 
403
410
# AuthenticationResultsHeader class