Setting base_url for the domain to use it in the templates.
Hi all!
I'm trying to use extended placeholders for the templated texts in the message footer that are sent to the members:
Along with these, Mailman supports placeholder as URLs for web interface when
base_url
property is set at the Domain level. These include: domain_url - URL to homepage for a domain. mailinglist_url - URL to homepage for a mailinglist. held_message_url - URL to page for handling all held messages. pending_subscriptions_url - URL to page for handling pending subscription requests. pending_unsubscriptions_url - URL to page for handling pending unsubscriptions.
The REST API docs mention base_url
as the property of the domain: domain URLs
But my attempts to use REST API to set it fail:
curl --user 'restapi:restpass' \
-X PATCH \
-H "Content-Type: application/json" \
-H 'Accept: application/json' \
-d '{ "base_url": "https://example.net/mailman3" }' \
http://localhost:8001/3.1/domains/example.net | jq '.'
{
"title": "400 Bad Request",
"description": "Unexpected parameters: base_url"
}
My MM3 instance is the latest(3.3.9), provided by the maxking mailman-core docker image.
It looks like there is a lot of confusion about base_url
in general, as hyperkitty seems also use the property with the same name, for example: https://lists.mailman3.org/hyperkitty/list/mailman-users@mailman3.org/thread...
So what is the correct way to get those extended placeholders to work in the templates?
It's also not clear to me, what the the primary domain should be for the installation - server hostname, as in lists.mailman3.org
or the domain, used in the mailing list(s) itself, like mailman3.org
for mailman-users@mailman3.org...
With best regards, Timour Bakeev
On 7/10/24 7:17 PM, Timour Bakeev wrote:
Hi all!
I'm trying to use extended placeholders for the templated texts in the message footer that are sent to the members: ... But my attempts to use REST API to set it fail:
This feature is in the not yet released Mailman 3.3.10, see https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/NEWS.h...
It is not available in 3.3.9.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Thu, Jul 11, 2024 at 6:58 AM Mark Sapiro <mark@msapiro.net> wrote:
On 7/10/24 7:17 PM, Timour Bakeev wrote:
Hi all!
I'm trying to use extended placeholders for the templated texts in the message footer that are sent to the members: ... But my attempts to use REST API to set it fail:
This feature is in the not yet released Mailman 3.3.10, see
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/NEWS.h...
And talking of 3.3.10, I have a feature request, or I might just be making unnecessary noise if this is already documented somewhere: I find the unsubscribe_all button quite scary! I have never used it though, so I am not quite sure about its behavior. What scares me is the possibility of clicking it and then in one fell swoop you've removed ALL the members without a "confirmation". So I was wondering if that button can be modified to have a dropdown selection with No/Yes, so that one has to select the No (backoff) or Yes (blow away!).
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On 7/10/24 10:46 PM, Odhiambo Washington via Mailman-users wrote:
I find the unsubscribe_all button quite scary! I have never used it though, so I am not quite sure about its behavior. What scares me is the possibility of clicking it and then in one fell swoop you've removed ALL the members without a "confirmation".
See the thread at https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/C... and the issue at https://gitlab.com/mailman/postorius/-/issues/545.
Bottom line - there is a confirmation. Try it, perhaps on a test list if you're really scared.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Thu, Jul 11, 2024 at 6:28 PM Mark Sapiro <mark@msapiro.net> wrote:
On 7/10/24 10:46 PM, Odhiambo Washington via Mailman-users wrote:
I find the unsubscribe_all button quite scary! I have never used it
though,
so I am not quite sure about its behavior. What scares me is the possibility of clicking it and then in one fell swoop you've removed ALL the members without a "confirmation".
See the thread at
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/C... and the issue at https://gitlab.com/mailman/postorius/-/issues/545.
Bottom line - there is a confirmation. Try it, perhaps on a test list if you're really scared.
Will do that test :)
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
The documentation at https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/d... shows that when the variable is not set it would come as base_url: None
on GET request.
But the my table domain
does not even have column base_url
. I have tried adding it ALTER TABLE domain ADD COLUMN base_url CHARACTER VARYING;
but this did not help.
So I believe this is just some WIP. Some related commits:
On 8/27/24 11:27, Ondřej Brablc via Mailman-users wrote:
The documentation at https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/d... shows that when the variable is not set it would come as
base_url: None
on GET request.But the my table
domain
does not even have columnbase_url
. I have tried adding itALTER TABLE domain ADD COLUMN base_url CHARACTER VARYING;
but this did not help.
The docs at https://docs.mailman3.org/ include documentation of the heads of the GitLab branches so they may contain documentation of things that are not yet released. When Mailman 3.3.10 is released and you upgrade (or when you upgrade from the head of the GitLab branch), a migration will run automatically to add the base_url column to the domain table.
So I believe this is just some WIP. Some related commits:
Yes, it is a WIP in that it hasn't yet been released as are all the changes at https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/NEWS.h...
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
Mark Sapiro
-
Odhiambo Washington
-
Ondřej Brablc
-
Timour Bakeev