[Mailman-Users] Digest indexes

Andrew Hodgson andrew at hodgsonfamily.org
Tue Dec 16 20:14:45 CET 2014

Mark Sapiro wrote:

>On 12/16/2014 08:56 AM, Jay Ashworth wrote:
>> --- Original Message -----
>>> From: "Stephen J. Turnbull" <stephen at xemacs.org>
>>> Andrew Hodgson writes:

>>>> I run a high volume list (around 80 messages per day), and we have 
>>>> complaints from digest users that the digests are difficult to work 
>>>> with. One requested feature is could the digests be in HTML format, 
>>>> and a link be presented in the table of contents to go to each 
>>>> message. Can this be done in Mailman by working with the digest 
>>>> templates?

>>> No, it cannot be done without coding.


I pretty much thought as much, but wanted to check anyway.

>>> And it would not be easy. HTML does not provide a "mail message"
>>> element, so although it would be trivial to create the table of 
>>> contents, there is no good way to indicate what is at the other end 
>>> of those links.

>> I believe that what Andrew is really looking for is just something 
>> that could put in anchor links to the beginning of each message's test 
>> as the message is HTMLified.  I agree that it would require code, but 
>> I don't think that code would need to have semantic knowledge of mail 
>> messages; it only needs to know where the edge of each message is.

That was exactly what I was looking for, just didn't say it as well.

>It is not possible to do this at all for the plain text format digest since by definition, that contains no HTML.

I wouldn't look to do it for the plain text version, some users may not want this at all so would stick to the plain text version.  You could possibly look into creating a different digest type such as HTML indexed or similar, but I would see it as a completely different digest type.

>For the MIME format digest, I think Stephen is correct. The MIME digest currently has the following structure

>    text/plain
>        (the boilerplate)
>    text/plain
>        (the digest_header if any)
>    text/plain
>         (the TOC)
>    multipart/digest
>        message/rfc822
>            (the first message)
>        message/rfc822
>            (the next message)
>    text/plain
>        (the digest_footer if any)

>One would have to create the TOC as text/html rather than text/plain and add links to the various message parts. These can't be anchor tags. Do do that would require HTMLifying the entire digest. They could probably be >RFC2393 mid: references though. That might not be too difficult to do, although various popular web mail clients, e.g. gmail, currently don't make it possible to open an individual digest message as a separate message, so how >they would deal with such a digest is unknown.

I don't believe you would need each message as separate MIME parts.  For reference I am going to copy out a template an admin of another list sent me - they are using Sympa.  This is a template they use for doing exactly the same thing.  I don't know anything about Sympa, but I think the template will give you a slightly better idea of what I am looking for.


---cut here---

We worked on a new version of the digest plain.

You should try this template on a test list.

From: [% fromlist %]
To: [% to %]
Reply-to: [% replyto %]
Subject: [% FILTER qencode %][%|loc(list.name,date)%]%1 Digest %2[%END%] [% IF total_group > 1 -%]([% current_group %]/[% total_group %])[% END %][%END%]
Content-Type: multipart/mixed; boundary="[% boundary1 %]"

--[% boundary1 %]
Content-Type: text/html; charset="UTF-8";
Content-Transfer-Encoding: 8bit

[%|loc(list.name,date)%]%1 Digest %2[%END%] 


[%|loc%]Table of contents:[%END%]

[% FOREACH m = msg_list -%]
<li><a name="N0"><a href="#N[% m.id %]">[% m.id %] - [% m.subject %]</a> - [% m.from %] </li>
[% END %]
<hr color="#0000ff">

[% FOREACH m = msg_list -%]
<p></b><a name="N[% m.id %]">[% m.id %] -</a> Date: [% m.date %] Author: [% m.from %] <br>
Subject: <b><font color="#0000ff"> [% m.subject %] </b></font><br>

[% m.plain_body %]

<table align="center">
<td><a href="mailto: [% m.from %]?Subject= [% m.subject %] "> Answer to author</a></td>
<td> <--> </td>
<td><a href="mailto: [% replyto %]?Subject= [% m.subject %] "> Answer to list</a></td>
<td> <--> </td>
<td><a href="#N0">Back to table of content</a></td>
<hr color="#0000ff"></font>

[% END %]

[%|loc(list.name,date)%]End of %1 Digest %2[%END%]

--[% boundary1 %]--

More information about the Mailman-Users mailing list