list footer questions
Hi,
This seems to me like basic simple questions, I have tried FAQ and other resources, with not much success.
I have two questions:
- When I send an email to a list, in gmail and yahoo I see the following text with the links at the end of the email body:
Testlist_dmark1 mailing list - listname@domain.tlb<mailto:testlist_dmark1@newlistserv.aaas.org> To unsubscribe send an email to listname-leave@domain.tlb
In<mailto:listname-leave@domain.tlb%0b%0bIn> outlook this is added as an attachment in the form of a TEXT file, when you open it, you see the same text. Question: Is there a way to change this, that it looks in outlook the same way as it appears in gmail/yahoo?
I know MS does it own stuff sometime and we have no impact on that, but I was thinking maybe we might change the footer in a way that outlooks sees that as part of email body.
- How may I change the format and the text in footer? I was expecting it under list > setting, in postorius, but I could not find it.
Best regards Mohsen Masoudfar Lead System Analyst, IT Operation American Association for the Advancement of Science 1200 New York Ave, NW, Washington, DC 20005 202-326-7087
On 5/8/20 12:52 PM, Mohsen Masoudfar wrote:
Hi,
This seems to me like basic simple questions, I have tried FAQ and other resources, with not much success.
I have two questions:
- When I send an email to a list, in gmail and yahoo I see the following text with the links at the end of the email body:
Testlist_dmark1 mailing list - listname@domain.tlb<mailto:testlist_dmark1@newlistserv.aaas.org> To unsubscribe send an email to listname-leave@domain.tlb
In<mailto:listname-leave@domain.tlb%0b%0bIn> outlook this is added as an attachment in the form of a TEXT file, when you open it, you see the same text. Question: Is there a way to change this, that it looks in outlook the same way as it appears in gmail/yahoo?
There are a few things going on here. First, the actual footer is
Testlist_dmark1 mailing list - listname@domain.tlb To unsubscribe send an email to listname-leave@domain.tlb
The <mailto:...> links are added by the Mail client displaying the mail.
In outlook this is added as an attachment in the form of a TEXT file, when you open it, you see the same text. Question: Is there a way to change this, that it looks in outlook the same way as it appears in gmail/yahoo?
I know MS does it own stuff sometime and we have no impact on that, but I was thinking maybe we might change the footer in a way that outlooks sees that as part of email body.
Yes, this is an outlook thing, but you do have some control. See the FAQ article at <https://wiki.list.org/x/4030707> for a more detailed explanation, but the issue is that after any content filtering has been applied, the message is still multipart so Mailman adds the footer as a separate MIME text/plain part at the end of the message.
You can avoid this by doing heavy content filtering on the messages. Namely, accept only multipart, text/plain and text/html, collapse alternatives and convert html to plain text. Note that some of this involves updating the list's pass_types which is not exposed in Postorius before 1.3.3 which is not yet released.
- How may I change the format and the text in footer? I was expecting it under list > setting, in postorius, but I could not find it.
It's the top level Templates tab in Postorius (just left of Settings). It was added in Postorius 1.2.1.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi,
Thanks again for your help.
When I check the postorius version, it says 1.1.2-3: [509]# apt list | grep postorius python-django-postorius/bionic,now 1.1.2-3 all [installed,automatic]
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?
Thanks Mohsen
-----Original Message----- From: Mark Sapiro <mark@msapiro.net> Sent: Friday, May 8, 2020 4:44 PM To: mailman-users@mailman3.org Subject: [MM3-users] Re: list footer questions
[EXTERNAL EMAIL]
On 5/8/20 12:52 PM, Mohsen Masoudfar wrote:
Hi,
This seems to me like basic simple questions, I have tried FAQ and other resources, with not much success.
I have two questions:
- When I send an email to a list, in gmail and yahoo I see the following text with the links at the end of the email body:
Testlist_dmark1 mailing list - listname@domain.tlb<mailto:testlist_dmark1@newlistserv.aaas.org> To unsubscribe send an email to listname-leave@domain.tlb
In<mailto:listname-leave@domain.tlb%0b%0bIn> outlook this is added as an attachment in the form of a TEXT file, when you open it, you see the same text. Question: Is there a way to change this, that it looks in outlook the same way as it appears in gmail/yahoo?
There are a few things going on here. First, the actual footer is
Testlist_dmark1 mailing list - listname@domain.tlb To unsubscribe send an email to listname-leave@domain.tlb
The <mailto:...> links are added by the Mail client displaying the mail.
In outlook this is added as an attachment in the form of a TEXT file, when you open it, you see the same text. Question: Is there a way to change this, that it looks in outlook the same way as it appears in gmail/yahoo?
I know MS does it own stuff sometime and we have no impact on that, but I was thinking maybe we might change the footer in a way that outlooks sees that as part of email body.
Yes, this is an outlook thing, but you do have some control. See the FAQ article at <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.list.org%2Fx%2F4030707&data=01%7C01%7Cmmasoudf%40aaas.org%7C5cee0e8e38c645260f9908d7f390b8a5%7C2eebd8ff9ed140f0a15638e5dfb3bc56%7C0&sdata=RMIGTGRt%2Fjv7109Hb%2BZ76VSt1U8LQgXRzC8VlxFz2cE%3D&reserved=0> for a more detailed explanation, but the issue is that after any content filtering has been applied, the message is still multipart so Mailman adds the footer as a separate MIME text/plain part at the end of the message.
You can avoid this by doing heavy content filtering on the messages. Namely, accept only multipart, text/plain and text/html, collapse alternatives and convert html to plain text. Note that some of this involves updating the list's pass_types which is not exposed in Postorius before 1.3.3 which is not yet released.
- How may I change the format and the text in footer? I was expecting it under list > setting, in postorius, but I could not find it.
It's the top level Templates tab in Postorius (just left of Settings). It was added in Postorius 1.2.1.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.mail...
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
I must be really close on this, and I hope it's ok that I'm jumping in on this thread. I am also using the mailman-full package on Ubuntu 18.04 (and have been successfully running a bunch of lists now for almost 2 years!). I think I'm doing what the docs say to do, in order to override specific list footers, but to no avail. Everything else about my system is working great - I just can't customize templates.
So I have a template file here: /var/lib/mailman3/templates/lists/f2p2-test.udfcd-lists.org/en/list:member:regular:footer.txt
I had to create everything below templates/ as that folder was empty on install. I made sure what I created had the same permissions as the templates folder. I'm not sure what else to do. Is there a configuration file somewhere perhaps the identifies the path of the templates folder and maybe I need to adjust it?
I appreciate the help.
On 6/7/20 9:40 AM, kelly.close@lrewater.com wrote:
So I have a template file here: /var/lib/mailman3/templates/lists/f2p2-test.udfcd-lists.org/en/list:member:regular:footer.txt
I had to create everything below templates/ as that folder was empty on install. I made sure what I created had the same permissions as the templates folder. I'm not sure what else to do. Is there a configuration file somewhere perhaps the identifies the path of the templates folder and maybe I need to adjust it?
There are two things. One is the location of the templates/
directory.
That is located in $var_dir
and the value of that depends on the
settings for
[mailman]
layout:
and
[paths.<layout_value>]
var_dir:
in mailman.cfg. I'm not certain, but I think /var/lib/mailman3/
is
correct for the Debian/Ubuntu package.
The other thing that affects this is the value of the URI for the template in the database. This is somewhat tricky. The docs are at <https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/templates.html>, but there isn't an example of retrieving URIs via REST. I.e. something like
curl -urestadmin:restpass
http://localhost:8001/3.1/lists/f2p2-test.udfcd-lists.org/uris
should work, but returns a 404 when I try it on one of my lists that has a URI.
I look in mailman's database with a query like
select name, context, uri from template;
What you are looking for is a row with name
=
list:member:regular:footer
and context
=
f2p2-test.udfcd-lists.org
. If there is one and it has a uri other than
mailman:///$listname/$language/list:member:regular:footer.txt
then
Mailman will look there for the template.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Well, Glory Be! My .cfg settings were fine but the public.template table was empty (I'm using PostgreSQL and accessing it with pgAdmin). I had not considered that there needed to be database content representing the template but it makes sense. Everything else is in there, which is the whole reason why we went with Mailman3 in the first place.
After manually creating this record in the public.template table it WORKED!!! name = list:member:regular:footer context = f2p2-test.udfcd-lists.org uri = file:////var/lib/mailman3/templates/lists/f2p2-test.udfcd-lists.org/en/list:member:regular:footer.txt (username and password were left blank)
Thanks so much for pointing me in the right direction!
On 6/7/20 3:22 PM, kelly.close@lrewater.com wrote:
Well, Glory Be! My .cfg settings were fine but the public.template table was empty (I'm using PostgreSQL and accessing it with pgAdmin). I had not considered that there needed to be database content representing the template but it makes sense. Everything else is in there, which is the whole reason why we went with Mailman3 in the first place.
After manually creating this record in the public.template table it WORKED!!! name = list:member:regular:footer context = f2p2-test.udfcd-lists.org uri = file:////var/lib/mailman3/templates/lists/f2p2-test.udfcd-lists.org/en/list:member:regular:footer.txt (username and password were left blank)
username and password are only required for basic auth to the URI if needed so blank is correct.
However, you shouldn't have needed to do that. I only mentioned it in case there was an entry for the name and context with a URI pointing elsewhere. The default if there is no entry is to use Mailman's normal search rules which include templates/lists/<list-id>/en/list:member:regular:footer.txt.
So I have to think that without that entry, it was searching a different templates/ directory.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 6/7/20 3:47 PM, Mark Sapiro wrote:
However, you shouldn't have needed to do that. I only mentioned it in case there was an entry for the name and context with a URI pointing elsewhere. The default if there is no entry is to use Mailman's normal search rules which include templates/lists/<list-id>/en/list:member:regular:footer.txt.
The search rules are documented in the code at <https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/utilities/i18n.py#L44>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I agree Mark. I can't see the issue but those search rules are clear. I'm glad to know I can "force" it to work with the table records but I would like to figure out the more systemic issue in case it could affect other things. ~Kelly
K. Kelly Close, P. E. Senior Project Manager | Water Rights Engineer | Technology Team Lead Office: 303-455-9589 | Direct: 303-867-7665 Kelly.Close@LREwater.com <http://www.lrewater.com/> LREWATER.COM <http://lrewater.com/> 1221 Auraria Parkway, Denver, CO 80204
***CONFIDENTIALITY NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.*
On Sun, Jun 7, 2020 at 5:14 PM Mark Sapiro <mark@msapiro.net> wrote:
On 6/7/20 3:47 PM, Mark Sapiro wrote:
However, you shouldn't have needed to do that. I only mentioned it in case there was an entry for the name and context with a URI pointing elsewhere. The default if there is no entry is to use Mailman's normal search rules which include templates/lists/<list-id>/en/list:member:regular:footer.txt.
The search rules are documented in the code at < https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/utilities/i18n....
.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Mark Sapiro wrote:
There is documentation at https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/t..., but it can be difficult to follow. https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/t... describes the various templates and the substitutions available.
Speaking of this: how do I get a nice *-leave address, like the one in the footer below this message? There doesn't seem to be a template placeholder for this.
Thank you Stanisław
On 3/14/22 04:26, Stanisław Findeisen via Mailman-users wrote:
Speaking of this: how do I get a nice *-leave address, like the one in the footer below this message? There doesn't seem to be a template placeholder for this.
Yes, there is not a placeholder for the -leave address. This list uses
To unsubscribe send an email to ${short_listname}-leave@${domain}
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (5)
-
Kelly Close
-
kelly.close@lrewater.com
-
Mark Sapiro
-
Mohsen Masoudfar
-
Stanisław Findeisen