Re: How do I see the text/html version of an email?

2023-04-23 Thread Cameron Simpson

On 23Apr2023 12:50, Todd Zullinger  wrote:

An alternative (or addition) to the above is a message-hook:

message-hook ~A 'unalternative_order "*"; alternative_order text/enriched 
text/plain text'
message-hook '~C "misbehaving-group@example\.com"' 'unalternative_order "*"; 
alternative_order text/html'


I use that approach, but I've got a whole mutt group for senders whose 
text/plain is rubbish:


message-hook . 'unalternative_order *; alternative_order text/plain 
text/html'
message-hook '~h "X-Mailer: Apple Mail" ~X 1-' 'unalternative_order *; 
alternative_order text/html multipart/mixed text/plain'
message-hook '%f htmlers | ~f @no-re...@cc.yahoo-inc.com | ~f @outlook.com 
| ~f live.com | ~f @facebookmail.com' 'unalternative_order *; alternative_order 
text/html text/plain'

So my "htmlers" group lists source addresses who send bad text/plain.

Cheers,
Cameron Simpson 


Re: How do I see the text/html version of an email?

2023-04-23 Thread Jude DaShiell
If the mail is going to be illegible thanks to html, maybe it's
appropriate to automate an illegible email rejected filter that adds a
short message and bounces it back to the sender.  If enough of these
senders keep getting rejected messages maybe they'll clean up their acts
but count on any start toward this taking at least 10 years from the time
rejected email starts hitting their inboxes.


-- Jude  "There are four boxes to be used in
defense of liberty: soap, ballot, jury, and ammo. Please use in that
order." Ed Howdershelt 1940.

On Sun, 23 Apr 2023, ckeader via Mutt-users wrote:

> José María Mateos writes:
> > On Sun, Apr 23, 2023 at 02:56:35PM +, Alan Mackenzie wrote:
> > >Some considerate organisation has been sending me MIME mails with
> > >content in a text/html section and a wholly blank text/plain version.
> > >What I see in mutt is the blank text/plain.  Who on Earth thought a
> > >blank text/plain section was somehow a good idea?
> >
> > I've seen a worse version of this: the text version and the html version
> > are completely different.
>
> I can better that, regularly spotted in the corporate environment: the
> text/plain part is also in html.
>
>


Re: How do I see the text/html version of an email?

2023-04-23 Thread ckeader via Mutt-users
José María Mateos writes:
> On Sun, Apr 23, 2023 at 02:56:35PM +, Alan Mackenzie wrote:
> >Some considerate organisation has been sending me MIME mails with 
> >content in a text/html section and a wholly blank text/plain version.  
> >What I see in mutt is the blank text/plain.  Who on Earth thought a 
> >blank text/plain section was somehow a good idea?
> 
> I've seen a worse version of this: the text version and the html version 
> are completely different.

I can better that, regularly spotted in the corporate environment: the
text/plain part is also in html.



Re: How do I see the text/html version of an email?

2023-04-23 Thread Ofer Inbar
On Sun, Apr 23, 2023 at 12:50:18PM -0400,
Todd Zullinger  wrote:
> José María Mateos wrote:
> > On Sun, Apr 23, 2023 at 02:56:35PM +, Alan Mackenzie wrote:
> >> Some considerate organisation has been sending me MIME mails with
> >> content in a text/html section and a wholly blank text/plain version.
> >> What I see in mutt is the blank text/plain.  Who on Earth thought a
> >> blank text/plain section was somehow a good idea?
> 
> [I know, I know, I'm answering a rhetorical question.]
> 
> I suspect one likely group would be the companies who depend
> on advertising revenue.  With HTML, they can stuff tracking

I very very highly doubt that is a reason.

Use of text/plain is too insignificant for anyone to care enough to
come up with weird tricks like this.  Plenty of marketers send html
only email, as do pleny of others who just don't even think of the
possibility that anyone reads their mail in anything other than a
web browser.

Blank text/plain is almost certainly from buggy or misconfigured
software that is supposed to produce proper multipart/alternative,
but whose users don't know enough to ever check whether they messed
it up, and who never see the results because they and everyone they
know reads email in html.
  -- Cos


Re: How do I see the text/html version of an email?

2023-04-23 Thread Ofer Inbar
Very easy.  Either in the index with that message selected, or when
viewing the (blank) message, hit "v".  You'll see a list of all the
MIME portions of the message.  Move the pointer to the html version
(using j k just like in the regular index) and hit enter to view it.
  -- Cos


Re: How do I see the text/html version of an email?

2023-04-23 Thread Todd Zullinger
José María Mateos wrote:
> On Sun, Apr 23, 2023 at 02:56:35PM +, Alan Mackenzie wrote:
>> Some considerate organisation has been sending me MIME mails with
>> content in a text/html section and a wholly blank text/plain version.
>> What I see in mutt is the blank text/plain.  Who on Earth thought a
>> blank text/plain section was somehow a good idea?

[I know, I know, I'm answering a rhetorical question.]

I suspect one likely group would be the companies who depend
on advertising revenue.  With HTML, they can stuff tracking
(whether direct like hidden pixels or indirect by changing
any URLs in the message to go through their servers.  Those
things aren't very useful in text/plain, so shipping a blank
part just forces many folks to view the text/html.

Of course, sending just text/html would work better -- but
who knows what goes on in the minds of people willing to
perform shady tracking. :)

> I've seen a worse version of this: the text version and the html version are
> completely different.
> 
> On my side, I have this:
> 
> auto_view text/html
> folder-hook . 'unalternative_order *; alternative_order text/plain text/html'
> folder-hook boletines 'unalternative_order *; alternative_order text/html 
> text/plain'
> 
> So normally I look at the plain-text version, except in my folder
> "boletines" (Spanish for "newsletters"), where I default to HTML.
> 
> In those cases where I'm in another folder and I need to look at the HTML
> content, I use this macro:
> 
> macro index,pager ,b "/html" 
> "View first HTML attachment in browser"
> 
> This opens the first available HTML attachmend (typically the message body)
> in my browser of choice (set up via ~/.mailcap).

An alternative (or addition) to the above is a message-hook:

message-hook ~A 'unalternative_order "*"; alternative_order text/enriched 
text/plain text'
message-hook '~C "misbehaving-group@example\.com"' 'unalternative_order "*"; 
alternative_order text/html'

Replace ~C with ~f or other pattern as needed.  You may
need to add something like:

auto_view text/html text/htm message/html message/htm

to the configuration as well, if you want them to open in
the mutt pager rather than in a browser.  I only view html
via plain text, so I set auto_view as-needed.

-- 
Todd


signature.asc
Description: PGP signature


Re: How do I see the text/html version of an email?

2023-04-23 Thread José María Mateos

On Sun, Apr 23, 2023 at 02:56:35PM +, Alan Mackenzie wrote:
Some considerate organisation has been sending me MIME mails with 
content in a text/html section and a wholly blank text/plain version.  
What I see in mutt is the blank text/plain.  Who on Earth thought a 
blank text/plain section was somehow a good idea?


I've seen a worse version of this: the text version and the html version 
are completely different.


On my side, I have this:

auto_view text/html
folder-hook . 'unalternative_order *; alternative_order text/plain text/html'
folder-hook boletines 'unalternative_order *; alternative_order text/html 
text/plain'

So normally I look at the plain-text version, except in my folder 
"boletines" (Spanish for "newsletters"), where I default to HTML.


In those cases where I'm in another folder and I need to look at the 
HTML content, I use this macro:


macro index,pager ,b "/html" "View 
first HTML attachment in browser"

This opens the first available HTML attachmend (typically the message 
body) in my browser of choice (set up via ~/.mailcap).


Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


How do I see the text/html version of an email?

2023-04-23 Thread Alan Mackenzie
Hello, mutt.

I'm using mutt 2.2.3 on Gentoo GNU/Linux.

Some considerate organisation has been sending me MIME mails with content
in a text/html section and a wholly blank text/plain version.  What I see
in mutt is the blank text/plain.  Who on Earth thought a blank text/plain
section was somehow a good idea?

Now I've finally worked out why they've been sending me blank emails,
I've temporarily amended my /etc/mutt/Muttrc, changing

alternative_order text/plain text text/html

to

alternative_order text/html text/plain text

..

However, in general I'd prefer to give priority to the text/plain
version.  Is there any way I can do this in mutt without having
continually to edit my configuration every time a "blank" email comes
in?

What I would really like is a command in mutt which would switch between
displaying the various alternatives.  I don't think there is one at the
moment, having perused the manual.

Can anybody offer me any suggestions?

Thanks in advance!

-- 
Alan Mackenzie (Nuremberg, Germany).


Re: Re: Forward with attachments

2023-04-23 Thread John Hawkinson
Jan Eden via Mutt-users  wrote on Sun, 23 Apr 2023 at 
02:42:23 EDT in :

> On 2023-04-22 14:58, Akkana Peck wrote:
> 

> > Thanks: I'd also been trying to find a way to forward with
> > attachments, and $forward_attachments helps as long as there's no
...
> Isn't this what the mime_forward variable is for?

Not...really.

$mime_forward wraps the entire message in a message/rfc-822 attachment, 
preserving the full attachment structure. This is great if the recipient can 
deal with it, and is interested in doing so...sometimes that's not the case. 
Some MUAs have trouble with them, and others make it just a pain to deal with 
opening attachments within attachments. (And these problems increase if there 
is a forwarded message that is then forwarded).

I think what is asked for is to flatten the attachment hierarchy and include 
all attachments as top-level attachments in the forwarded message. This is 
what, e.g., Gmail will do when forwarding. I sometimes want this behavior when 
it's more important to get the message across than to forensically preserve the 
original message. (Although since it often involves HTML, I tend not to use 
mutt to send those kinds of messages, so I'm not sure I would personally find a 
mutt feature to do this all that helpful. But that's just me.)

--
jh...@alum.mit.edu
John Hawkinson


Re: Re: Forward with attachments

2023-04-23 Thread Jan Eden via Mutt-users
On 2023-04-22 14:58, Akkana Peck wrote:

> > On Tue, Apr 18, 2023 at 04:02:36PM -0500, Jason wrote:
> > > Is there a configuration that will make mutt's forwarding behavior more
> > > like other clients I have used: body is quoted in the message, and
> > > attachments are automatically attached?
> 
> Kevin J. McCarthy writes:
> > $forward_attachments, added in Mutt 1.12.0, will prompt to attach non
> > text-decodable attachments.  However, Mutt considers autoview types to be
> > text decodable.  $honor_disposition can override this.
> 
> Thanks: I'd also been trying to find a way to forward with attachments, and 
> $forward_attachments helps as long as there's no HTML part.
> 
> But it still doesn't forward html parts, and setting honor_disposition 
> doesn't change that. Is there a way to forward the same MIME structure as the 
> original message, including html parts? Like what bounce does, except that it 
> makes me the sender and gives me a chance to add a comment?

Isn't this what the mime_forward variable is for?

- Jan


signature.asc
Description: PGP signature