On Sun, Apr 2, 2023 at 11:35 AM Guillermo Hernandez (Oldno7) via Mailman-users <mailman-users@mailman3.org> wrote:
As you could have read yesterday, I had problems upgrading to the last versions of mailman3 related apps. The lmtp runner stopped after upgrade and showed and error in aiosmtpd package.
the O.S. version running may servers is FreeBSD 13.1-p7
That was in a mailman3 server with few lists and traffic. O did the upgrade today in the server that has many lists and hard traffic. When I restarted mailman it showed this trace:
Generating MTA alias maps /usr/local/mailman3 # Traceback (most recent call last): File "/usr/local/bin/runner", line 33, in <module> sys.exit(load_entry_point('mailman==3.3.8', 'console_scripts', 'runner')()) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/mailman/bin/runner.py", line 184, in main runner = make_runner(*runner_spec, once=once) File "/usr/local/lib/python3.9/site-packages/mailman/bin/runner.py", line 70, in make_runner return runner_class(name, slice) File "/usr/local/lib/python3.9/site-packages/mailman/runners/lmtp.py", line 295, in __init__ self.lmtp = LMTPController(LMTPHandler(), hostname=hostname, port=port) File "/usr/local/lib/python3.9/site-packages/aiosmtpd/controller.py", line 417, in __init__ self._localhost = get_localhost() File "/usr/local/lib/python3.9/site-packages/aiosmtpd/controller.py", line 66, in get_localhost with makesock(AF_INET6, SOCK_STREAM) as sock: File "/usr/local/lib/python3.9/socket.py", line 232, in __init__ _socket.socket.__init__(self, family, type, proto, fileno) OSError: [Errno 43] Protocol not supported
As Mark pointed it can be circunverted modifying /PATH_TO_YOUR_PYTHON/site-packages/aiosmtpd/controller.py and changing the 49th line as this:
# Helper function to assist in mocking^M
## return has_ipv6^M return False
After that, restarting mailman 3 works perfectly.
It seems that FreeBSD is handling IPv6 in a way that other OSs dont. It surprise me, because FreeBSD was the first OS where IPv6 was deployed, but it is what it is.
Thaks to everybody for your patience, specially Odhiambo and Mark.
@Guillermo Hernandez (Oldno7) <guillermo@querysoft.es>
Thanks for the update. However, I don't think I would entirely blame FreeBSD for this. As Mark pointed out, something did not upgrade completely. This could be some quirk within your FreeBSD ports and you may need to ensure everything related to your Python version is updated. Why am I saying this? I am running MM3 in a virtualenv on FreeBSD (13.1-p6) and I did upgrade to the bleeding-edge MM3 by running all components from git, and I don't have this problem you had. Could you possibly fully update your Python libraries by following the entry dated 20220626 in /usr/ports/UPDATING? Could you run all the steps, do away with the workaround, and see if that fixes the issue?
PS: I don't even think many people are running MM3 on FreeBSD, leave alone from the ports. I have come to learn that even in Linux, using the distro's packages is usually problematic. Running MM3 from virtualenv is quite safe and to be honest, you can migrate your setup from where it is now to a virtualenv and you will not lose anything.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)