Re: Uncaught runner exception
Hello Mark,
thanks for your hint.
Postfix is runnig as mta on my machine.
I tested port 25 with swaks ->mail to user on server: localhost port 25 -> everything fine
Mailman is configured with localhost for incoming and outgoing mails.
After stopping mailman3, deleting all files in the queue directories, restart mailman3 I sent a test-mail
/var/log/mailman3/mailman.log Apr 07 12:08:23 2020 (28198) Master started Apr 07 12:08:24 2020 (28206) out runner started. Apr 07 12:08:24 2020 (28202) command runner started. Apr 07 12:08:24 2020 (28203) in runner started. Apr 07 12:08:24 2020 (28200) archive runner started. Apr 07 12:08:24 2020 (28201) bounces runner started. Apr 07 12:08:24 2020 (28210) retry runner started. Apr 07 12:08:25 2020 (28208) rest runner started. Apr 07 12:08:25 2020 (28212) digest runner started. Apr 07 12:08:25 2020 (28205) nntp runner started. Apr 07 12:08:26 2020 (28211) virgin runner started. Apr 07 12:08:26 2020 (28207) pipeline runner started. Apr 07 12:08:26 2020 (28204) lmtp runner started. Apr 07 12:09:19 2020 (28203) ACCEPT: <000f01d60cc4$96c9a8d0$c45cfa70$@[domain]> Apr 07 12:09:21 2020 (28206) Cannot connect to SMTP server localhost on port 25
I have no idea what to do for solving my problems.
Regards from Hamburg
Wolfgang
-----Ursprüngliche Nachricht----- Von: Mark Sapiro <mark@msapiro.net> Gesendet: Montag, 6. April 2020 23:50 An: Wolfgang Bock <mailinglisten@wbock.de> Betreff: Re: [MM3-users] Re: Uncaught runner exception
On 4/6/20 2:44 PM, Wolfgang Bock via Mailman-users wrote:
Thank you Steven for your reply!
I Set smtp_server to port 25 and got a "Cannot connect ro SMTP Server on port 25", the former error message didn't show again.
As I see port 25 is reseved for postfix. So I have to fiddle out how mailman3 could also use this port for sending mails out. ....
You need an MTA for Mailman to deliver its mail to. Normally this will be Postfix, sendmail, Exim, etc running on localhost and listening on port 25.
Do you have such an MTA running on localhost?
Note, Mailman does not directly send mail to end recipients. It only delivers mail to an outgoing MTA.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Wolfgang Bock via Mailman-users writes:
I tested port 25 with swaks ->mail to user on server: localhost port 25 -> everything fine
What is "swaks"?
Apr 07 12:09:21 2020 (28206) Cannot connect to SMTP server localhost on port 25
Is it possible that Postfix is configured for TLS connections only? If so, it is probably listening on port 465 (the "submissions" port, AKA ssmtp and smtps) or (less likely) 587 (the "submission" port -- no trailing "s"). Mailman needs to be configured correctly for this. See
https://mailman.readthedocs.io/en/latest/src/mailman/mta/docs/connection.htm...
It's barely possible that Postfix is listening on port 25 but insists on TLS. But that's very unusual, and I think that would produce a SMTP error such as "Need STARTTLS" or "Need SASL" (which happen *after* the TCP connection is established) instead of "Cannot connect" (which suggests a TCP error before a connection is completed).
I have no idea what to do for solving my problems.
That's when we're most of service. At least, I hope so! :-)
Steve
--On Wednesday, April 8, 2020 12:16 AM +0900 "Stephen J. Turnbull" <turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Wolfgang Bock via Mailman-users writes:
I tested port 25 with swaks ->mail to user on server: localhost port 25 -> everything fine
What is "swaks"?
A very helpful utility:
<https://www.jetmore.org/john/code/swaks/>
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: <http://www.symas.com>
On 4/7/20 3:22 AM, Wolfgang Bock via Mailman-users wrote:
Apr 07 12:09:21 2020 (28206) Cannot connect to SMTP server localhost on port 25
I have no idea what to do for solving my problems.
Can you successfully
telnet localhost 25
from a shell on the server?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Yes,
and I made all the tests as discribed here: https://workaround.org/ispmail/buster/relaying-through-postfix/
including the swaks test mentioned before
output of sudo netstat -lntup | grep ":25" tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 20660/master tcp6 0 0 :::25 :::* LISTEN 20660/master
output of sudo lsof -i :25 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME master 20660 root 13u IPv4 1474228 0t0 TCP *:smtp (LISTEN) master 20660 root 14u IPv6 1474229 0t0 TCP *:smtp (LISTEN)
Regards Wolfgang
-----Ursprüngliche Nachricht----- Von: Mark Sapiro <mark@msapiro.net> Gesendet: Dienstag, 7. April 2020 21:28 An: mailman-users@mailman3.org Betreff: [MM3-users] Re: Uncaught runner exception
On 4/7/20 3:22 AM, Wolfgang Bock via Mailman-users wrote:
Apr 07 12:09:21 2020 (28206) Cannot connect to SMTP server localhost on port 25
I have no idea what to do for solving my problems.
Can you successfully
telnet localhost 25
from a shell on the server?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
On 4/7/20 2:40 PM, Wolfgang Bock via Mailman-users wrote:
Yes,
I assume that means
telnet localhost 25
succeeds. Try the attached patch to mailman/runners/outgoing.py. It should log more about the actual exception.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks Mark!
I changed the outgoing.py per cut&paste because I didnt know, whow th patch a python file ... But succeeded:
/var/log/mailman3/mailman.log Apr 08 19:08:10 2020 (9234) Master started Apr 08 19:08:12 2020 (9241) bounces runner started. Apr 08 19:08:12 2020 (9263) virgin runner started. Apr 08 19:08:12 2020 (9259) out runner started. Apr 08 19:08:12 2020 (9255) lmtp runner started. Apr 08 19:08:12 2020 (9259) Cannot connect to SMTP server localhost on port 25 [Errno 13] Permission denied: '/var/lib/mailman3/cache/7d/c6/7dc6d1a99a5ecf2b2241d6d0958a2bc704e32238150e5cc273f6779b124bd04f' Apr 08 19:08:12 2020 (9237) archive runner started. ....
Checked the ownership .... ls -la: /var/lib/mailman3/cache drwxrwx--- 3 root root 4096 Nov 9 22:27 61 drwxrwx--- 3 root root 4096 Feb 3 17:37 6c drwxrwx--- 3 root root 4096 Nov 12 11:59 71 drwxrwx--- 3 root root 4096 Nov 6 12:01 72 drwxrwx--- 3 root root 4096 Feb 5 21:52 7d drwxrwx--- 3 root root 4096 Feb 5 23:05 8b drwxrwx--- 3 root root 4096 Nov 12 23:41 94 drwxrwx--- 3 root root 4096 Nov 7 08:31 ae drwxrwx--- 3 root root 4096 Nov 12 23:40 fa
/var/log/mailman3/mailman.log .... Apr 08 19:08:19 2020 (9259) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mailman/core/runner.py", line 173, in _one_iteration self._process_one_file(msg, msgdata) File "/usr/lib/python3/dist-packages/mailman/core/runner.py", line 266, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) File "/usr/lib/python3/dist-packages/mailman/runners/outgoing.py", line 93, in _dispose self._func(mlist, msg, msgdata) File "/usr/lib/python3/dist-packages/mailman/mta/deliver.py", line 86, in deliver refused = agent.deliver(mlist, msg, msgdata) File "/usr/lib/python3/dist-packages/mailman/mta/bulk.py", line 100, in deliver self.decorate(mlist, msg, msgdata) File "/usr/lib/python3/dist-packages/mailman/mta/decorating.py", line 32, in decorate decorator.process(mlist, msg, msgdata) File "/usr/lib/python3/dist-packages/mailman/handlers/decorate.py", line 264, in process process(mlist, msg, msgdata) File "/usr/lib/python3/dist-packages/mailman/handlers/decorate.py", line 73, in process for archiver in IListArchiverSet(mlist).archivers: File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 135, in __call__ adapter = self.__adapt__(obj) File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 151, in __adapt__ adapter = hook(self, obj) File "/usr/lib/python3/dist-packages/zope/component/_api.py", line 156, in adapter_hook return sitemanager.queryAdapter(object, interface, name, default) File "/usr/lib/python3/dist-packages/zope/interface/registry.py", line 348, in queryAdapter return self.adapters.queryAdapter(object, interface, name, default) File "/usr/lib/python3/dist-packages/zope/interface/adapter.py", line 353, in queryAdapter return self.adapter_hook(provided, object, name, default) File "/usr/lib/python3/dist-packages/zope/interface/adapter.py", line 363, in adapter_hook result = factory(object) File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3/dist-packages/mailman/model/mailinglist.py", line 600, in __init__ for archiver in config.archivers: File "/usr/lib/python3/dist-packages/mailman/config/config.py", line 260, in archivers archiver = call_name(class_path) File "/usr/lib/python3/dist-packages/mailman/utilities/modules.py", line 70, in call_name return named_callable(*args, **kws) File "/usr/lib/python3/dist-packages/mailman/archiving/mhonarc.py", line 46, in __init__ config.archiver.mhonarc.configuration) File "/usr/lib/python3/dist-packages/mailman/config/config.py", line 335, in external_configuration cfg_path = str(expand_path(resources, path)) File "/usr/lib/python3/dist-packages/mailman/utilities/modules.py", line 80, in expand_path cfg_path = resources.enter_context(path(package, resource + '.cfg')) File "/usr/lib/python3.7/contextlib.py", line 426, in enter_context result = _cm_type.__enter__(cm) File "/usr/lib/python3.7/contextlib.py", line 112, in __enter__ return next(self.gen) File "/usr/lib/python3.7/importlib/resources.py", line 188, in path yield Path(reader.resource_path(resource)) File "<frozen importlib._bootstrap_external>", line 932, in resource_path File "<frozen importlib._bootstrap_external>", line 941, in is_resource File "<frozen importlib._bootstrap_external>", line 95, in _path_isfile File "<frozen importlib._bootstrap_external>", line 87, in _path_is_mode_type File "<frozen importlib._bootstrap_external>", line 81, in _path_stat File "/usr/lib/python3/dist-packages/mailman/core/runner.py", line 114, in signal_handler raise RunnerInterrupt mailman.interfaces.runner.RunnerInterrupt Apr 08 19:08:19 2020 (9259) SHUNTING: 1586365699.6492867+798bd45a31fb2b8d5fd24a481a3cf95710994bf7 Apr 08 19:08:19 2020 (9259) out runner exiting. Apr 08 19:08:19 2020 (9234) Master watcher caught SIGTERM. Exiting. Apr 08 19:08:19 2020 (9234) Master stopped
Changed the ownership for /var/lib/mailman3/cache to list:list and from that point my lists are responding.
Same problem occurs before fort he list-directory, which I corrected some days ago.
Is the ownship misconfiguration a coincidence or did I made a mistake somewhere??
Thanks for your assistance!
Regards Wolfgang
-----Ursprüngliche Nachricht----- Von: Mark Sapiro <mark@msapiro.net> Gesendet: Mittwoch, 8. April 2020 00:23 An: MM3 Users <mailman-users@mailman3.org> Betreff: [MM3-users] Re: Uncaught runner exception
On 4/7/20 2:40 PM, Wolfgang Bock via Mailman-users wrote:
Yes,
I assume that means
telnet localhost 25
succeeds. Try the attached patch to mailman/runners/outgoing.py. It should log more about the actual exception.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 4/8/20 1:17 PM, Wolfgang Bock via Mailman-users wrote:
Checked the ownership .... ls -la: /var/lib/mailman3/cache drwxrwx--- 3 root root 4096 Nov 9 22:27 61 drwxrwx--- 3 root root 4096 Feb 3 17:37 6c drwxrwx--- 3 root root 4096 Nov 12 11:59 71 drwxrwx--- 3 root root 4096 Nov 6 12:01 72 drwxrwx--- 3 root root 4096 Feb 5 21:52 7d drwxrwx--- 3 root root 4096 Feb 5 23:05 8b drwxrwx--- 3 root root 4096 Nov 12 23:41 94 drwxrwx--- 3 root root 4096 Nov 7 08:31 ae drwxrwx--- 3 root root 4096 Nov 12 23:40 fa
It seems at some point Mailman core was run as 'root' rather than 'list'.
...
Changed the ownership for /var/lib/mailman3/cache to list:list and from that point my lists are responding.
Same problem occurs before fort he list-directory, which I corrected some days ago.
Is the ownship misconfiguration a coincidence or did I made a mistake somewhere??
This is a Debian/Ubuntu package question. I'm guessing but all of Mailman core and Mailman web should always be run as user:group list:list in your case. It appears that at some point these were started as root. Whether this is something you did wrong or an issue with whatever init/systemd scripts run these things, I can't say.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro writes:
Whether this is something you did wrong
s/wrong/accidentally/ :-)
or an issue with whatever init/systemd scripts run these things, I can't say.
Maybe there's a way we can check the account running mailman, sort of a runtime check_perms. I doubt suid is a good idea, but maybe a warning?
Steve
participants (4)
-
Mark Sapiro
-
Quanah Gibson-Mount
-
Stephen J. Turnbull
-
Wolfgang Bock