changing the main template for subscriptions and more
Hey there,
in Mailman2 there was a simple link in the moderation-emails, with which I was able to open directly the "held-messages". I know how to manually integrate such a link with the variables of mailman (https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/t...). But:
How can I change the template for all the lists (respectively maildomains/webdomains) so that I don't have to do this manually for all lists? I searched a bit for the corresponding template, but didn't find it. At the end it only says the following:
"At your convenience, visit your dashboard to approve or deny the request."
-> here I would like to add the following:
"At your convenience, visit your dashboard to approve or deny the request: https://$domain/postorius/lists/$short_listname.$domain/held_messages"
Or if someone sees another possibility to get us on the right track, it would be more than welcome, thank you!
Kind regards, Jens.
On June 21, 2021 10:03:50 AM CDT, "Jens Günther" <jens.guenther@posteo.de> wrote:
How can I change the template for all the lists (respectively maildomains/webdomains) so that I don't have to do this manually for all lists?
To set a template as default for all lists and domains, put it in Mailman's var/templates/site/LC directory.
-- Mark Sapiro <mark@msapiro.net> Sent from my Not_an_iThing with standards compliant, open source software.
* Jens Günther (jens.guenther@posteo.de) [210621 17:05]:
Hey there,
in Mailman2 there was a simple link in the moderation-emails, with which I was able to open directly the "held-messages". I know how to manually integrate such a link with the variables of mailman (https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/t...). But:
How can I change the template for all the lists (respectively maildomains/webdomains) so that I don't have to do this manually for all lists? I searched a bit for the corresponding template, but didn't find it. At the end it only says the following:
I'm using this patch (however, german-only) Andi diff --git a/src/mailman/templates/de/list:admin:action:post.txt b/src/mailman/templates/de/list:admin:action:post.txt index bc76a54c4..85cdd9376 100644 --- a/src/mailman/templates/de/list:admin:action:post.txt +++ b/src/mailman/templates/de/list:admin:action:post.txt @@ -9,5 +9,6 @@ Die Nachricht wurde aus folgenden Gründen zurückgehalten: $reasons -Besuchen Sie die Administrations-Seiten, um die Nachricht +Besuchen Sie die Administrations-Seiten, um die Nachricht anzunehmen oder abzulehnen. +https://$domain/mailman3/postorius/lists/$list_id/held_messages diff --git a/src/mailman/templates/de/list:admin:action:subscribe.txt b/src/mailman/templates/de/list:admin:action:subscribe.txt index 88427c8d0..ba77aa3ce 100644 --- a/src/mailman/templates/de/list:admin:action:subscribe.txt +++ b/src/mailman/templates/de/list:admin:action:subscribe.txt @@ -3,3 +3,7 @@ die Mailingliste nötig: Für: $member Liste: $listname + +Besuchen Sie die Administrations-Seiten, um die Anmeldung +anzunehmen oder abzulehnen. +https://$domain/mailman3/postorius/lists/$list_id/subscription_requests diff --git a/src/mailman/templates/de/list:admin:action:unsubscribe.txt b/src/mailman/templates/de/list:admin:action:unsubscribe.txt index c794355e8..0bace3950 100644 --- a/src/mailman/templates/de/list:admin:action:unsubscribe.txt +++ b/src/mailman/templates/de/list:admin:action:unsubscribe.txt @@ -3,3 +3,7 @@ der Mailingliste nötig: Für: $member Liste: $listname + +Besuchen Sie die Administrations-Seiten, um die Abmeldung +anzunehmen oder abzulehnen. +https://$domain/mailman3/postorius/lists/$list_id/subscription_requests diff --git a/src/mailman/templates/de/list:user:notice:welcome.txt b/src/mailman/templates/de/list:user:notice:welcome.txt index 3efc32bd1..974d8e465 100644 --- a/src/mailman/templates/de/list:user:notice:welcome.txt +++ b/src/mailman/templates/de/list:user:notice:welcome.txt @@ -1,16 +1,18 @@ Willkommen auf der Mailingliste "$display_name"! -Um an diese Liste zu schreiben, senden Sie eine E-Mail an: - +E-Mails an die Adresse $listname +werden an alle Teilnehmer verteilt. -Sie können Einstellungen vornehmen, indem Sie eine E-Mail an +Auf der Webseite https://$domain/ können Sie Ihre Einstellungen verwalten. +Wer dies möchte, kann sich dort registrieren - bitte mit der E-Mail-Adresse, +die auf der Mailingliste eingetragen ist. Nach dem Einloggen ist auch +möglich, die Empfangsadresse für die Mailinglisten zu ändern, oder +zusätzliche Sendeadressen einzurichten. +Sie können auch Einstellungen vornehmen, indem Sie eine E-Mail an $request_email - mit dem Wort 'help' (ohne Anführungszeichen) im Betreff oder im Inhalt -senden, Sie erhalten dann eine automatisierte Antwort mit weiteren -Instruktionen. Sie werden Ihr Passwort benötigen, um Änderungen an Ihren -Einstellungen vorzunehmen, aber aus Sicherheitsgründen wird dieses hier -nicht angegeben. Sollten Sie Ihr Passwort vergessen haben, nutzen Sie bitte -die 'Passwort vergessen'-Funktion auf der Login-Seite. +senden. Sie erhalten dann eine automatisierte Antwort mit weiteren +Instruktionen. Um Änderungen bei den Einstellungen vorzunehmen, wird das auf +https://$domain/ vereinbarte Passwort benötigt.
On 6/22/21 2:41 AM, Andreas Barth wrote:
I'm using this patch (however, german-only)
Andi
diff --git a/src/mailman/templates/de/list:admin:action:post.txt b/src/mailman/templates/de/list:admin:action:post.txt
...
diff --git a/src/mailman/templates/de/list:admin:action:subscribe.txt b/src/mailman/templates/de/list:admin:action:subscribe.txt ... diff --git a/src/mailman/templates/de/list:admin:action:unsubscribe.txt b/src/mailman/templates/de/list:admin:action:unsubscribe.txt ... diff --git a/src/mailman/templates/de/list:user:notice:welcome.txt b/src/mailman/templates/de/list:user:notice:welcome.txt ...
It isn't necessary to patch the source in this way. If you put the modified templates in Mailman's var/templates/site/de/ directory, ensuring that the Mailman user can read them, they will be used and you won't have to patch the source every time you upgrade.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
- Mark Sapiro (mark@msapiro.net) [210622 14:22]:
It isn't necessary to patch the source in this way. If you put the modified templates in Mailman's var/templates/site/de/ directory, ensuring that the Mailman user can read them, they will be used and you won't have to patch the source every time you upgrade.
Thanks Mark for pointing that out.
I also should have mentioned that this would be the recommendation for operations, especially if mailman is install by some normal means (pip, distribution packages, etc). I perhaps took it for granted too much to never touch files coming out of automated systems by hand (except where the automated system caters for, e.g. debian conffiles), because that is a sure way to get into trouble with the next upgrade.
(My mailman installation is the exception and not the rule, so unless you know what you're doing and have done similar before, just follow Marks advice)
Andi
Hi Mark,
thanks for your advice. Unfortunately we need some more clues. First of all, we are using mailman docker by maxking - https://github.com/maxking/docker-mailman
Our version: Mailman Core Version - GNU Mailman 3.3.5 (Tom Sawyer) Mailman Core API Version 3.1 Mailman Core Python Version 3.8.10 (default, May 6 2021, 06:30:44) [GCC 9.3.0]
We put an example footer.txt into the templates folder as you mentioned: mailman3_core => var/templates/sites/de/list:member:regular:footer.txt Mailman user can read them
Created a new list, restarted the docker-container, but it always showed the default footer.txt and not our example footer.txt from the templates folder. Any guesses or clues? Where is this default footer.txt hiding anyway? Changing languages in postorius works fine and it alters between english, german etc... just won't use our custom footer.txt
Much appreciate your effort helping people!
On 2/1/22 12:40, Paul Paulchen wrote:
Hi Mark,
thanks for your advice. Unfortunately we need some more clues. First of all, we are using mailman docker by maxking - https://github.com/maxking/docker-mailman
I do not know what the file layout is in the Docker container, so I can't verify paths.
Our version: Mailman Core Version - GNU Mailman 3.3.5 (Tom Sawyer) Mailman Core API Version 3.1 Mailman Core Python Version 3.8.10 (default, May 6 2021, 06:30:44) [GCC 9.3.0]
We put an example footer.txt into the templates folder as you mentioned: mailman3_core => var/templates/sites/de/list:member:regular:footer.txt Mailman user can read them
As I said, I can't give you an absolute path. If you can run mailman info
in the container, that will show the location of mailman.cfg which
may help
Installing the template as you have should work if it's the correct path.
Created a new list, restarted the docker-container, but it always showed the default footer.txt and not our example footer.txt from the templates folder. Any guesses or clues? Where is this default footer.txt hiding anyway? Changing languages in postorius works fine and it alters between english, german etc... just won't use our custom footer.txt
The default templates are in the mailman/templates/ directory where the mailman/ directory is where all the Mailman core software is.
Hopefully someone familiar with Docker and the Mailman Docker container can provide better information.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
SOLVED - silly us.
We used the path: mailman3_core => var/templates/sites/de/list:member:regular:footer.txt
Correct path is: mailman3_core => var/templates/site/de/list:member:regular:footer.txt
The "s" of sites blew it up.
participants (4)
-
Andreas Barth
-
Jens Günther
-
Mark Sapiro
-
Paul Paulchen