On 1/7/22 4:51 AM, Duane Raymond wrote:
Thanks Mark.
This sounds like a database problem. What's in Mailman
core's var/logs/mailman.log ?
In the var/logs/mailman.log there was a permission error for the messages/ store folders. I noticed that some of the mm file and directories were owned by root vs 'mailman' user (what Brian uses when he set up the mm3 server). So after resetting all to mailman (I believe others use 'list')
`list` is used by the Debian/Ubuntu packages. We recommend `mailman`. These ownership issues are often caused by running Mailman core as `root`. This causes certain things to be created/owned by `root` and when Mailman core is later run as `mailman`, it can't access these things. To guard against this, Mailman core >=3.3.5 will refuse to run Mailman as `root` unless a `--run_as_root` option is specified.
Now I get the error below with the error from mailman.log.
...
"/opt/mailman/mm/venv/lib/python3.7/site-packages/mailman/rest/post_moderation.py", line 77, in _make_resource resource['msg'] = msg.as_string() AttributeError: 'NoneType' object has no attribute 'as_string'
This is https://gitlab.com/mailman/mailman/-/issues/856, fixed in Mailman 3.3.5 by https://gitlab.com/mailman/mailman/-/merge_requests/819. You can apply this patch to avoid the issue. ``` --- a/src/mailman/rest/post_moderation.py +++ b/src/mailman/rest/post_moderation.py @@ -74,7 +74,15 @@ class _HeldMessageBase(_ModerationBase): # resource. XXX See LP: #967954 key = resource.pop('key') msg = getUtility(IMessageStore).get_message_by_id(key) - resource['msg'] = msg.as_string() + if msg is None: + resource['msg'] = """\ +Subject: Message content lost +Message-ID: {} + +This held message has been lost. +""".format(key) + else: + resource['msg'] = msg.as_string() # Some of the _mod_* keys we want to rename and place into the JSON # resource. Others we can drop. Since we're mutating the dictionary, # we need to make a copy of the keys. When you port this to Python 3, ``` -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan