Bug 1208876

Summary: Exception when setting configuration option 'Header_Type = AR'
Product: [Fedora] Fedora EPEL Reporter: George Notaras <gnot>
Component: pypolicyd-spfAssignee: Bojan Smojver <bojan>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: bojan, martin, sklist
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-04 20:38:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description George Notaras 2015-04-03 15:48:10 UTC
Description of problem:

The following exception occurs if 'Header_type' is set to AR in the configuration file.

Header_Type = AR

Apr  3 15:42:23 examplesrv policyd-spf[4333]: Traceback (most recent call last):
Apr  3 15:42:23 examplesrv policyd-spf[4333]: File "/usr/libexec/postfix/policyd-spf", line 680, in <module>
Apr  3 15:42:23 examplesrv policyd-spf[4333]: instance_dict, configData, peruser)
Apr  3 15:42:23 examplesrv policyd-spf[4333]: File "/usr/libexec/postfix/policyd-spf", line 449, in _spfcheck
Apr  3 15:42:23 examplesrv policyd-spf[4333]: header += str(authres.AuthenticationResultsHeader(authserv_id = configData.get('Authserv_Id'),
Apr  3 15:42:23 examplesrv policyd-spf[4333]: NameError: global name 'authres' is not defined

Version-Release number of selected component (if applicable):

pypolicyd-spf-1.3.1-2.el7.noarch

Comment 1 Scott Kitterman 2018-01-08 22:11:30 UTC
This is caused by the authres module not being installed.  In version 2.0.2 I added a specific error message to explain the situation better.  The module is optional because it's only used if the header field type is set to "AR", which is not the default.

Comment 2 Bojan Smojver 2022-11-04 20:38:16 UTC
Not planning on bumping up to spf-engine for EPEL7.