[Mailman-Users] How to wrap text in archived messages

2022-05-22 Thread Mark Dale via Mailman-Users
Hi,

I'm looking for a way to wrap lines in archived messages.

Messages from some mail clients (eg. Gmail) have their lines wrapped to 72 
chars in the archived version, while archived messages from others (eg. 
Thunderbird, Outlook) display unwrapped lines forcing the reader to scroll 
horizontally.

Looking at the HTML page source -- in both cases (wrapped and unwrapped) I see 
the message content is enclosed by PRE tags. 




Lorem ipsum dolor sit amet, consectetur ...

Ut enim ad minim veniam, quis nostrud ...


  



The template (article.html) contains the following:
...


%(body)s


...

>From what I can figure out, the PRE tags come from
>.../mailman/Mailman/Archiver/HyperArch.py in a block of code lines 1290 to 
>1314 ...

///

def format_article(self, article):
# called from add_article
# TBD: Why do the HTML formatting here and keep it in the
# pipermail database?  It makes more sense to do the html
# formatting as the article is being written as html and toss
# the data after it has been written to the archive file.
lines = filter(None, article.body)
# Handle   directives
if self.ALLOWHTML:
self.__processbody_HTML(lines)
self.__processbody_URLquote(lines)
if not self.SHOWHTML and lines:
lines.insert(0, '')
lines.append('')
else:
# Do fancy formatting here
if self.SHOWBR:
lines = map(lambda x:x + "", lines)
else:
for i in range(0, len(lines)):
s = lines[i]
if s[0:1] in ' \t\n':
lines[i] = '' + s
article.html_body = lines
return article




And the lines in that block that seem responsible for the PRE tags are ...

lines.insert(0, '')
lines.append('')

My question is: Can those PRE tags be removed and replaced with something 
equivalent to PHP's "nl2br" (which inserts a line break BR in place of new line 
entries)?

A Google search for such an equivalent gives me ...

def nl2br(s):
return '\n'.join(s.split('\n'))

With zero understanding of Python my attempts to implement this have failed so 
far and I may well be barking up the wrong tree completely. Any clues or 
pointers gratefully received.

Thanks.
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Double opt-in, Question about adding people to a Mailman list

2022-05-22 Thread Carl Zwanzig

On 5/22/2022 12:17 AM, Jayson Smith wrote:
Recently our president has become concerned that some people wanting to join 
the group may not be responding to the standard Mailman subscription 
confirmation message because, from the From: line and the subject line, 
they're not sure what it is and don't want to open it.


That's not an uncommon problem but it's often managed simply by some 
instructions that explain what they'll receive-


"When you ask to subscribe and enter your email address, you will soon 
receive an email there that looks like (insert example); you must Reply to 
that email in order to be added to the %%%-list. We do this to make sure 
that your email works and that you want to receive mail from it."


or something like that

Later,

z!
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Double opt-in, Question about adding people to a Mailman list

2022-05-22 Thread Mark Sapiro

On 5/22/22 08:46, Stephen J. Turnbull wrote:

Mark Sapiro writes:



  > From: listname-confirm+the_hex_token

@Mark This is "From: listname-confirm+the_hex_to...@example.com",
right?


Yes, that's what I meant.

--
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Double opt-in, Question about adding people to a Mailman list

2022-05-22 Thread Stephen J. Turnbull
Mark Sapiro writes:
 > On 5/22/22 00:17, Jayson Smith wrote:

 > > I run a Mailman 2 list for an organization of writers with disabilities. 
 > > Recently our president has become concerned that some people wanting to 
 > > join the group may not be responding to the standard Mailman 
 > > subscription confirmation message

@Jayson Is this especially a problem for people with disabilities, as
compared to new subscribers in general?

In fact, I expect the answer is "no".  But I think it's worth trying
to improve this in Mailman 3 for the general population, too, and if
we can improve this in a more accessible way I would like to be aware
of it.

 > By default, confirmation requests are sent with From: and Subject: like
 > ```
 > From: listname-requ...@example.com
 > Subject: confirm+the_hex_token
 > ```
 > If you, or the installation sets
 > ```
 > VERP_CONFIRMATIONS = Yes
 > ```
 > in mm_cfg.py, they will be sent like
 > ```
 > From: listname-confirm+the_hex_token

@Mark This is "From: listname-confirm+the_hex_to...@example.com",
right?  I'm not sure that's much better, especially in Jayson's
situation where the email address and the organization are hard to
associate with each other.

 > Not really. Person C can still send email to person B spoofing person A. 
 > In your scenario, upon receiving email allegedly from person A, person B 
 > would need to respond to person A asking for confirmation and receive 
 > confirmation from person A before adding person A to the list.

Note that the point of this multipart handshake is that email itself
is insecure; it is rather easy to fake authorship of an email message
well enough to get past someone who is not well-versed in email
arcana.  It is much harder to fake the ability to read from a mailbox.

So it's really not possible to omit the "send token" and "receive
confirmation" steps if you want to be sure the person who requests a
subscription has the right to request people send stuff to the
mailbox.

Steve
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Double opt-in, Question about adding people to a Mailman list

2022-05-22 Thread Mark Sapiro

On 5/22/22 00:17, Jayson Smith wrote:

Hi,


I run a Mailman 2 list for an organization of writers with disabilities. 
Recently our president has become concerned that some people wanting to 
join the group may not be responding to the standard Mailman 
subscription confirmation message because, from the From: line and the 
subject line, they're not sure what it is and don't want to open it. I 
understand why the subject line needs to be what it is, so people can 
just reply to the message to confirm their subscription. Even more 
confusing is that for complicated historical reasons the name of our 
list has nothing to do with the name of our organization, which might 
confuse prospective new members further.



By default, confirmation requests are sent with From: and Subject: like
```
From: listname-requ...@example.com
Subject: confirm+the_hex_token
```
If you, or the installation sets
```
VERP_CONFIRMATIONS = Yes
```
in mm_cfg.py, they will be sent like
```
From: listname-confirm+the_hex_token
Subject: Your confirmation is required to join the listname mailing list
```
If you can do this, it will help.


One proposal for fixing this problem is for our secretary to confirm 
that a new member does want to be subscribed to our list, then use the 
Mailman interface to add the new member outright, without that person 
having to go through the confirmation process. My concern with this 
approach is the ever-present spam police. I know that the way Mailman 
works by default, where someone requests to subscribe, receives a 
confirmation Email, then has to take some action to confirm their 
subscription, is confirmed opt-in or double opt-in. My question is, if 
person A tells person B they want to join the list, through Email or 
some other method that person B can later document, then person B puts 
person A on the list with no further confirmation required, does this 
constitute confirmed/double opt-in in the eyes of anyone to whom this 
matters?



Not really. Person C can still send email to person B spoofing person A. 
In your scenario, upon receiving email allegedly from person A, person B 
would need to respond to person A asking for confirmation and receive 
confirmation from person A before adding person A to the list.


--
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Double opt-in, Question about adding people to a Mailman list

2022-05-22 Thread Jayson Smith

Hi,


I run a Mailman 2 list for an organization of writers with disabilities. 
Recently our president has become concerned that some people wanting to 
join the group may not be responding to the standard Mailman 
subscription confirmation message because, from the From: line and the 
subject line, they're not sure what it is and don't want to open it. I 
understand why the subject line needs to be what it is, so people can 
just reply to the message to confirm their subscription. Even more 
confusing is that for complicated historical reasons the name of our 
list has nothing to do with the name of our organization, which might 
confuse prospective new members further.



One proposal for fixing this problem is for our secretary to confirm 
that a new member does want to be subscribed to our list, then use the 
Mailman interface to add the new member outright, without that person 
having to go through the confirmation process. My concern with this 
approach is the ever-present spam police. I know that the way Mailman 
works by default, where someone requests to subscribe, receives a 
confirmation Email, then has to take some action to confirm their 
subscription, is confirmed opt-in or double opt-in. My question is, if 
person A tells person B they want to join the list, through Email or 
some other method that person B can later document, then person B puts 
person A on the list with no further confirmation required, does this 
constitute confirmed/double opt-in in the eyes of anyone to whom this 
matters?



Thanks for any thoughts,


Jayson


--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/