Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #265379 > unrolled thread

URLs in Mutt

Started byPaul M Foster <paulf@quillandmouse.com>
First post2024-01-01 05:10 +0100
Last post2024-01-01 11:40 +0100
Articles 16 — 9 participants

Back to article view | Back to linux.debian.user


Contents

  URLs in Mutt Paul M Foster <paulf@quillandmouse.com> - 2024-01-01 05:10 +0100
    Re: URLs in Mutt Greg Wooledge <greg@wooledge.org> - 2024-01-01 05:20 +0100
      Re: URLs in Mutt Nicolas George <george@nsup.org> - 2024-01-01 11:50 +0100
        Re: URLs in Mutt Greg Wooledge <greg@wooledge.org> - 2024-01-01 15:30 +0100
          Re: URLs in Mutt Andy Smith <andy@strugglers.net> - 2024-01-01 16:20 +0100
          Re: URLs in Mutt Nicolas George <george@nsup.org> - 2024-01-01 18:00 +0100
            Re: URLs in Mutt John Hasler <john@sugarbit.com> - 2024-01-01 19:10 +0100
            Re: URLs in Mutt gene heskett <gheskett@shentel.net> - 2024-01-01 23:10 +0100
              Re: URLs in Mutt Nicolas George <george@nsup.org> - 2024-01-01 23:10 +0100
                Re: URLs in Mutt fxkl47BF@protonmail.com - 2024-01-01 23:30 +0100
                  Re: URLs in Mutt Nicolas George <george@nsup.org> - 2024-01-01 23:40 +0100
                    Re: URLs in Mutt fxkl47BF@protonmail.com - 2024-01-01 23:50 +0100
      Re: URLs in Mutt Paul M Foster <paulf@quillandmouse.com> - 2024-01-02 05:50 +0100
        Re: URLs in Mutt Nicolas George <george@nsup.org> - 2024-01-02 12:10 +0100
          Re: URLs in Mutt Jonathan Matthew Gresham <matt@jmgresham.xyz> - 2024-01-02 20:30 +0100
    Re: URLs in Mutt Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-01-01 11:40 +0100

#265379 — URLs in Mutt

FromPaul M Foster <paulf@quillandmouse.com>
Date2024-01-01 05:10 +0100
SubjectURLs in Mutt
Message-ID<HRhMJ-hyyy-1@gated-at.bofh.it>
Folks:

Like everyone else, I get emails with links in them which need to be
clicked to change passwords, verify identity and such. I was a loyal mutt
user for years, but problems with URLs caused me to eventually change to
claws-mail. Recently, I tweaked my mutt config, and URLs seemed to work
better. So I switched back to mutt. All was fine until now. I got a
critical email with links in it, and it wouldn't work. (I know, that's not
a great description.)

As a solution, I took that email from my mutt mail file and stripped out
all the headers and non-HTML content. Then I fed that to my browser. Sorta
worked. However, the button I was supposed to click didn't work properly.
It attempted to retrieve a page it couldn't find. Digging deeper, I looked
into the actual HTML file. Apparently, something was wrapping lines to
about 75 characters, and putting an equals sign at the end of every line
which had been wrapped. This apparently interfered with the browser
correctly interpreting the HTML.

One wrinkle here is that mail is fed to maildrop. In my config file for
this, there is only one line which messes with incoming mail:

xfilter "reformail -f1"

All this does is add a From if an email isn't properly formatted.

So my first question is, what is wrapping the lines on my incoming emails,
and how do I fix it?

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster

[toc] | [next] | [standalone]


#265380

FromGreg Wooledge <greg@wooledge.org>
Date2024-01-01 05:20 +0100
Message-ID<HRhWp-hyBZ-3@gated-at.bofh.it>
In reply to#265379
On Sun, Dec 31, 2023 at 10:51:25PM -0500, Paul M Foster wrote:
> Apparently, something was wrapping lines to
> about 75 characters, and putting an equals sign at the end of every line
> which had been wrapped.

This is "quoted-printable" encoding.  You need to use a properly decoded
version of the file, rather than the raw text.[1]

> As a solution, I took that email from my mutt mail file and stripped out
> all the headers and non-HTML content. Then I fed that to my browser.

If you received a correctly formatted email, it should contain one or more
parts, each of which is identified by a MIME Content-Type.  Pressing 'v'
while reading the message takes you to a page which shows you the parts
in a tree form.

Use the arrow keys to select the part you want to save (in this case, the
text/html one), and then save it to a file.  I use "foo.html" usually,
and just overwrite foo.html every time.

Have your browser load THAT file.

[1] The SMTP standard requires all transmitted lines to be 1000 characters
    or less, and to contain only 7-bit ASCII characters.  Therefore, any
    content which doesn't conform to these restrictions has to be encoded.
    The two choices for encoding are quoted-printable, and base64.
    Quoted-printable is nearly human-readable, and is more efficient if
    there are relatively few 8-bit characters or long lines, so it's
    a common choice.  Some MUAs will use q-p even on files that don't
    *strictly* need it, just in case.

[toc] | [prev] | [next] | [standalone]


#265385

FromNicolas George <george@nsup.org>
Date2024-01-01 11:50 +0100
Message-ID<HRo1P-1UO-5@gated-at.bofh.it>
In reply to#265380
Greg Wooledge (12023-12-31):
> Have your browser load THAT file.

Or just have this:

text/html; lynx -force_html -dump %s; copiousoutput

in your .mailcap file. Possibly along with:

auto_view text/html

in the .muttrc.

Regards,

-- 
  Nicolas George

[toc] | [prev] | [next] | [standalone]


#265391

FromGreg Wooledge <greg@wooledge.org>
Date2024-01-01 15:30 +0100
Message-ID<HRrsJ-47u-3@gated-at.bofh.it>
In reply to#265385
On Mon, Jan 01, 2024 at 11:42:59AM +0100, Nicolas George wrote:
> Greg Wooledge (12023-12-31):
> > Have your browser load THAT file.
> 
> Or just have this:
> 
> text/html; lynx -force_html -dump %s; copiousoutput
> 
> in your .mailcap file. Possibly along with:
> 
> auto_view text/html
> 
> in the .muttrc.

It's been my experience that the hyperlinks I'm meant to click are so
long that they wrap around the terminal width multiple times.  This
makes copy/pasting them tedious at best, and even then it still
sometimes fails for me.  (Either because I can't actually tell which
one I'm supposed to click, just from reading the lynx-dumped source,
or because there's some Javascript that has to be loaded first?)

Passing the entire text/html part to an actual web browser has been
what works best for me.

On the other hand, if I *don't* want to click anything, the lynx-dumped
source code usually gives me a nice synopsis of what the email is
trying to tell me.  So, it's still worth having, even if I don't
try to copy the URLs out of it manually.

[toc] | [prev] | [next] | [standalone]


#265394

FromAndy Smith <andy@strugglers.net>
Date2024-01-01 16:20 +0100
Message-ID<HRsf7-4C9-3@gated-at.bofh.it>
In reply to#265391
Hello,

On Mon, Jan 01, 2024 at 09:23:03AM -0500, Greg Wooledge wrote:
> Passing the entire text/html part to an actual web browser has been
> what works best for me.

Me too. I'll do the mailcap thing to visually skim the text/html
part with w3m, but there are so many broken HTML messes that I'm
obliged to read that I also have a hotkey to send that text/html
part to Firefox for proper viewing when necessary.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

[toc] | [prev] | [next] | [standalone]


#265400

FromNicolas George <george@nsup.org>
Date2024-01-01 18:00 +0100
Message-ID<HRtNT-5nz-1@gated-at.bofh.it>
In reply to#265391
Greg Wooledge (12024-01-01):
> It's been my experience that the hyperlinks I'm meant to click are so
> long that they wrap around the terminal width multiple times.  This
> makes copy/pasting them tedious at best, and even then it still
> sometimes fails for me.

Surprising. The graphical web browsers I know are actually very tolerant
of spurious newline characters inserted in pasted URLs, and I suspect it
is on purpose. PDFs from magazines might also have wrapped links.

Regards,

-- 
  Nicolas George

[toc] | [prev] | [next] | [standalone]


#265404

FromJohn Hasler <john@sugarbit.com>
Date2024-01-01 19:10 +0100
Message-ID<HRuTD-6gR-7@gated-at.bofh.it>
In reply to#265400
Greg Wooledge:
> It's been my experience that the hyperlinks I'm meant to click are so
> long that they wrap around the terminal width multiple times.  This
> makes copy/pasting them tedious at best, and even then it still
> sometimes fails for me.

My wife has the same problem.
-- 
John Hasler 
john@sugarbit.com
Elmwood, WI USA

[toc] | [prev] | [next] | [standalone]


#265409

Fromgene heskett <gheskett@shentel.net>
Date2024-01-01 23:10 +0100
Message-ID<HRyDT-8x5-1@gated-at.bofh.it>
In reply to#265400
On 1/1/24 11:52, Nicolas George wrote:
> Greg Wooledge (12024-01-01):
>> It's been my experience that the hyperlinks I'm meant to click are so
>> long that they wrap around the terminal width multiple times.  This
>> makes copy/pasting them tedious at best, and even then it still
>> sometimes fails for me.
> 
> Surprising. The graphical web browsers I know are actually very tolerant
> of spurious newline characters inserted in pasted URLs, and I suspect it
> is on purpose. PDFs from magazines might also have wrapped links.
> 
> Regards,
> 
Most browsers to well with such as long as the link is surrounded by 
<link> the left-right arrows delineate the links contents even if it is 
wrapped to several lines on your screen.

Take care all.

Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
  soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
  - Louis D. Brandeis

[toc] | [prev] | [next] | [standalone]


#265410

FromNicolas George <george@nsup.org>
Date2024-01-01 23:10 +0100
Message-ID<HRyDU-8x5-15@gated-at.bofh.it>
In reply to#265409
gene heskett (12024-01-01):
> Most browsers to well with such as long as the link is surrounded by <link>
> the left-right arrows delineate the links contents even if it is wrapped to
> several lines on your screen.

Please try to keep up with the context of the discussion, we were
talking about links displayed by “lynx -dump”.

Regards,

-- 
  Nicolas George

[toc] | [prev] | [next] | [standalone]


#265411

Fromfxkl47BF@protonmail.com
Date2024-01-01 23:30 +0100
Message-ID<HRyXf-8Dz-17@gated-at.bofh.it>
In reply to#265410
On Mon, 1 Jan 2024, Nicolas George wrote:

> gene heskett (12024-01-01):
>> Most browsers to well with such as long as the link is surrounded by <link>
>> the left-right arrows delineate the links contents even if it is wrapped to
>> several lines on your screen.
>
> Please try to keep up with the context of the discussion, we were
> talking about links displayed by “lynx -dump”.

actually the question was
" what is wrapping the lines on my incoming emails, and how do I fix it "
please try to keep up

[toc] | [prev] | [next] | [standalone]


#265412

FromNicolas George <george@nsup.org>
Date2024-01-01 23:40 +0100
Message-ID<HRz6V-8GG-1@gated-at.bofh.it>
In reply to#265411
fxkl47BF@protonmail.com (12024-01-01):
> actually the question was
> " what is wrapping the lines on my incoming emails, and how do I fix it "
> please try to keep up

This was not a reply to the original mail. You might consider using a
MUA with proper threading to better understand what is going on.

-- 
  Nicolas George

[toc] | [prev] | [next] | [standalone]


#265413

Fromfxkl47BF@protonmail.com
Date2024-01-01 23:50 +0100
Message-ID<HRzgB-8JJ-1@gated-at.bofh.it>
In reply to#265412
On Mon, 1 Jan 2024, Nicolas George wrote:

> This was not a reply to the original mail. You might consider using a
> MUA with proper threading to better understand what is going on.

from the negative nature of your communications
every one understands what's going on

[toc] | [prev] | [next] | [standalone]


#265418

FromPaul M Foster <paulf@quillandmouse.com>
Date2024-01-02 05:50 +0100
Message-ID<HRET0-ckq-5@gated-at.bofh.it>
In reply to#265380
On Sun, Dec 31, 2023 at 11:12:12PM -0500, Greg Wooledge wrote:

> On Sun, Dec 31, 2023 at 10:51:25PM -0500, Paul M Foster wrote:
> > Apparently, something was wrapping lines to
> > about 75 characters, and putting an equals sign at the end of every line
> > which had been wrapped.
> 
> This is "quoted-printable" encoding.  You need to use a properly decoded
> version of the file, rather than the raw text.[1]
> 
> > As a solution, I took that email from my mutt mail file and stripped out
> > all the headers and non-HTML content. Then I fed that to my browser.
> 
> If you received a correctly formatted email, it should contain one or more
> parts, each of which is identified by a MIME Content-Type.  Pressing 'v'
> while reading the message takes you to a page which shows you the parts
> in a tree form.
> 
> Use the arrow keys to select the part you want to save (in this case, the
> text/html one), and then save it to a file.  I use "foo.html" usually,
> and just overwrite foo.html every time.
> 
> Have your browser load THAT file.
> 
> [1] The SMTP standard requires all transmitted lines to be 1000 characters
>     or less, and to contain only 7-bit ASCII characters.  Therefore, any
>     content which doesn't conform to these restrictions has to be encoded.
>     The two choices for encoding are quoted-printable, and base64.
>     Quoted-printable is nearly human-readable, and is more efficient if
>     there are relatively few 8-bit characters or long lines, so it's
>     a common choice.  Some MUAs will use q-p even on files that don't
>     *strictly* need it, just in case.
> 

This is an excellent reply, and explains the situation entirely. I tried
your method, and it worked. Thanks.

Of course, it doesn't fix the retarded way Mutt handles links. For those
familiar with Mutt, it allows you to view the file with numbers referring
to each link. Then you get a screen with just the numbered links. Here's
the fun part: if the link you want is, say, number 4, when you get to the
screen with only numbered links, the number 4 link is often some other
link. You have to push each link around the one you want to the browser
until you find the one you want. It's a pain.

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster

[toc] | [prev] | [next] | [standalone]


#265421

FromNicolas George <george@nsup.org>
Date2024-01-02 12:10 +0100
Message-ID<HRKOK-gfd-21@gated-at.bofh.it>
In reply to#265418
Paul M Foster (12024-01-01):
> Of course, it doesn't fix the retarded way Mutt handles links.

To the better of my knowledge, Mutt does not handle links at all. Please
refrain from calling it retarded.

>								For those
> familiar with Mutt, it allows you to view the file with numbers referring
> to each link. Then you get a screen with just the numbered links. Here's
> the fun part: if the link you want is, say, number 4, when you get to the
> screen with only numbered links, the number 4 link is often some other
> link. You have to push each link around the one you want to the browser
> until you find the one you want. It's a pain.

What you describe does not look like a feature of Mutt but the
combination of two configuration options to use external programs, one
to display HTML as text (as I described elsewhere in the thread) and one
to catch URLs in the text, probably urlview (mentioned by somebody
else).

No need to blame Mutt at all.

Regards,

-- 
  Nicolas George

[toc] | [prev] | [next] | [standalone]


#265424

FromJonathan Matthew Gresham <matt@jmgresham.xyz>
Date2024-01-02 20:30 +0100
Message-ID<HRSCC-l7x-5@gated-at.bofh.it>
In reply to#265421

[Multipart message — attachments visible in raw view] — view raw

Install urlview

[toc] | [prev] | [next] | [standalone]


#265384

FromMichael Kjörling <2695bd53d63c@ewoof.net>
Date2024-01-01 11:40 +0100
Message-ID<HRnSa-1R4-11@gated-at.bofh.it>
In reply to#265379
On 31 Dec 2023 22:51 -0500, from paulf@quillandmouse.com (Paul M Foster):
> As a solution, I took that email from my mutt mail file and stripped out
> all the headers and non-HTML content. Then I fed that to my browser. Sorta
> worked. However, the button I was supposed to click didn't work properly.
> It attempted to retrieve a page it couldn't find. Digging deeper, I looked
> into the actual HTML file. Apparently, something was wrapping lines to
> about 75 characters, and putting an equals sign at the end of every line
> which had been wrapped. This apparently interfered with the browser
> correctly interpreting the HTML.

Install the urlview package, and then pass the mail text/html part to
urlview. (I think it'll accept a simple pipe input.) See urlview(1)
for details.

-- 
Michael Kjörling                     🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web