Skip to Content.
Sympa Menu

en - RE: [sympa-users] Filtering of HTML messages for Sympa Archives - Why ??

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Steve Shipway <address@concealed>
  • To: "'address@concealed'" <address@concealed>, "'address@concealed'" <address@concealed>
  • Subject: RE: [sympa-users] Filtering of HTML messages for Sympa Archives - Why ??
  • Date: Tue, 28 May 2013 00:16:19 +0000

> We have recently upgraded from Sympa 5 to 6, and have since noticed that
> archived.pl now "cleans" HTML messages (via a subroutine
> clean_archived_message()).

I also noticed this. I think the rationale was that, by making links and
email addresses in messages unclickable, it prevents link spam via mailing
list archives and the like.

However, I don't like it... and our users want to retain clickable links in
archives, as with the old MailMan system.

So, this is how to get rid of it!

First, you need to edit the file mhonarc-ressources.tt2 (yes, that double s
is correct) in your Sympa config directory. Look for the MIMEARGS
definition. Set the following options:

<MIMEARGS>
text/plain; asis=us-ascii:iso-8859-1:iso-8859-2 nonfixed quote htmlcheck
maxwidth=78 link="http,https,ftp,mailto"
text/html; asis=us-ascii:iso-8859-1:iso-8859-2 allownoncidurls
m2h_external::filter; subdir usename
</MIMEARGS>

This allows the archives to make embedded URLs in archived text postings into
hotlinks.

The next part requires you to modify the Sympa code... 8-O

In sympa/lib/tools.pm you need to add a couple of options to the
StripScripts::Parser. Around line 111 or so, add the AllowHref=>1 and
AllowMailto=>1 (if you want mailto links as well):

my $hss = HTML::StripScripts::Parser->new({ Context => 'Document',
AllowSrc => 1,
AllowHref => 1, #ADDED
AllowMailto => 1, #ADDED
Rules => {

This stops the links from being removed in HTML emails when viewing the
archives.

Ideally, this behaviour should be set via an option in the wwsympa.conf,
but...

My version is 6.1.11; I doubt there are many changes in other 6.1.x but you
may find it different in 6.2a.x

Steve


Steve Shipway
ITS Unix Services Design Lead
University of Auckland, New Zealand
Floor 1, 58 Symonds Street, Auckland
Phone: +64 (0)9 3737599 ext 86487
DDI: +64 (0)9 923 6487
Mobile: +64 (0)21 753 189
Email: address@concealed
 Please consider the environment before printing this e-mail :
打印本邮件,将减少一棵树存活的机会


Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.19+.

Top of Page