Re: State of the art for HTML-to-text rendering?

Steffen Nurpmeso <[email protected]> Wed, 13 Nov 2024 18:45:59 +0100
Newsgroups gmane.mail.nmh.devel
Message-ID <20241113174559.f5t0X4Lr@steffen%sdaoden.eu>
Lexi Winter wrote in
 <[email protected]>:
 |Conrad Hughes:
 |> [ part  - text/plain -   1.1KB  ]
 |> Hi all,
 |>
 |> Wondering what folk use these days to render HTML emails in a terminal
 |> window?  I've an old recipe which I picked up from the list as follows:
 |>
 |>   mhshow-show-text/html: env SOCKS_SERVER="127.0.0.1:1" socksify \
 |>   w3m -T text/html -dump -o display_image=false -o display_link_number=tr\
 |>   ue '%f' -cols 80
 |
 |i would be interested to know if anyone has managed to create a
 |sandboxed HTML renderer, to avoid issues where an incoming HTML email
 |exploits a bug in w3m/elinks/lynx/whatever to execute code on the local
 |system.
 |
 |i am particularly interested in this on FreeBSD -- while FreeBSD has a
 |very robust sandboxing system (Capsicum), it doesn't really allow
 |unmodified executables to be run in the sandbox so it doesn't help here.

Create a dedicated jail?
This is of course a fat thing per se, but you could surely setup
a jail with null mounts, this is possible i think -- i think the
FreeBSD handbook used to have a page that shows this, many years
ago.  It is doable with Linux and unshare as well as overlay
mounts, in that the actually writable storage is (1) separate and
(2) small in size (plus CPU and memory restricted via cgroups).
(All that kernel and filesystem bugs aside, of course.)

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
|
|And in Fall, feel "The Dropbear Bard"s ball(s).
|
|The banded bear
|without a care,
|Banged on himself fore'er and e'er
|
|Farewell, dear collar bear