On 5/14/20 2:49 PM, Mohsen Masoudfar wrote:
It is on Ubuntu18.04 and has been installed with Ubuntu package Mailman-full. There is no update available yet. So it looks like I cannot use the easy way of modifying the templates. Question: Is there a way to achieve the same by updating the code?
You don't have to modify code. You can set a footer in Mailman's file hierarchy. There is a var/templates directory, maybe somewhere like /var/lib/mailman/templates in the Ubuntu package. This directory can contain subdirectories lists, domains and site. These may or may not existb but the layout is the site directory contains subdirectories for language codes, i.e. 'en', 'fr', 'de', etc. The domains directory contains subdirectories for domains like 'example.com', example.net, etc. and those contain the language subdirectories. The lists directory contains subdirectories for lists like list.example.com and those contain the language subdirectories.
Now when mailman is looking for a template, it looks in this hierarchy first, e.g. when looking for an English language footer for the list@example.com list for regular members it will look in this order:
templates/lists/list.example.com/en/list:member:regular:footer.txt templates/domains/example.com/en/list:member:regular:footer.txt templates/site/en/list:member:regular:footer.txt
before falling back to a default. The name for a digest footer is list:member:digest:footer.txt, or there can be a list:member:generic:footer.txt file which is for both regular and digest deliveries.
There is documentation at <https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/templates.html>, but it can be difficult to follow.
<https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/templates.html#templated-texts>
describes the various templates and the substitutions available. Note
that the name of a file in the above hierarchy is the template name with
.txt
appended.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan