Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Linux: The OS people choose without $200,000,000 of persuasion. -- Mike Coleman


computers / comp.mail.mutt / Re: Stripping html using mutt

SubjectAuthor
* Stripping html using muttbob prohaska
+* Re: Stripping html using muttRoger Bell_West
|`* Re: Stripping html using muttEric Pozharski
| `* Re: Stripping html using muttbob prohaska
|  +* Re: Stripping html using muttbob prohaska
|  |`* Re: Stripping html using muttRich
|  | `* Re: Stripping html using muttbob prohaska
|  |  `- Re: Stripping html using muttEric Pozharski
|  `- Re: Stripping html using muttEric Pozharski
`* Re: Stripping html using muttEike Rathke
 +- Re: Stripping html using muttEike Rathke
 `* Re: Stripping html using muttbob prohaska
  `* Re: Stripping html using muttAnt
   `* Re: Stripping html using muttbob prohaska
    `* Re: Stripping html using muttJorgen Grahn
     `- Re: Stripping html using muttEike Rathke

1
Stripping html using mutt

<sjtghm$a4d$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=39&group=comp.mail.mutt#39

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bp...@www.zefox.net (bob prohaska)
Newsgroups: comp.mail.mutt
Subject: Stripping html using mutt
Date: Sun, 10 Oct 2021 01:44:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <sjtghm$a4d$1@dont-email.me>
Injection-Date: Sun, 10 Oct 2021 01:44:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="482cc7d0eb937c140764db549d3bc64e";
logging-data="10381"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+deruRfB+cPc9PcbiJOKo8H5y6z4iIlt8="
Summary: Can mutt autostrip html?
Keywords: html strip plain text
User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/12.2-STABLE (arm))
Cancel-Lock: sha1:kTTu9y4Fnaux4DNo0WtDvyihYyw=
 by: bob prohaska - Sun, 10 Oct 2021 01:44 UTC

I use mutt via ssh and neither need nor want MIME enhancements,
just the text. Can mutt display the text portion of the message
alone? If the text is of interest, I can always go back for the
formatting and MIME enhancements. It's common these days to get
a few words of meaningful message buried in kilobytes of HTML.

Thanks for reading, and any suggestions.

bob prohaska

Re: Stripping html using mutt

<20211010041304.459075189967738@firedrake.org>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=40&group=comp.mail.mutt#40

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!aioe.org!nntp.terraraq.uk!news1.firedrake.org!.POSTED.heliophagous.homenet.firedrake.org!not-for-mail
From: roger+cm...@nospam.firedrake.org (Roger Bell_West)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Sun, 10 Oct 2021 03:18:39 -0000 (UTC)
Organization: Firedrake Synthesis
Message-ID: <20211010041304.459075189967738@firedrake.org>
References: <sjtghm$a4d$1@dont-email.me>
Injection-Date: Sun, 10 Oct 2021 03:18:39 -0000 (UTC)
Injection-Info: lustrous.firedrake.org; posting-host="heliophagous.homenet.firedrake.org:10.0.0.1";
logging-data="10466"; mail-complaints-to="usenet@lustrous.firedrake.org"
User-Agent: slrn/1.0.3 (Linux)
X-No-Archive: yes
X-Archiving-0: This post may be retained only in archives with
X-Archiving-1: contents selected by humans on a per-article basis.
 by: Roger Bell_West - Sun, 10 Oct 2021 03:18 UTC

On 2021-10-10, bob prohaska wrote:
>I use mutt via ssh and neither need nor want MIME enhancements,
>just the text. Can mutt display the text portion of the message
>alone? If the text is of interest, I can always go back for the
>formatting and MIME enhancements. It's common these days to get
>a few words of meaningful message buried in kilobytes of HTML.

This sounds like what mutt does already: display the plain text, let
you know the other parts are there. If you want the useful content out
of an HTML message,

auto_view text/html

will use your mailcap (and a text-mode web browser such as elinks) to
display HTML inline as though it were useful text. Searching for
auto_view in the manual should be helpful.

Re: Stripping html using mutt

<slrnsmaetg.8o0.whynot@orphan.zombinet>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=41&group=comp.mail.mutt#41

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: why...@pozharski.name (Eric Pozharski)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Tue, 12 Oct 2021 07:39:28 +0000
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <slrnsmaetg.8o0.whynot@orphan.zombinet>
References: <sjtghm$a4d$1@dont-email.me>
<20211010041304.459075189967738@firedrake.org>
Injection-Info: reader02.eternal-september.org; posting-host="04bbd1801844ff77140ddef8b07b723b";
logging-data="8856"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sP2xAoAQLPTWJ31IfdWg4"
User-Agent: slrn/pre1.0.0-18 (Linux)
Cancel-Lock: sha1:61NFgFv2zyTCahmu9hDZ/4YMg6Y=
 by: Eric Pozharski - Tue, 12 Oct 2021 07:39 UTC

with <20211010041304.459075189967738@firedrake.org> Roger Bell_West
wrote:
> On 2021-10-10, bob prohaska wrote:

>> I use mutt via ssh and neither need nor want MIME enhancements, just
>> the text. Can mutt display the text portion of the message alone? If
>> the text is of interest, I can always go back for the formatting and
>> MIME enhancements. It's common these days to get a few words of
>> meaningful message buried in kilobytes of HTML.
>
> This sounds like what mutt does already: display the plain text, let
> you know the other parts are there. If you want the useful content out
> of an HTML message,
>
> auto_view text/html
>
> will use your mailcap (and a text-mode web browser such as elinks) to
> display HTML inline as though it were useful text. Searching for
> auto_view in the manual should be helpful.

Also 'alternative_order' might be needed (unfortunately, this setting is
somewhat vaguely documented, and I'm not bothered to find out what are
defaults). Or, read whole story in the manual, search for "MIME
Multipart/Alternative".

--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom

Re: Stripping html using mutt

<sk5b57$4l3$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=42&group=comp.mail.mutt#42

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bp...@www.zefox.net (bob prohaska)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Wed, 13 Oct 2021 01:01:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <sk5b57$4l3$1@dont-email.me>
References: <sjtghm$a4d$1@dont-email.me> <20211010041304.459075189967738@firedrake.org> <slrnsmaetg.8o0.whynot@orphan.zombinet>
Injection-Date: Wed, 13 Oct 2021 01:01:27 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c24abaf4fbe523a304651861b7c2b502";
logging-data="4771"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qQoGbcBJeESvmiPHqKu1MNSVmQx3Y95I="
User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/12.2-STABLE (arm))
Cancel-Lock: sha1:oRzYn62Ug3wiJCmckufCaAjV9dk=
 by: bob prohaska - Wed, 13 Oct 2021 01:01 UTC

Eric Pozharski <whynot@pozharski.name> wrote:
> with <20211010041304.459075189967738@firedrake.org> Roger Bell_West
> wrote:
>> On 2021-10-10, bob prohaska wrote:
>
>>> I use mutt via ssh and neither need nor want MIME enhancements, just
>>> the text. Can mutt display the text portion of the message alone? If
>>> the text is of interest, I can always go back for the formatting and
>>> MIME enhancements. It's common these days to get a few words of
>>> meaningful message buried in kilobytes of HTML.
>>
>> This sounds like what mutt does already: display the plain text, let
>> you know the other parts are there. If you want the useful content out
>> of an HTML message,
>>
>> auto_view text/html
>>
>> will use your mailcap (and a text-mode web browser such as elinks) to
>> display HTML inline as though it were useful text. Searching for
>> auto_view in the manual should be helpful.
>
> Also 'alternative_order' might be needed (unfortunately, this setting is
> somewhat vaguely documented, and I'm not bothered to find out what are
> defaults). Or, read whole story in the manual, search for "MIME
> Multipart/Alternative".
>

I'm now reduced to reading the mutt manual 8-)

I was hopeful there might be a switch in mutt that strips markup.
Invoking a proper html interpreter is more than I think I need.

Thanks for replying,

bob prohaska

Re: Stripping html using mutt

<sk6vol$s9m$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=43&group=comp.mail.mutt#43

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bp...@www.zefox.net (bob prohaska)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Wed, 13 Oct 2021 15:59:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <sk6vol$s9m$1@dont-email.me>
References: <sjtghm$a4d$1@dont-email.me> <20211010041304.459075189967738@firedrake.org> <slrnsmaetg.8o0.whynot@orphan.zombinet> <sk5b57$4l3$1@dont-email.me>
Injection-Date: Wed, 13 Oct 2021 15:59:17 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c24abaf4fbe523a304651861b7c2b502";
logging-data="28982"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zGQR/eqJxp/EmzQW6SLg9OIhkTgoGJHs="
User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/12.2-STABLE (arm))
Cancel-Lock: sha1:VkVgitAG8Suzkj+WSQkUGv5RoBw=
 by: bob prohaska - Wed, 13 Oct 2021 15:59 UTC

A bit of searching found these instructions for invoking lynx automatically:

https://blog.deadlypenguin.com/2009/04/21/mutt-and-lynx/

It seems to work, but acts automatically. The whole (and possibly futile)
point of my enterprise is to avoid involuntary invocation of additional
software while viewing untrusted email.

Is there some way to at least give myself a choice? I tried deleting
auto_view from the .muttrc line, but that triggered an error message.
Is there a command that prompts for permission?

Automatically stripping html would be ideal, followed by an option to
invoke an html viewer.

Thanks for reading!

bob prohaska

Re: Stripping html using mutt

<sk72ti$17l$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=44&group=comp.mail.mutt#44

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Wed, 13 Oct 2021 16:53:06 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <sk72ti$17l$1@dont-email.me>
References: <sjtghm$a4d$1@dont-email.me> <20211010041304.459075189967738@firedrake.org> <slrnsmaetg.8o0.whynot@orphan.zombinet> <sk5b57$4l3$1@dont-email.me> <sk6vol$s9m$1@dont-email.me>
Injection-Date: Wed, 13 Oct 2021 16:53:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2e2ddacda2904a8a761b1f307f20ec23";
logging-data="1269"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185PpnuiGcd2v0mRwVZ+M5Z"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:v/iBY/EjA2EKPZe5cZcUxckQxXg=
 by: Rich - Wed, 13 Oct 2021 16:53 UTC

bob prohaska <bp@www.zefox.net> wrote:
> A bit of searching found these instructions for invoking lynx automatically:
>
> https://blog.deadlypenguin.com/2009/04/21/mutt-and-lynx/
>
> It seems to work, but acts automatically. The whole (and possibly futile)
> point of my enterprise is to avoid involuntary invocation of additional
> software while viewing untrusted email.

Mutt contains neither an HTML viewer nor a HTML stripper. Mutt's
internal viewer simply shows the the message part you've chosen to view
as text data. If that message part is an HTML part, then you'd be
viewing the raw HTML (HTML being a superset of "text" data).

> Is there some way to at least give myself a choice?

You can set auto view to the text/plain content part, which will give
you the plain text part of the message. Then you can use the "v"
command to see the mime parts, and selectively view individual parts as
desired.

> I tried deleting auto_view from the .muttrc line, but that triggered
> an error message. Is there a command that prompts for permission?

I do not know of one built in to Mutt, but you could setup a bash
script that is invoked by mutt, that asks permission (look up the
"read" command and the -p option thereto) and then either invokes the
html to text conversion program (lynx et al.) or does not invoke it,
based upon your answer to the prompt.

> Automatically stripping html would be ideal, followed by an option to
> invoke an html viewer.

Note that "automatically stripping" would itself involve "involuntary
invocation of additional software while viewing untrusted email",
violating your wish not to do so.

Re: Stripping html using mutt

<slrnsmddvb.611.whynot@orphan.zombinet>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=45&group=comp.mail.mutt#45

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: why...@pozharski.name (Eric Pozharski)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Wed, 13 Oct 2021 10:41:47 +0000
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <slrnsmddvb.611.whynot@orphan.zombinet>
References: <sjtghm$a4d$1@dont-email.me>
<20211010041304.459075189967738@firedrake.org>
<slrnsmaetg.8o0.whynot@orphan.zombinet> <sk5b57$4l3$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="f990898d69d4790b65c52fdd1971f3f9";
logging-data="16014"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VLGwMdFPKtew0VEFstV8Z"
User-Agent: slrn/pre1.0.0-18 (Linux)
Cancel-Lock: sha1:iWO617F0M0kn21JIhRpuh0jIsQo=
 by: Eric Pozharski - Wed, 13 Oct 2021 10:41 UTC

with <sk5b57$4l3$1@dont-email.me> bob prohaska wrote:
> Eric Pozharski <whynot@pozharski.name> wrote:
>> with <20211010041304.459075189967738@firedrake.org> Roger Bell_West
>> wrote:
>>> On 2021-10-10, bob prohaska wrote:

>>>> I use mutt via ssh and neither need nor want MIME enhancements, just
>>>> the text. Can mutt display the text portion of the message alone?
*SKIP*
>>> This sounds like what mutt does already: display the plain text, let
>>> you know the other parts are there. If you want the useful content out
>>> of an HTML message,
>>>
>>> auto_view text/html
>>>
>>> will use your mailcap (and a text-mode web browser such as elinks) to
>>> display HTML inline as though it were useful text. Searching for
>>> auto_view in the manual should be helpful.
>>
>> Also 'alternative_order' might be needed
*SKIP*
>> Or, read whole story in the manual, search for "MIME
>> Multipart/Alternative".
> I'm now reduced to reading the mutt manual 8-)

Absolutely not. What you should read is mimeview(1), mailcap(5), and
(darn, I've totally missed it ten years ago) mailcap.order(5).

> I was hopeful there might be a switch in mutt that strips markup.

If mutt would begin have such switch that would be a good sign to start
looking for alternatives.

> Invoking a proper html interpreter is more than I think I need.

Web-designers disagree that lynx is proper html interpreter, I guess.

*CUT*

--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom

Re: Stripping html using mutt

<N3e8I61676aa8T246f@kulungile.erack.de>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=46&group=comp.mail.mutt#46

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: erack+nu...@posteo.de (Eike Rathke)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: 13 Oct 2021 23:25:20 GMT
Organization: possibly
Lines: 37
Message-ID: <N3e8I61676aa8T246f@kulungile.erack.de>
References: <sjtghm$a4d$1@dont-email.me>
X-Trace: individual.net d4vWG05pRMNMut+SFqa9WwEBAX+FG7ahFXFkXo6GNsO2PYyQ8=
Cancel-Lock: sha1:KdLq2fFtdkrXeuOhMiLAdWJM2gA=
X-Accept-Language: de,en
X-PGP-Hash: SHA256
X-PGP-Key: 0x6A6CD5B765632D3A
X-PGP-Sig: GnuPG-v2 From,Newsgroups,Subject,Message-ID
iQIzBAEBCAAdFiEEImXX86ewlcw5GGMLamzVt2VjLToFAmFnaqkACgkQamzVt2Vj
LTpSLA//W4ykmCaIWUqd78yVR6xhTIxpKrhfYMXbKsNOI15thhx7XaebWpcBe+IY
b6WmpOmumg9LuJ4zQCSEhKnxQnwzYfakFxQv10RpWZiJnq5bBqnSuDakFnKSrY6p
v29oWrKWT7rnLVXCD8yIf1oVjefsvHJVtASHqIAT3Ug6+ZYACyQRY2Lmgsg2L0Kd
/BYXiKKD/XC8bVU+9I6g91rCxrH6UUlGzG0dcF5vBDTnEUDl4QHO3O2iOPCooGXo
cvMRd6Tk5i4X0d9FGtsjZh0Y0Ye1UOhhwDBWcswe2seeOCFB6imNody/U9nYM4rm
aSNkpjfqTUA+K0ytVdxl0EeNggQhvU1mv5yM9n27hSIi0iE2pKOuuWHId0WZsK1K
Cflp+Tgar1xtn//JjSjg/e8iGXN0P8SGFz5u1hqB4AOXAtUCjAeQHtHXid3OpxPM
R+bUHontmgIh5vsmKdK00IBz7590vBgynzO9H+p6NUmSRA1K34FjASpubUlc8sJm
upB3dUjOsu6yMzXr5yfoNdQv0YapBHr3Yf6wn1Ld0+nHzlhKDL2VbMSOxvql2g2E
naC+ZiUasHo8BoH4tEUhA/KzhD81YTJsE9duFqX+nnQW73xwfWQ8w/qrU5jmIQbE
SQSDidv5Du6eRAgqU7OFMXCJPQZTFcQRb1ZTJadKiyP0OQ70xBE= =uw2s
User-Agent: slrn/1.0.3 (Linux)
 by: Eike Rathke - Wed, 13 Oct 2021 23:25 UTC

* bob prohaska, 2021-10-10 01:44 UTC:
> I use mutt via ssh and neither need nor want MIME enhancements,
> just the text. Can mutt display the text portion of the message
> alone?

Yes it can. Note though that for mixed multipart messages often the
text/plain part does not match the text/html part, especially in mails
from shitty shops and "enterprise grade" mail systems. So it may be
desirable to be able to choose which.

In your muttrc have

# use mailcap entry for defined types
unset implicit_autoview
unauto_view *
auto_view text/html
alternative_order text/plain text text/html

and in ~/.mailcap have

text/html; /usr/bin/elinks -localhost 1 -no-connect 1 -force-html -dump %s; copiousoutput; description=HTML Text; nametemplate=%s.html

(all on one line).

Install the elinks package. The muttrc alternative_order determines
which part is preferably displayed. The mailcap entry produces a textual
view of the text/html part if there is one present and that then is
displayed by mutt. In the index view or while viewing a message you can
still press 'v' and from the multiparts select either the text/plain or
text/html part to view.

Eike

--
OpenPGP/GnuPG encrypted mail preferred in all private communication.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A
Use LibreOffice! https://www.libreoffice.org/

Re: Stripping html using mutt

<N3e8I61676b60T2517@kulungile.erack.de>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=47&group=comp.mail.mutt#47

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: erack+nu...@posteo.de (Eike Rathke)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: 13 Oct 2021 23:27:37 GMT
Organization: possibly
Lines: 14
Message-ID: <N3e8I61676b60T2517@kulungile.erack.de>
References: <sjtghm$a4d$1@dont-email.me>
<N3e8I61676aa8T246f@kulungile.erack.de>
X-Trace: individual.net ykgcttm3L0cCd/8/2wHGMQb2KuzbszvsKUwDX+t94TvcoXzsw=
Cancel-Lock: sha1:5mMQLembCKAGIU7UFYNJKflR5iU=
X-Accept-Language: de,en
X-PGP-Hash: SHA256
X-PGP-Key: 0x6A6CD5B765632D3A
X-PGP-Sig: GnuPG-v2 From,Newsgroups,Subject,Message-ID
iQIzBAEBCAAdFiEEImXX86ewlcw5GGMLamzVt2VjLToFAmFna2AACgkQamzVt2Vj
LTo5NRAAvy8rKUQmjHKZ7WgeE8TS4/IqBIULIA+Bqq5VXkt/KNcY6/Ot+ZR7OoWW
PFsGvzs1bU73j4sBrWTa5cw1TZJaJJP+4v/O+0t/ii5SxUd/cfYC6pEUWy46VFeb
xhfcFSGmbzSzd/4DhkSXUT0lyqCF5i2lxrSAuQ7msEHEpWdm2An/NeWKLmkEuuSd
VqOo1bQnxtABBjHb3dRUvS2pe97ox51uv3D4wBa4QqO+LjVt/2CixSu0LGOm+qbl
bX2v3MnBBkPA5ltDeuNdX3lE/5g+sEntXns203//yDo1fLSYfF5+Fn7eCogAeIzM
kd6WW89nBppG+EOpz5M59WfknVRdvwdbETVRdTvutUrwFdS3BaB5S6AiHqpjP0iq
6sybot7ommwdy6a4DTdJKosWbxGsfsUkyyhp4tq+ZF6Y/og67vh8KlhO57T5qhE3
+puPVUm8OHxfnXZamlYqBf65s03tth7/K7ok+5LHP4DtJB+j6VejCnQYIUxtrH5e
/lDsGAlA486W0hsr0HdUAGylrirVZTeWpPR8qh4qqmlGA+C/dgjG8XXZjjdeWvuV
X7ZK3MBgcVfvwEktsEVq6SizhxRoSKD/sFP0EyNNAYScmorwi1TfHEa0u0AQrrEA
LPWF1KwKkM5lyjOtCXKl56WsH7lAdR9drWLBUOQM7Ab/kgg+khc= =9Szg
User-Agent: slrn/1.0.3 (Linux)
 by: Eike Rathke - Wed, 13 Oct 2021 23:27 UTC

* Eike Rathke, 2021-10-13 23:25 UTC:
> and in ~/.mailcap have
> text/html; /usr/bin/elinks ...
> Install the elinks package.

Oh and btw, using elinks here because it has a decent html table
handling, which lynx does not have at all.

Eike

--
OpenPGP/GnuPG encrypted mail preferred in all private communication.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A
Use LibreOffice! https://www.libreoffice.org/

Re: Stripping html using mutt

<sk7v5a$pjf$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=48&group=comp.mail.mutt#48

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bp...@www.zefox.net (bob prohaska)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Thu, 14 Oct 2021 00:55:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <sk7v5a$pjf$1@dont-email.me>
References: <sjtghm$a4d$1@dont-email.me> <20211010041304.459075189967738@firedrake.org> <slrnsmaetg.8o0.whynot@orphan.zombinet> <sk5b57$4l3$1@dont-email.me> <sk6vol$s9m$1@dont-email.me> <sk72ti$17l$1@dont-email.me>
Injection-Date: Thu, 14 Oct 2021 00:55:07 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="807a05452dc898802c196b23e27954d1";
logging-data="26223"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19BQaWHQWOlZ+noh34GOUPreBM9X4x5Gt8="
User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/12.2-STABLE (arm))
Cancel-Lock: sha1:ydlkZW7aZMWIPqPsJbUB4zFUleI=
 by: bob prohaska - Thu, 14 Oct 2021 00:55 UTC

Rich <rich@example.invalid> wrote:
>
> Note that "automatically stripping" would itself involve "involuntary
> invocation of additional software while viewing untrusted email",
> violating your wish not to do so.

Hoist by my own petard 8-)

Can lynx be invoked from the view menu after selecting the subpart?

The idea would be to view everything as plain text, then back up and
apply lynx to the selected sub-part if it seems worthwhile.

I can start lynx from the view menu, but it is oblivious to the
selected subpart.

Thanks for your patience!

bob prohaska

Re: Stripping html using mutt

<slrnsmg2sn.vrg.whynot@orphan.zombinet>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=49&group=comp.mail.mutt#49

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: why...@pozharski.name (Eric Pozharski)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Thu, 14 Oct 2021 10:51:03 +0000
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <slrnsmg2sn.vrg.whynot@orphan.zombinet>
References: <sjtghm$a4d$1@dont-email.me>
<20211010041304.459075189967738@firedrake.org>
<slrnsmaetg.8o0.whynot@orphan.zombinet> <sk5b57$4l3$1@dont-email.me>
<sk6vol$s9m$1@dont-email.me> <sk72ti$17l$1@dont-email.me>
<sk7v5a$pjf$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="4d5921e2ee5adb30f08377ec81c0e4e0";
logging-data="27382"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19C5JdZcmUXMDbyMlkca+jq"
User-Agent: slrn/pre1.0.0-18 (Linux)
Cancel-Lock: sha1:d94tum4pozD8rWFNq81CqBoBhlM=
 by: Eric Pozharski - Thu, 14 Oct 2021 10:51 UTC

with <sk7v5a$pjf$1@dont-email.me> bob prohaska wrote:
> Rich <rich@example.invalid> wrote:

*SKIP*
> Can lynx be invoked from the view menu after selecting the subpart?

Yes.

> The idea would be to view everything as plain text, then back up and
> apply lynx to the selected sub-part if it seems worthwhile.

Yes, see 'alternative_order'.

> I can start lynx from the view menu, but it is oblivious to the
> selected subpart.

This description isn't clear, however it (still) suggests your mailcap
setup isn't in desired state. I just found out The Mailcap Mechanism is
fscked up with (unknown yet) additions on part of (unknown yet)
distribution. That poses Teh Question: can we stop bitching around and
start diagnosing?

*CUT*

--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom

Re: Stripping html using mutt

<skal2e$jj0$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=50&group=comp.mail.mutt#50

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bp...@www.zefox.net (bob prohaska)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Fri, 15 Oct 2021 01:21:18 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <skal2e$jj0$1@dont-email.me>
References: <sjtghm$a4d$1@dont-email.me> <N3e8I61676aa8T246f@kulungile.erack.de>
Injection-Date: Fri, 15 Oct 2021 01:21:18 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="47fd7df51539089874feddbc5bd8f8f0";
logging-data="20064"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zl8JY7+N86H3er0sw4woLXG3JKFO8kj8="
User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/12.2-STABLE (arm))
Cancel-Lock: sha1:m+q3ZBxaT6Cdzpe5XNLi5k2GNyI=
 by: bob prohaska - Fri, 15 Oct 2021 01:21 UTC

Eike Rathke <erack+nutznetz.p@posteo.de> wrote:
> * bob prohaska, 2021-10-10 01:44 UTC:
>> I use mutt via ssh and neither need nor want MIME enhancements,
>> just the text. Can mutt display the text portion of the message
>> alone?
>
> Yes it can. Note though that for mixed multipart messages often the
> text/plain part does not match the text/html part, especially in mails
> from shitty shops and "enterprise grade" mail systems. So it may be
> desirable to be able to choose which.
>
> In your muttrc have
>
> # use mailcap entry for defined types
> unset implicit_autoview
> unauto_view *
> auto_view text/html
> alternative_order text/plain text text/html
>
> and in ~/.mailcap have
>
> text/html; /usr/bin/elinks -localhost 1 -no-connect 1 -force-html -dump %s; copiousoutput; description=HTML Text; nametemplate=%s.html
>
> (all on one line).
>

This combination seems to work nicely. If I just select the whole
message and hit return, mutt displays the plain text. If I use v
to list the attachments, select text/html and hit return, the
browser fires up and shows me the formatted text. That's a bit
nicer than I was originally looking for.

> Install the elinks package. The muttrc alternative_order determines
> which part is preferably displayed. The mailcap entry produces a textual
> view of the text/html part if there is one present and that then is
> displayed by mutt. In the index view or while viewing a message you can
> still press 'v' and from the multiparts select either the text/plain or
> text/html part to view.
>

elinks is turning out to be a problem. It built and installed without
complaint, but doesn't run correctly. This is on a Raspberry Pi2B running
FreeBSD 12.2. The ports tree is stale, I'll update it and try again later.
For now lynx is good enough.

Thank you very much!

bob prohaska

Re: Stripping html using mutt

<Db6dnRhjy6AlxvT8nZ2dnUU7-fvNnZ2d@earthlink.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=51&group=comp.mail.mutt#51

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 15 Oct 2021 05:45:11 -0500
From: ant...@zimage.comANT (Ant)
Subject: Re: Stripping html using mutt
Newsgroups: comp.mail.mutt
References: <sjtghm$a4d$1@dont-email.me> <N3e8I61676aa8T246f@kulungile.erack.de> <skal2e$jj0$1@dont-email.me>
User-Agent: tin/2.4.5-20201224 ("Glen Albyn") (Linux/5.10.19-200.fc33.x86_64 (x86_64))
Message-ID: <Db6dnRhjy6AlxvT8nZ2dnUU7-fvNnZ2d@earthlink.com>
Date: Fri, 15 Oct 2021 05:45:12 -0500
Lines: 55
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 47.180.143.226
X-Trace: sv3-P7IUqzHsHd1VfMs6zjsH0ROPRIggjgqn4XiOniKGEOacJqWJUhyeCmr50LqEQS6xm6YeBp/MF3ugFf8!VcifbH0MMagn8zY7dHcPeZOar0re/d6yU9MI1ckWsbrdES1MoOajlvRLSNuieL5+mkcU35O86/Co!Cl5jCbTmQTP7z/dHsjGW8bPAI0h0iGmJ
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 3481
 by: Ant - Fri, 15 Oct 2021 10:45 UTC

bob prohaska <bp@www.zefox.net> wrote:
> Eike Rathke <erack+nutznetz.p@posteo.de> wrote:
> > * bob prohaska, 2021-10-10 01:44 UTC:
> >> I use mutt via ssh and neither need nor want MIME enhancements,
> >> just the text. Can mutt display the text portion of the message
> >> alone?
> >
> > Yes it can. Note though that for mixed multipart messages often the
> > text/plain part does not match the text/html part, especially in mails
> > from shitty shops and "enterprise grade" mail systems. So it may be
> > desirable to be able to choose which.
> >
> > In your muttrc have
> >
> > # use mailcap entry for defined types
> > unset implicit_autoview
> > unauto_view *
> > auto_view text/html
> > alternative_order text/plain text text/html
> >
> > and in ~/.mailcap have
> >
> > text/html; /usr/bin/elinks -localhost 1 -no-connect 1 -force-html -dump %s; copiousoutput; description=HTML Text; nametemplate=%s.html
> >
> > (all on one line).
> >

> This combination seems to work nicely. If I just select the whole
> message and hit return, mutt displays the plain text. If I use v
> to list the attachments, select text/html and hit return, the
> browser fires up and shows me the formatted text. That's a bit
> nicer than I was originally looking for.

> > Install the elinks package. The muttrc alternative_order determines
> > which part is preferably displayed. The mailcap entry produces a textual
> > view of the text/html part if there is one present and that then is
> > displayed by mutt. In the index view or while viewing a message you can
> > still press 'v' and from the multiparts select either the text/plain or
> > text/html part to view.
> >

> elinks is turning out to be a problem. It built and installed without
> complaint, but doesn't run correctly. This is on a Raspberry Pi2B running
> FreeBSD 12.2. The ports tree is stale, I'll update it and try again later.
> For now lynx is good enough.

Bob, try Links. eLinks is based on it. :)
--
Doyers! :D So many brokenesses, oldnesses, leaks, illnesses, videos, spams, issues, software updates, games, sins, tiredness, busyness, etc. Dang colony life! D:
Note: A fixed width font (Courier, Monospace, etc.) is required to see this signature correctly.
/\___/\ Ant(Dude) @ http://aqfl.net & http://antfarm.home.dhs.org.
/ /\ /\ \ Please nuke ANT if replying by e-mail.
| |o o| |
\ _ /
( )

Re: Stripping html using mutt

<skdbq2$mni$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=52&group=comp.mail.mutt#52

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bp...@www.zefox.net (bob prohaska)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: Sat, 16 Oct 2021 02:01:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <skdbq2$mni$1@dont-email.me>
References: <sjtghm$a4d$1@dont-email.me> <N3e8I61676aa8T246f@kulungile.erack.de> <skal2e$jj0$1@dont-email.me> <Db6dnRhjy6AlxvT8nZ2dnUU7-fvNnZ2d@earthlink.com>
Injection-Date: Sat, 16 Oct 2021 02:01:38 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="238d014d615264b65ca91d45bf3c7dac";
logging-data="23282"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jmPREY6SRSuWq3/MbsmEtn+GlgCReyUM="
User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/12.2-STABLE (arm))
Cancel-Lock: sha1:OnsoF3PO2g8PIOoWFmqwGskb7AM=
 by: bob prohaska - Sat, 16 Oct 2021 02:01 UTC

Ant <ant@zimage.comant> wrote:
>> For now lynx is good enough.
>
> Bob, try Links. eLinks is based on it. :)

It's in the FreeBSD ports collection, so that should be easy.

A browser is really too capable for my purposes. Browsers, AIUI,
can spawn subordinate programs on the user's behalf, which I'd
like to avoid.

There is a port called html2text, which I know nothing about.
If true to its name, that might come closer to scraping off
the tags so I can see what the email tries to do, without it
being able to actually make good on the goal.

This thread has taught me the essentials, which turn out to be
rather arcane. Now I have to decide just how paranoid to be
about unsolicited email.

Thanks to all who's educated me!

bob prohaska

Re: Stripping html using mutt

<slrnsmmcjj.5o3.grahn+nntp@frailea.sa.invalid>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=53&group=comp.mail.mutt#53

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: grahn+n...@snipabacken.se (Jorgen Grahn)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: 16 Oct 2021 20:13:39 GMT
Lines: 49
Message-ID: <slrnsmmcjj.5o3.grahn+nntp@frailea.sa.invalid>
References: <sjtghm$a4d$1@dont-email.me>
<N3e8I61676aa8T246f@kulungile.erack.de> <skal2e$jj0$1@dont-email.me>
<Db6dnRhjy6AlxvT8nZ2dnUU7-fvNnZ2d@earthlink.com>
<skdbq2$mni$1@dont-email.me>
X-Trace: individual.net kUErKbj6u2zGa+Iv/VvW/wGidXOJvQDecCmm2ZaRR80tOyID3z
Cancel-Lock: sha1:J6Vtueu7ted/5bG+9U1Y9WLDN8U=
User-Agent: slrn/1.0.3 (OpenBSD)
 by: Jorgen Grahn - Sat, 16 Oct 2021 20:13 UTC

On Sat, 2021-10-16, bob prohaska wrote:
> Ant <ant@zimage.comant> wrote:
>>> For now lynx is good enough.
>>
>> Bob, try Links. eLinks is based on it. :)
>
> It's in the FreeBSD ports collection, so that should be easy.
>
> A browser is really too capable for my purposes. Browsers, AIUI,
> can spawn subordinate programs on the user's behalf, which I'd
> like to avoid.

Well, you need a secure browser which doesn't e.g. let mails "phone
home". I don't know which of the popular text-mode browsers (lynx,
links, elinks, w3m; any others?) do that well.

> There is a port called html2text, which I know nothing about.
> If true to its name, that might come closer to scraping off
> the tags so I can see what the email tries to do, without it
> being able to actually make good on the goal.

Most HTML mails would be quite unreadable if you just stripped off the
tags. But I see what you mean: a program which just takes a HTML file
and renders it as text is less likely to let the mail /do/ anything,
compared to a browser, even a browser in "dump" mode.

Personally I let mutt call w3m to render HTML mail, and hope it
protects my privacy. I don't look at the text version of the mail
(i.e. the other half of the multipart/alternative) since it's
usually useless. Then I curse w3m because it doesn't show the
links in the mail, and so I end up using mutt's view-text command
to search the HTML (and pages of useless CSS) for that link I
want. The whole thing is less than ideal, but if the sender
cannot bother to communicate well, perhaps it wasn't so important
that I read their mails after all.

> This thread has taught me the essentials, which turn out to be
> rather arcane. Now I have to decide just how paranoid to be
> about unsolicited email.
>
> Thanks to all who's educated me!
>
> bob prohaska

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Re: Stripping html using mutt

<N3e8I616b607fT4c7f@kulungile.erack.de>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=54&group=comp.mail.mutt#54

 copy link   Newsgroups: comp.mail.mutt
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: erack+nu...@posteo.de (Eike Rathke)
Newsgroups: comp.mail.mutt
Subject: Re: Stripping html using mutt
Date: 16 Oct 2021 23:30:40 GMT
Organization: possibly
Lines: 14
Message-ID: <N3e8I616b607fT4c7f@kulungile.erack.de>
References: <sjtghm$a4d$1@dont-email.me>
<N3e8I61676aa8T246f@kulungile.erack.de> <skal2e$jj0$1@dont-email.me>
<Db6dnRhjy6AlxvT8nZ2dnUU7-fvNnZ2d@earthlink.com>
<skdbq2$mni$1@dont-email.me> <slrnsmmcjj.5o3.grahn+nntp@frailea.sa.invalid>
X-Trace: individual.net eyWUX7NSpgUQr0cO+KA/IASd8CrAQbv7QD355Ottnf+iu+bV4=
Cancel-Lock: sha1:YTWCHtpVoOuiWztnthrBnMTIiag=
X-Accept-Language: de,en
X-PGP-Hash: SHA256
X-PGP-Key: 0x6A6CD5B765632D3A
X-PGP-Sig: GnuPG-v2 From,Newsgroups,Subject,Message-ID
iQIzBAEBCAAdFiEEImXX86ewlcw5GGMLamzVt2VjLToFAmFrYH8ACgkQamzVt2Vj
LTrmCA//QmJ16qWNoj1J+OgahWVidPOKd0PL/AHQjyPjmOB9ZgHUR8u3GLyBa/6V
/GmD6RScNd6vyhTIvRCJBqm/CiG7/LtQjeEBkRxZdxM+vApR9yfS8PEUZAbmJMpF
TKc89kuuAlBHka9c+fCU7Q+uHEOm5bLcWCqgv3aw1MUdQDpjlDTzqqGg2GtpRMIb
KhTQ+/x0W9OUnUm3XOl5n17FwmC88+2hepQnJBrHvwyUG70KdyXi7mMA7W/tFTKk
2/ZwzWWIFkTdVuNk+HKmagWn7gA+KT1tE6qSB0i4kjnHa5Mvwqi13aEOVZ6fdqzj
1tZ4HiRzOum7UntHHuIwLG1WM4aQgtKQmU8SfiafOZDAVhNQ315yXjxqKmN8kmNG
cl0VDmC9ItMmgfB0l5ZchcVsYqJhVRvt/J25o+GnnewD+026QGzVtR06r8VQyOSL
IZKXi9QdOTWsZ2mSLguUWTmoJw2rpuVuOFSGOU6LfYQnnVubVFFHM8Widou5+4AA
1ifwoA5XKO181jA9Krp3fFhKDhOtGG3oTrIy7IddJtE/81l8I3GjlLwTW4QSuJN9
cxP3IIN7t6EdVXGcH3HzijrOOpT+x15pUEyWgqsyKuz2BnKTlmC5W5s8ys1eyD3E
ChNOJObUUw1wdFcWzSaG4CqxNQRZR76x3uKBufKglGJqYX1EhYQ= =1nzL
User-Agent: slrn/1.0.3 (Linux)
 by: Eike Rathke - Sat, 16 Oct 2021 23:30 UTC

* Jorgen Grahn, 2021-10-16 20:13 UTC:
> Well, you need a secure browser which doesn't e.g. let mails "phone
> home". I don't know which of the popular text-mode browsers (lynx,
> links, elinks, w3m; any others?) do that well.

The elinks command line (should work for links as well) I posted
prevents exactly that with the options -localhost 1 -no-connect 1

Eike

--
OpenPGP/GnuPG encrypted mail preferred in all private communication.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A
Use LibreOffice! https://www.libreoffice.org/

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor