Dear friends,
regarding my mail before, here an additional information.
I can show the templates with following command (anonymized):
https://active_domain.de/postorius/api/templates/list/testliste01.active_dom
ain.de/list:member:regular:footer
The complete syslog
Oct 30 11:49:52 active_server mailman3[107631]: Oct 30 11:49:52 2021
(107631) post to testliste01@active_domain.de from "Sender_Name"
anonymized
Oct 30 11:49:52 active_server postfix/submission/smtpd[107895]: disconnect
from unknown[ ipv6 ] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1
commands=8
Oct 30 11:49:52 active_server mailman3[107630]: --- Logging error ---
Oct 30 11:49:52 active_server mailman3[107630]: Traceback (most recent call
last):
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/model/template.py", line 110, in get
Oct 30 11:49:52 active_server mailman3[107630]: contents =
protocols.get(actual_uri, **auth)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/utilities/protocols.py", line 39, in
get
Oct 30 11:49:52 active_server mailman3[107630]:
response.raise_for_status()
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/requests/models.py", line 943, in
raise_for_status
Oct 30 11:49:52 active_server mailman3[107630]: raise
HTTPError(http_error_msg, response=self)
Oct 30 11:49:52 active_server mailman3[107630]:
requests.exceptions.HTTPError: 404 Client Error: Not Found for url:
http://localhost/postorius/api/templates/list/testliste01.active_domain.de/l
ist:member:regular:footer
Oct 30 11:49:52 active_server mailman3[107630]: During handling of the above
exception, another exception occurred:
Oct 30 11:49:52 active_server mailman3[107630]: Traceback (most recent call
last):
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 430, in format
Oct 30 11:49:52 active_server mailman3[107630]: return
self._format(record)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 426, in _format
Oct 30 11:49:52 active_server mailman3[107630]: return self._fmt %
record.__dict__
Oct 30 11:49:52 active_server mailman3[107630]: KeyError: 't'
Oct 30 11:49:52 active_server mailman3[107630]: During handling of the above
exception, another exception occurred:
Oct 30 11:49:52 active_server mailman3[107630]: Traceback (most recent call
last):
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/core/logging.py", line 76, in emit
Oct 30 11:49:52 active_server mailman3[107630]: msg =
self.format(record)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 923, in format
Oct 30 11:49:52 active_server mailman3[107630]: return
fmt.format(record)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 662, in format
Oct 30 11:49:52 active_server mailman3[107630]: s =
self.formatMessage(record)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 631, in formatMessage
Oct 30 11:49:52 active_server mailman3[107630]: return
self._style.format(record)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 432, in format
Oct 30 11:49:52 active_server mailman3[107630]: raise
ValueError('Formatting field not found in record: %s' % e)
Oct 30 11:49:52 active_server mailman3[107630]: ValueError: Formatting field
not found in record: 't'
Oct 30 11:49:52 active_server mailman3[107630]: Call stack:
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/mailman3/bin/runner", line 33, in <module>
Oct 30 11:49:52 active_server mailman3[107630]:
sys.exit(load_entry_point('mailman==3.3.3', 'console_scripts', 'runner')())
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/click/core.py", line 829, in __call__
Oct 30 11:49:52 active_server mailman3[107630]: return self.main(*args,
**kwargs)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/click/core.py", line 782, in main
Oct 30 11:49:52 active_server mailman3[107630]: rv = self.invoke(ctx)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
Oct 30 11:49:52 active_server mailman3[107630]: return
ctx.invoke(self.callback, **ctx.params)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
Oct 30 11:49:52 active_server mailman3[107630]: return callback(*args,
**kwargs)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/click/decorators.py", line 21, in new_func
Oct 30 11:49:52 active_server mailman3[107630]: return
f(get_current_context(), *args, **kwargs)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/bin/runner.py", line 188, in main
Oct 30 11:49:52 active_server mailman3[107630]: runner.run()
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/core/runner.py", line 134, in run
Oct 30 11:49:52 active_server mailman3[107630]: filecnt =
self._one_iteration()
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/core/runner.py", line 173, in
_one_iteration
Oct 30 11:49:52 active_server mailman3[107630]:
self._process_one_file(msg, msgdata)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/core/runner.py", line 266, in
_process_one_file
Oct 30 11:49:52 active_server mailman3[107630]: keepqueued =
self._dispose(mlist, msg, msgdata)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/runners/outgoing.py", line 93, in
_dispose
Oct 30 11:49:52 active_server mailman3[107630]: self._func(mlist, msg,
msgdata)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/mta/deliver.py", line 86, in deliver
Oct 30 11:49:52 active_server mailman3[107630]: refused =
agent.deliver(mlist, msg, msgdata)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/mta/base.py", line 167, in deliver
Oct 30 11:49:52 active_server mailman3[107630]: callback(mlist,
message_copy, msgdata_copy)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/mta/decorating.py", line 32, in
decorate
Oct 30 11:49:52 active_server mailman3[107630]: decorator.process(mlist,
msg, msgdata)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/handlers/decorate.py", line 264, in
process
Oct 30 11:49:52 active_server mailman3[107630]: process(mlist, msg,
msgdata)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/handlers/decorate.py", line 89, in
process
Oct 30 11:49:52 active_server mailman3[107630]: footer =
decorate('list:member:regular:footer', mlist, d)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/handlers/decorate.py", line 226, in
decorate
Oct 30 11:49:52 active_server mailman3[107630]: template =
getUtility(ITemplateLoader).get(name, mlist, **extradict)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/model/template.py", line 188, in get
Oct 30 11:49:52 active_server mailman3[107630]: contents =
getUtility(ITemplateManager).get(
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85,
in wrapper
Oct 30 11:49:52 active_server mailman3[107630]: return function(args[0],
config.db.store, *args[1:], **kws)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/model/template.py", line 117, in get
Oct 30 11:49:52 active_server mailman3[107630]: log.exception('Cannot
retrieve template at {} ({})'.format(
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 1477, in exception
Oct 30 11:49:52 active_server mailman3[107630]: self.error(msg, *args,
exc_info=exc_info, **kwargs)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 1471, in error
Oct 30 11:49:52 active_server mailman3[107630]: self._log(ERROR, msg,
args, **kwargs)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 1585, in _log
Oct 30 11:49:52 active_server mailman3[107630]: self.handle(record)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 1595, in handle
Oct 30 11:49:52 active_server mailman3[107630]:
self.callHandlers(record)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 1657, in callHandlers
Oct 30 11:49:52 active_server mailman3[107630]: hdlr.handle(record)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3.9/logging/__init__.py", line 948, in handle
Oct 30 11:49:52 active_server mailman3[107630]: self.emit(record)
Oct 30 11:49:52 active_server mailman3[107630]: File
"/usr/lib/python3/dist-packages/mailman/core/logging.py", line 85, in emit
Oct 30 11:49:52 active_server mailman3[107630]: self.handleError(record)
Oct 30 11:49:52 active_server mailman3[107630]: Message: 'Cannot retrieve
template at
http://localhost/postorius/api/templates/list/testliste01.active_domain.de/l
ist:member:regular:footer (<no authorization>)'
Oct 30 11:49:52 active_server mailman3[107630]: Arguments: ()
Oct 30 11:49:52 active_server postfix/smtpd[107755]: connect from
localhost.localdomain[127.0.0.1]
Oct 30 11:49:52 active_server postfix/smtpd[107755]: CF83E13800E8:
client=localhost.localdomain[127.0.0.1]
Oct 30 11:49:52 active_server postfix/cleanup[107898]: CF83E13800E8:
message-id=<000401d7cd73$782717c0$68754740$@active_domain.de>
Oct 30 11:49:52 active_server postfix/qmgr[1156]: CF83E13800E8:
from=, size=2342, nrcpt=4 (queue
active)
Oct 30 11:49:52 active_server postfix/smtpd[107755]: disconnect from
localhost.localdomain[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1
commands=5
Oct 30 11:49:53 active_server postfix/lmtp[107902]: CF83E13800E8:
to=,
relay=mail.domain.de[private/dovecot-lmtp], delay=0.44,
delays=0.05/0/0.01/0.38, dsn=2.0.0, status=sent (250 2.0.0
JcUfNkAVfWGBpQEAs/T6Vg:4 Saved)
Oct 30 11:49:53 active_server postfix/qmgr[1156]: CF83E13800E8: removed
Regards
Wolfgang
-----Ursprüngliche Nachricht-----
Von: Wolfgang Bock via Mailman-users mailman-users@mailman3.org
Gesendet: Freitag, 29. Oktober 2021 12:42
An: mailman-users@mailman3.org
Betreff: [MM3-users] mailman3 postorius cannot retrieve template at ... (<no
authorization>)
Hello,
the question is: postgres - mailman3web-postorius_emailtemplate table vs
mailman3 - templates table
I installed a brand new mailman3 with mailman Core 3.3.3, Api 3.1, Core
Python 3.9.2 postgres12 nginx on debian bullseye.
I created a template via postorius -> lists -> (testliste01) -> templates
-> new template -> [list:member:regular:footer] and
[list:member:digest:footer]
They are shown in the postgres database mailman3 table templates:
id name context uri username password
14 list:member:digest:footer testliste01.mydomain.de
http://localhost/postorius/api/templates/list/testliste01.mydomain.de/list:m
ember:digest:footer
15 list:member:regular:footer testliste01.mydomain.de
http://localhost/postorius/api/templates/list/testliste01.mydomain.de/list:m
ember:regular:footer
First there where no templates in the /var/lib/mailman3/templates folder,
which was empty after installation.
Later I created in /var/lib/mailman3/templates theses folders and the files
/list/testliste01.mydomain.de/list:member:digest:footer +
list:member:regular:footer owned by list:list 644
A testmail went through but instead of the default footer no footer was
shown.
In the sys.log I found the following error message:
Oct 29 11:28:04 myserver mailman3[33015]: Message: 'Cannot retrieve template
at
http://localhost/postorius/api/templates/list/testliste01.mydomain.de/list:m
ember:regular:footer (<no authorization>)'
How can I solve this problem? What kind of authorisation is meant? list?
restadmin?
I read in
https://docs.mailman3.org/en/latest/config-core.html#configure-templates
... list specific templates invar/templates/lists/LIST-ID/LC/ ...
I guess the LC means Language Code. But in the database table templates no
LC subdirectory is mentioned (in my case must be de).
And I read (dont know where) .... The templates created in Postorius are
created in the postorius_emailtemplate table in Mailman's database and
referenced via URLs like
'https://example.com/mailman3/api/templates/list/<list-id>/<template-name>'.
I.e., they are not stored in the file system. ...
That's true. I found in postgres database mailman3web in the table
mailman3web postorius_emailtemplate my
id name data language created_at modified_at
context identifier
15 list:member:digest:footer postorius footer digest 1x linefeed
2021-10-29 11:17:40.664689+02 2021-10-29 11:26:48.692628+02 list
testliste01.mydomain.de
16 list:member:regular:footer postorius footer non-digest 1x
linefeed 2021-10-29 11:18:29.166241+02 2021-10-29 11:27:24.519024+02 list
testliste01.mydomain.de
But my question is how to integrate this into the mailman3-system. The
language isn't set either.
Thanks in advance!
Regards Wolfgang
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/