Runtime error of pyspf-milter with failing to import 'own_socketfile'

Asked by Yasuhiro KIMURA

I'm maintainer of FreeBSD pypolicyd-spf port (mail/postfix-policyd-spf-python).
Recently I found it was superseded by this project and am trying to update the port now.
But if I try to start pyspf-milter following error happens.

root@maybe[2047]# service pyspf-milter onestart
Starting pyspf_milter.
Traceback (most recent call last):
  File "/usr/local/bin/pyspf-milter", line 11, in <module>
    load_entry_point('spf-engine==2.9.2', 'console_scripts', 'pyspf-milter')()
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.8/site-packages/spf_engine/milter_spf.py", line 40, in <module>
    from spf_engine.util import own_socketfile
ImportError: cannot import name 'own_socketfile' from 'spf_engine.util' (/usr/local/lib/python3.8/site-packages/spf_engine/util.py)
/usr/local/etc/rc.d/pyspf-milter: WARNING: failed to start pyspf_milter
root@maybe[2048]#

According to setup.py spf-engine requires following packages.

* pyspf
* pymilter
* authres

But all of them are already installed.

So are any other packages required? Or are there version requirements to these packages?

Best Regards.

Question information

Language:
English Edit question
Status:
Solved
For:
SPF Engine Edit question
Assignee:
No assignee Edit question
Solved by:
Yasuhiro KIMURA
Solved:
Last query:
Last reply:
Revision history for this message
Yasuhiro KIMURA (yasuhirokimura) said :
#1

I found this problem is already reported as Bug #1856391. And it is fixed by removing line 40 of milter_spf.py.

Revision history for this message
Scott Kitterman (kitterman) said :
#2

This is fixed in the latest release.