I followed this: https://gitlab.com/mailman/mailman/-/issues/901 I created a similar template which I placed in /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ I also restarted Mailman.
However, when I test, the mail I get is not what I expected. The template used is different than the one referenced above.
<CUT> From: < kictanet-confirm+e486c811933b179525ed673751e9b817c4b4b2e4@lists.kictanet.or.ke
Date: Wed, Feb 15, 2023 at 4:01 PM Subject: Your confirmation is needed to join the kictanet@lists.kictanet.or.ke mailing list. To: OdhiamboW <myaddress@outlook.com>
Email Address Registration Confirmation
Hello, this is the GNU Mailman server at lists.kictanet.or.ke.
We have received a registration request for the email address
myaddress@outlook.com
Before you can start using GNU Mailman at this site, you must first confirm that this is your email address. You can do this by replying to this message.
Or you should include the following line -- and only the following line -- in a message to kictanet-request@lists.kictanet.or.ke:
confirm e486c811933b179525ed673751e9b817c4b4b2e4
Note that simply sending a `reply' to this message should work from most mail readers.
If you do not wish to register this email address, simply disregard this message. If you think you are being maliciously subscribed to the list, or have any other questions, you may contact
kictanet-owner@lists.kictanet.or.ke
</CUT>
The part that has the URL from the referenced template is here.
- Where is this template that the system used and can I edit it?
- Why is it not using the template I created?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On 2/15/23 05:22, Odhiambo Washington wrote:
- Where is this template that the system used and can I edit it?
/opt/mailman/mm/venv/lib/<python_version>/site-packages/mailman/templates/en/list:user:action:subscribe.txt
You can edit it, but your edits will be overwritten if you upgrade.
- Why is it not using the template I created?
Is the template you placed in /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ named list:user:action:subscribe.txt and does Mailman have permission to read it?
Did you try to create a template in Postorius? If you did, that one will take precedence.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Wed, Feb 15, 2023 at 6:35 PM Mark Sapiro <mark@msapiro.net> wrote:
On 2/15/23 05:22, Odhiambo Washington wrote:
- Where is this template that the system used and can I edit it?
/opt/mailman/mm/venv/lib/<python_version>/site-packages/mailman/templates/en/list:user:action:subscribe.txt
You can edit it, but your edits will be overwritten if you upgrade.
I will not touch that.
- Why is it not using the template I created?
Is the template you placed in /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ named list:user:action:subscribe.txt and does Mailman have permission to read it?
Yes.
[18:47 ~ ]$ ls -al /opt/mailman/mm/var/templates/lists/ kictanet.lists.kictanet.or.ke/en/ total 48 drwxr-xr-x 2 mailman mailman 512 Feb 14 08:53 . drwxr-xr-x 3 mailman mailman 512 Feb 14 08:54 .. -rw------- 1 mailman mailman 615 Jan 17 13:57 domain:admin:notice:new-list.txt -rw------- 1 mailman mailman 341 Jan 17 13:54 list:admin:action:post.txt -rw------- 1 mailman mailman 158 Dec 17 13:32 list:member:digest:footer.txt -rw------- 1 mailman mailman 452 Jan 17 13:54 list:member:digest:masthead.txt -rw------- 1 mailman mailman 137 Jan 17 13:55 list:member:generic:footer.txt -rw------- 1 mailman mailman 1219 Dec 8 15:12 list:member:regular:footer.txt -rw------- 1 mailman mailman 944 Jan 17 15:50 list:user:action:subscribe.txt -rw------- 1 mailman mailman 247 Jan 17 13:56 list:user:notice:post.txt -rw------- 1 mailman mailman 802 Jan 17 13:56 list:user:notice:probe.txt -rw------- 1 mailman mailman 639 Jan 17 13:57 list:user:notice:welcome.txt
Did you try to create a template in Postorius? If you did, that one will take precedence.
Not at all.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On 2/15/23 08:09, Odhiambo Washington wrote:
[18:47 ~ ]$ ls -al /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ total 48 drwxr-xr-x 2 mailman mailman 512 Feb 14 08:53 . drwxr-xr-x 3 mailman mailman 512 Feb 14 08:54 .. -rw------- 1 mailman mailman 615 Jan 17 13:57 domain:admin:notice:new-list.txt
This template is used in a domain context. It will never be accessed here. It needs to be in /opt/mailman/mm/var/templates/site/en/ or /opt/mailman/mm/var/templates/domains/lists.kictanet.or.ke/en/
-rw------- 1 mailman mailman 341 Jan 17 13:54 list:admin:action:post.txt -rw------- 1 mailman mailman 158 Dec 17 13:32 list:member:digest:footer.txt -rw------- 1 mailman mailman 452 Jan 17 13:54 list:member:digest:masthead.txt -rw------- 1 mailman mailman 137 Jan 17 13:55 list:member:generic:footer.txt
The generic footer is used for both regular messages and digests if there isn't a specific regular or digest footer. In this case, you have both so the generic footer won't ever be used.
-rw------- 1 mailman mailman 1219 Dec 8 15:12 list:member:regular:footer.txt -rw------- 1 mailman mailman 944 Jan 17 15:50 list:user:action:subscribe.txt -rw------- 1 mailman mailman 247 Jan 17 13:56 list:user:notice:post.txt -rw------- 1 mailman mailman 802 Jan 17 13:56 list:user:notice:probe.txt -rw------- 1 mailman mailman 639 Jan 17 13:57 list:user:notice:welcome.txt
Are the other templates such as list:member:regular:footer.txt used?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Wed, Feb 15, 2023 at 7:26 PM Mark Sapiro <mark@msapiro.net> wrote:
On 2/15/23 08:09, Odhiambo Washington wrote:
[18:47 ~ ]$ ls -al /opt/mailman/mm/var/templates/lists/
kictanet.lists.kictanet.or.ke/en/
total 48 drwxr-xr-x 2 mailman mailman 512 Feb 14 08:53 . drwxr-xr-x 3 mailman mailman 512 Feb 14 08:54 .. -rw------- 1 mailman mailman 615 Jan 17 13:57 domain:admin:notice:new-list.txt
This template is used in a domain context. It will never be accessed here. It needs to be in /opt/mailman/mm/var/templates/site/en/ or /opt/mailman/mm/var/templates/domains/lists.kictanet.or.ke/en/
The last time I referred to the link, I deliberately duplicated the <LC> folder in two locations: [09:51 ~ ]$ ls -al /opt/mailman/mm/var/templates/site/en/ total 48 drwxr-xr-x 2 mailman mailman 512 Feb 14 08:53 . drwxr-xr-x 3 mailman mailman 512 Feb 14 08:53 .. -rw------- 1 mailman mailman 615 Jan 17 13:57 domain:admin:notice:new-list.txt -rw------- 1 mailman mailman 341 Jan 17 13:54 list:admin:action:post.txt -rw------- 1 mailman mailman 158 Dec 17 13:32 list:member:digest:footer.txt -rw------- 1 mailman mailman 452 Jan 17 13:54 list:member:digest:masthead.txt -rw------- 1 mailman mailman 137 Jan 17 13:55 list:member:generic:footer.txt -rw------- 1 mailman mailman 1219 Dec 8 15:12 list:member:regular:footer.txt -rw------- 1 mailman mailman 944 Jan 17 15:50 list:user:action:subscribe.txt -rw------- 1 mailman mailman 247 Jan 17 13:56 list:user:notice:post.txt -rw------- 1 mailman mailman 802 Jan 17 13:56 list:user:notice:probe.txt -rw------- 1 mailman mailman 639 Jan 17 13:57 list:user:notice:welcome.txt
Yet, it is NOT being picked. So definitely something is wrong somewhere.
-rw------- 1 mailman mailman 341 Jan 17 13:54 list:admin:action:post.txt -rw------- 1 mailman mailman 158 Dec 17 13:32 list:member:digest:footer.txt -rw------- 1 mailman mailman 452 Jan 17 13:54 list:member:digest:masthead.txt -rw------- 1 mailman mailman 137 Jan 17 13:55 list:member:generic:footer.txt
The generic footer is used for both regular messages and digests if there isn't a specific regular or digest footer. In this case, you have both so the generic footer won't ever be used.
Thank you for clarifying that. I actually will delete the generic footer in this case because I don't need it.
-rw------- 1 mailman mailman 1219 Dec 8 15:12 list:member:regular:footer.txt -rw------- 1 mailman mailman 944 Jan 17 15:50 list:user:action:subscribe.txt -rw------- 1 mailman mailman 247 Jan 17 13:56 list:user:notice:post.txt -rw------- 1 mailman mailman 802 Jan 17 13:56 list:user:notice:probe.txt -rw------- 1 mailman mailman 639 Jan 17 13:57 list:user:notice:welcome.txt
Are the other templates such as list:member:regular:footer.txt used?
I do see that in posts to the list, but I believe that is perhaps only working because the list had that footer when it was imported from MM2.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On 2/15/23 23:04, Odhiambo Washington wrote:
The last time I referred to the link, I deliberately duplicated the <LC> folder in two locations: [09:51 ~ ]$ ls -al /opt/mailman/mm/var/templates/site/en/ total 48 drwxr-xr-x 2 mailman mailman 512 Feb 14 08:53 . drwxr-xr-x 3 mailman mailman 512 Feb 14 08:53 .. -rw------- 1 mailman mailman 615 Jan 17 13:57 domain:admin:notice:new-list.txt -rw------- 1 mailman mailman 341 Jan 17 13:54 list:admin:action:post.txt -rw------- 1 mailman mailman 158 Dec 17 13:32 list:member:digest:footer.txt -rw------- 1 mailman mailman 452 Jan 17 13:54 list:member:digest:masthead.txt -rw------- 1 mailman mailman 137 Jan 17 13:55 list:member:generic:footer.txt -rw------- 1 mailman mailman 1219 Dec 8 15:12 list:member:regular:footer.txt -rw------- 1 mailman mailman 944 Jan 17 15:50 list:user:action:subscribe.txt -rw------- 1 mailman mailman 247 Jan 17 13:56 list:user:notice:post.txt -rw------- 1 mailman mailman 802 Jan 17 13:56 list:user:notice:probe.txt -rw------- 1 mailman mailman 639 Jan 17 13:57 list:user:notice:welcome.txt
Yet, it is NOT being picked. So definitely something is wrong somewhere.
If you have the same list:* file in both /opt/mailman/mm/var/templates/site/en/ and /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ the ones in the lists directory will take precedence for that list over the ones in the site directory.
See https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/utilities/i18n.... for a discussion of the search order.
Are the other templates such as list:member:regular:footer.txt used?
I do see that in posts to the list, but I believe that is perhaps only working because the list had that footer when it was imported from MM2.
A template from import21 of the kictanet@lists.kictanet.or.ke list will be stored in the /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ directory.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Thu, Feb 16, 2023 at 10:26 AM Mark Sapiro <mark@msapiro.net> wrote:
On 2/15/23 23:04, Odhiambo Washington wrote:
The last time I referred to the link, I deliberately duplicated the <LC> folder in two locations: [09:51 ~ ]$ ls -al /opt/mailman/mm/var/templates/site/en/ total 48 drwxr-xr-x 2 mailman mailman 512 Feb 14 08:53 . drwxr-xr-x 3 mailman mailman 512 Feb 14 08:53 .. -rw------- 1 mailman mailman 615 Jan 17 13:57
-rw------- 1 mailman mailman 341 Jan 17 13:54
-rw------- 1 mailman mailman 158 Dec 17 13:32
-rw------- 1 mailman mailman 452 Jan 17 13:54
-rw------- 1 mailman mailman 137 Jan 17 13:55
-rw------- 1 mailman mailman 1219 Dec 8 15:12
-rw------- 1 mailman mailman 944 Jan 17 15:50
-rw------- 1 mailman mailman 247 Jan 17 13:56
-rw------- 1 mailman mailman 802 Jan 17 13:56
-rw------- 1 mailman mailman 639 Jan 17 13:57
domain:admin:notice:new-list.txt list:admin:action:post.txt list:member:digest:footer.txt list:member:digest:masthead.txt list:member:generic:footer.txt list:member:regular:footer.txt list:user:action:subscribe.txt list:user:notice:post.txt list:user:notice:probe.txt list:user:notice:welcome.txt
Yet, it is NOT being picked. So definitely something is wrong somewhere.
If you have the same list:* file in both /opt/mailman/mm/var/templates/site/en/ and /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ the ones in the lists directory will take precedence for that list over the ones in the site directory.
In my case, I had the exact same files in the two paths and the list:user:action:subscribe.txt was still not used in my tests. Why?
I have now created the directory: mkdir -p /opt/mailman/mm/var/templates/domains/lists.kictanet.or.ke/en/ And I have placed the same files in there. Gearing up for a test to see if the template will be used this time around.
See
https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/utilities/i18n.... for a discussion of the search order.
Will do.
Are the other templates such as list:member:regular:footer.txt used?
I do see that in posts to the list, but I believe that is perhaps only working because the list had that footer when it was imported from MM2.
A template from import21 of the kictanet@lists.kictanet.or.ke list will be stored in the /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ directory.
It wasn't a template per se. It was the regular nondigest msg_footer from MM2.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On 2/15/23 23:42, Odhiambo Washington wrote:
On Thu, Feb 16, 2023 at 10:26 AM Mark Sapiro <mark@msapiro.net> wrote:
In my case, I had the exact same files in the two paths and the list:user:action:subscribe.txt was still not used in my tests. Why?
I don't know why? What's the content of the template table in the database?
SELECT * FROM template;
I have now created the directory: mkdir -p /opt/mailman/mm/var/templates/domains/lists.kictanet.or.ke/en/ And I have placed the same files in there. Gearing up for a test to see if the template will be used this time around.
That's just wasting space. If you're putting the exact same templates in site/, domains/ and lists/, you might just as well delete the ones in domains/ and lists/ and Mailman will use the ones from site/.
A template from import21 of the kictanet@lists.kictanet.or.ke list will be stored in the /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ directory.
It wasn't a template per se. It was the regular nondigest msg_footer from MM2.
import21 imports the nondigest msg_footer, makes certain adjustments for Mailman3 compatibility and stores it as a template in the var/templates/lists/<list-id>/<lc>/ directory, however if it was the MM 2.1 default msg_footer, it won't be stored as a template and the MM3 default list:member:generic:footer template will be used.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Thu, Feb 16, 2023 at 9:32 PM Mark Sapiro <mark@msapiro.net> wrote:
On 2/15/23 23:42, Odhiambo Washington wrote:
On Thu, Feb 16, 2023 at 10:26 AM Mark Sapiro <mark@msapiro.net> wrote:
In my case, I had the exact same files in the two paths and the list:user:action:subscribe.txt was still not used in my tests. Why?
I don't know why? What's the content of the template table in the database?
SELECT * FROM template;
root@localhost [mailmansuite]> SELECT * FROM template; Empty set (0.03 sec)
I have now created the directory:
mkdir -p /opt/mailman/mm/var/templates/domains/lists.kictanet.or.ke/en/ And I have placed the same files in there. Gearing up for a test to see if the template will be used this time around.
That's just wasting space. If you're putting the exact same templates in site/, domains/ and lists/, you might just as well delete the ones in domains/ and lists/ and Mailman will use the ones from site/.
Well, space is cheap these days.
A template from import21 of the kictanet@lists.kictanet.or.ke list will be stored in the /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ directory.
It wasn't a template per se. It was the regular nondigest msg_footer from MM2.
import21 imports the nondigest msg_footer, makes certain adjustments for Mailman3 compatibility and stores it as a template in the var/templates/lists/<list-id>/<lc>/ directory, however if it was the MM 2.1 default msg_footer, it won't be stored as a template and the MM3 default list:member:generic:footer template will be used.
And what I am seeing is that the default list:member:generic:footer template is what is showing up in all posts. To my chagrin though.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On 2/16/23 11:14, Odhiambo Washington wrote:
On Thu, Feb 16, 2023 at 9:32 PM Mark Sapiro <mark@msapiro.net> wrote:
I don't know why? What's the content of the template table in the database?
SELECT * FROM template;
root@localhost [mailmansuite]> SELECT * FROM template; Empty set (0.03 sec)
Well, that eliminates one possibility. I still don't know why. Mailman should be using all the list: templates from /opt/mailman/mm/var/templates/lists/kictanet.lists.kictanet.or.ke/en/ for messages from the kictanet@lists.kictanet.or.ke where the target language is English. Is the list's preferred language English and is the recipient's preferred language English?
That's just wasting space. If you're putting the exact same templates in site/, domains/ and lists/, you might just as well delete the ones in domains/ and lists/ and Mailman will use the ones from site/.
Well, space is cheap these days.
More importantly, it could lead you to edit a template that isn't used because one of the other places is searched first.
I would like to figure out what the issue is, but I don't know how to proceed. Have you checked /opt/mailman/mm/var/logs/mailman.log for anything relevant?
If all else fails and we can't figure this out, you could always set the template(s) in Postorius.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Odhiambo Washington