# py310-spf-engine-2.9.3_1: ipv6 failure



## calyopea (Dec 13, 2022)

Hi there.

context: mail/py-spf-engine (v2.9.3) / freebsd 13.1-RELEASE-p3 amd64 / Python 3.10.9

/usr/local/bin/pyspf-milter fails silently (no stderr message, no traces in var/log/*) at service startup while having ipv6 failure :



```
/usr/local/bin/pyspf-milter --help
Traceback (most recent call last):
  File "/usr/local/bin/pyspf-milter", line 33, in <module>
    sys.exit(load_entry_point('spf-engine==2.9.3', 'console_scripts', 'pyspf-milter')())
  File "/usr/local/bin/pyspf-milter", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.10/site-packages/spf_engine/milter_spf.py", line 34, in <module>
    from Milter.utils import parse_addr, parseaddr
  File "/usr/local/lib/python3.10/site-packages/Milter/utils.py", line 56, in <module>
    from pyip6 import inet_ntop, inet_pton
ModuleNotFoundError: No module named 'pyip6'
```


--  

Seems that py-spf-engine 2.9.3 has not been tested to python beyond 3.8
wich is deprecated as of https://www.python.org/downloads/release/python-380/
Py-Spf-engine, is now at version 3.0.1 ; but even with this latest version, pyip6 seems to fails :


```
/usr/local/bin/python3.10 ./spf-engine-3.0.1/spf_engine/milter_spf.py
Traceback (most recent call last):
  File "/usr/ports/mail/py-spf-engine/work-py310/spf-engine-3.0.1/spf_engine/milter_spf.py", line 34, in <module>
    from Milter.utils import parse_addr, parseaddr
  File "/usr/local/lib/python3.10/site-packages/Milter/utils.py", line 56, in <module>
    from pyip6 import inet_ntop, inet_pton
ModuleNotFoundError: No module named 'pyip6
```

any help would be greatly appreciated...


----------

