On 1/14/22 4:54 PM, Mark Sapiro wrote:
On 1/14/22 11:56 AM, David Newman wrote:
I created a pending subscription request on a test list. Here is the text I'm using in a file called 'list:admin:action:subscribe.txt' (minus the rows of hypens):
As list administrator, your authorization is required for a mailing list subscription request approval:
For: $member List: $listname
At your convenience, visit:
https://${domain}/mailman/admindb/lists/${short_listname}.${domain}/
This looks like a Mailman 2.1 URL. Are you sure you don't want something like
https://${domain}/mailman3/lists/${short_listname}.${domain}/
Yes. The server redirects MM3-style requests to MM2.1 URLs. I need to determine why, but that may be a different issue than the templates one.
There's nothing obvious in this vhost's nginx config that would generate the redirect. Will check, if I can't resolve this I'll open a different thread.
to approve or deny the request.
Instead the message that goes out at midnight daily reads like this:
That's a different message. It is sent from the
mailman notify
command run by cron. It's built from the list:admin:notice:pending template.
OK, wrong template then.
On successive nights I have placed copies of the 'list:admin:action:subscribe.txt' file above in these locations:
mm/var/templates/lists/test.lists.domain.tld/en
I hope you mean
/opt/mailman/mm/var/templates/lists/test.lists.domain.tld/en
Yes
/opt/mailman/mm/var/templates/site/en
Either of those should work. The lists one will take priority over the site one for that list.
and then in Postorius, with the same contents as above.
If you set a template in Postorius, it takes priority. If you later decide you want to use one in /opt/mailman/mm/var/templates/ you have to delete the postorius one.
The file versions are owned by the mailman user, and have 0644 permissions. Not sure this is necessary but I've restarted the mailman3 and mailmanweb services each time after a change.
There is no sign of trouble in the MM3 or web logs. The only thing I see is in the Postfix log, where the shorter and less helpful message goes out each night. I don't see anything in the template docs about this.
Questions:
- What to do to get the custom message working?
It should work. I suspect you need to go to the list's Settings -> Automatic Responses and set
Admin immed notify
to Yes.
It's enabled. I think this triggers notifications only for new subscription requests, not pending ones.
- Is there a way to trigger a subscribe reminder for one list only?
If by subscribe reminder you mean the
list:admin:action:subscribe.txt
message, yes that's the above list setting. If you mean the one sent from themailman notify
command, seemailman notify --help
for the options. You can specify one or more lists (default is all lists) via options and put them in your cron.Asking because there are other lists on this server with other requests pending, and I don't want to bother other moderators with multiple reminders per day. Not a big deal, but it would be nice to test this with one list rather than waiting up to 24 hours after each change.
You can test
mailman notify
at any time by running it by hand.
Thanks. This still isn't working as intended. I took these steps:
- Created the file '/opt/mailman/mm/var/templates/lists/test.lists.domain.tld/en/list:admin:action:pending.txt' with these contents (minus the hyphens top and bottom):
The $listname list has $count moderation requests waiting.
$data
At your convenience, visit:
https://${domain}/mailman3/lists/${short_listname}.${domain}/
to approve or deny the request.
Restarted the mailman3 and mailmanweb services
As the mailman user, ran the command 'mailman notify -l test.lists.domain.tld -v'
This generated an email message but its contents were the same as in my previous post:
The test@lists.domain.tld list has 1 moderation requests waiting.
Held Subscriptions: User: letmein@domain.tld
Please attend to this at your earliest convenience.
What I'm trying to do here is replicate a feature from MM2.1, where pending notifications had URLs embedded in the message. That's not available out of the box in MM3, and if there's a place for feature requests I'd be glad to ask that this be made the default.
For now, though, I'm looking to get this customization working.
Thanks.
dn