Discussion:
Unable to run policyd-spf on FreeBSD-11.1
(too old to reply)
James B. Byrne via freebsd-questions
2018-06-18 19:11:50 UTC
Permalink
I have installed:

py36-postfix-policyd-spf-python-2.0.2 Pure Python Postfix policy
daemon for SPF checking

Which installed the following dependencies:

py36-authres-1.1.0 Python module for RFC 5451
Authentication-Results headers
py36-py3dns-3.1.1 Python 3 DNS library
py36-pyspf-2.0.12_4 SPF (Sender Policy Framework)
implemented in Python
py36-setuptools-39.0.1 Python packages installer
python36-3.6.5 Interpreted object-oriented programming
language

However, when I test policyd-spf I get this:

/usr/local/bin/policyd-spf
Traceback (most recent call last):
File "/usr/local/bin/policyd-spf", line 39, in <module>
import spf
ImportError: bad magic number in 'spf': b'\x03\xf3\r\n'

Checking /usr/local/bin/ reveals this:

ll /usr/local/bin/*spf*
-rwxr-xr-x 1 root wheel 48277 May 27 01:09
/usr/local/bin/policyd-spf lrwxr-xr-x 1 root wheel 37 May 26
12:50
/usr/local/bin/spf.py-3.6 -> ../lib/python3.6/site-packages/spf.py
-r--r--r-- 1 root wheel 60140 Apr 10 2017 /usr/local/bin/spf.pyc
-rwxr-xr-x 1 root wheel 22998 May 10 05:36
/usr/local/bin/spfquery.pl -rwxr-xr-x 1 root wheel 4705 May 26
12:50
/usr/local/bin/spfquery.py-3.6

I have made no alterations to the installed packages. What else has to
be done to get policyd-spf to run?
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne mailto:***@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
Yasuhiro KIMURA
2018-06-18 22:02:04 UTC
Permalink
Hello James,
I'm maintainer of mail/postfix-policyd-spf-python.

From: "James B. Byrne via freebsd-questions" <freebsd-***@freebsd.org>
Subject: Unable to run policyd-spf on FreeBSD-11.1
Date: Mon, 18 Jun 2018 15:11:50 -0400
Post by James B. Byrne via freebsd-questions
/usr/local/bin/policyd-spf
File "/usr/local/bin/policyd-spf", line 39, in <module>
import spf
ImportError: bad magic number in 'spf': b'\x03\xf3\r\n'
Would you please provide me results of following commands?

1. ls -l /usr/local/lib/python3.6/site-packages/spf.py
2. sha256 /usr/local/lib/python3.6/site-packages/spf.py

Best Regards.

---
Yasuhiro KIMURA
Yasuhiro KIMURA
2018-06-18 22:29:00 UTC
Permalink
From: Yasuhiro KIMURA <***@utahime.org>
Subject: Re: Unable to run policyd-spf on FreeBSD-11.1
Date: Tue, 19 Jun 2018 07:02:04 +0900 (JST)
Post by Yasuhiro KIMURA
Would you please provide me results of following commands?
1. ls -l /usr/local/lib/python3.6/site-packages/spf.py
2. sha256 /usr/local/lib/python3.6/site-packages/spf.py
Please forgive me requesting results of following commands too.

3. ls -l /usr/local/lib/python3.6/site-packages/__pycache__/spf.cpython-36.*
4. sha256 /usr/local/lib/python3.6/site-packages/__pycache__/spf.cpython-36.*

Best Regards.

---
Yasuhiro KIMURA

Loading...