Skip to Content.
Sympa Menu

en - Re: [sympa-users] archiving html attachments

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Peter Farmer <address@concealed>
  • To: address@concealed
  • Cc: Olivier Salaün - CRU <address@concealed>
  • Subject: Re: [sympa-users] archiving html attachments
  • Date: Mon, 23 Oct 2006 13:08:03 +0800

On Friday 20 October 2006 3:37 pm, Olivier Salaün - CRU wrote:

> Peter Farmer wrote:
> > I've just been trying to change the default mhonarc behaviour to get
> > html attachments to postings archived as seperate files that are then
> > linked to by the archived (plain text body) mail page. This was easy
> > enough to achieve by modifying the mhonarc_resources file. However, the
> > resulting linkage to the attachment is broken. The wwsympa tt2 setup
> > doesnt know how to deliver raw html files as is and you get an error
> > when following the generated links ( e.g.
> > http://testsite.com/updates/arc/testlist/2006-10/htmlpA3GuSYmpG.html )
> >
> > Sympa could not deliver the requested page for the following reason :
> > file error -
> > /address@concealed/2006-10/htmlpA3G
> >uSYmpG.html: absolute paths are not allowed (set ABSOLUTE option)
>
> This is a TT2 error : for security reason, the default behavior is to
> forbid inclusion/parsing of files within TT2 templates using absolute
> path. To go ahead, you should :
>
> * either add the path to your attachements to the allowed path
> (using tt2::add_include_path()) in wwsympa::do_arc()
> * or allow absolute paths to be used (using
> tt2::allow_absolute_path()) also in wwsympa::do_arc()
>
> The drawback of each solution is that you'll have to patch Sympa ; it
> might bring you into troubles the next time you upgrade Sympa.

I'm already patching sympa to meet various needs - its in cvs and I just
have to merge via the vendor branch whenever you release a new version. But
it would be nice not to have to modify wwwsympa anymore than necessary. I
think its a good feature for sympa to have to be able to store valid
attachments in the archives - at least for controlled content posting as in
the newsletter style scenarios.

> If you explain your needs (ie why you need attachements to be stored
> elsewhere), then we might find a standard way (=natively in the
> software) to meet your needs.

I dont need them stored elsewhere - the archive directory is fine. And thats
where they go in my current mhonarc setup. The problem is that wwsympa cant
deliver the attachment files for viewing ( generating the tt2 error
instead). The thing is, both the archived, htmlified email body and is the
corresponding attachment are in the same directory, but do_arc can only
deliver the message (embedded via the main.tt2 template) but not the
standalone html file in the attachment (which isnt meant to be viewed
inside the wwsympa interface, but either in its own window or at least
inside a frame - i.e. needs to be delivered as-is .

so
http://test.site.com/sympa/arc/testlist/2006-10/msg00001.html
works, but not the url for its attachment which is in the same physical
directory :
http://test.site.com/sympa/arc/testlist/2006-10/htmlpA3GuSYmpG.html

Essentially, the attachments sent to the list in question, being copies of
web page content that are reconfigured to be viewed offline, are full html
documents with embedded stylesheets. They cannot render properly if left
inline in the default mhonarc setup on sympa. I want them to be stored in
the sympa archive along with the email they came with and to be accessible
via a link in the archived page. Using mhonarcs config options I can do
everything but get wwwsympa to deliver the stored attachment document. I
dont mind setting up a web server alias to deliver the archive files (say
like http://test.site.com/sympa-archives/ ) but I havent been able to
figure out how to get mhonarc to generate the appropriate link to the
attachment file on the archive page ( e.g.
http://test.site.com/sympa-archives/testlist/2006-10/htmlpA3GuSYmpG.html ).
The closest I can get is :
http://test.site.com/sympa-archives/testlist/htmlpA3GuSYmpG.html

A dynamic part of the path - the month directory - is a runtime value and
cant be embedded in the mhonarc_resources config as far as I can tell. It
appears to be a current limitation in mhonarc. The examples given on the
mhonarc site only deal with a single url path for ALL attachment files it
will ever create. Of course sympa creates a new subdir for each month ...


Regards
Peter Farmer






Archive powered by MHonArc 2.6.19+.

Top of Page