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


Groups > linux.debian.user > #220507

Re: HTML mail + PDF attachments

From <tomas@tuxteam.de>
Newsgroups linux.debian.user
Subject Re: HTML mail + PDF attachments
Date 2020-03-26 10:50 +0100
Message-ID <zOxjd-71A-3@gated-at.bofh.it> (permalink)
References <zOrQt-3Be-1@gated-at.bofh.it> <zOw3L-6kJ-1@gated-at.bofh.it> <zOwQ9-6S4-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

On Thu, Mar 26, 2020 at 08:53:35AM +0000, Russell L. Harris wrote:
> On Thu, Mar 26, 2020 at 10:24:38AM +0200, Andrei POPESCU wrote:
> >Opening pdfs in a reader is trivial with mutt. Just press 'v' and then
> >'Return' on the pdf attachment. It should be opened in your default pdf
> >viewer. This should work also for 'html' parts to be opened in your
> >default browser.
> 
> I understand.  But some of the stuff I receive does not work as
> expected.  What do I do with the following PDF:
> 
>    =?utf-8?B?QkhfODU0MDk2MjMwLnBkZg==?=

This is not a PDF (it would be a very short one, mind you :)

This is a string in MIME's "Encoded-Word" encoding [1], which is used
to wrap non-ASCII stuff in an MIME metadata (i.e. header) snippet.

Following the reference, that's what you can read off it:

  =?utf-8 -- means that the actual content is an UTF-8 encoded string
   ?B     -- means that what comes now is a base-64 encoding of the
             above

  After the next "?" comes the data:

  QkhfODU0MDk2MjMwLnBkZg==

(the two trailing equals signs are padding, part of the base64 thingy;
the last ?= are MIME delimiters according to [1]).

Base-64 decoding it [2] yields:

  BH_854096230.pdf

This looks like a file name to me. Note that, in hindsight, all this
encoding nonsense wouldn't have been necessary, because the original
above *is* already plain ASCII. This is a case of stupid software 
obscuring things to make users even more stupid and dependent [3].

The PDF itself is somewhere else (perhaps in a MIME part somewhere
in that mail, perhaps sitting in some file system, whatever).

Cheers

[1] https://en.wikipedia.org/wiki/Multipurpose_Internet_Mail_Extensions#Encoded-Word
[2] In Emacs, just mark that string and M-x base64-decode-region.
   Your editor sure has a way to do this, hasn't it?
[3] I don't think it's really intentional. It's an unfortunate and
   contagious antipattern, a bit like prions transmit Creutzfeld-Jacob.
   But nowadays I suspect that some actors help its expansion because
   it helps their business interests. Or something.

-- tomás

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-03-26 05:00 +0100
  Re: HTML mail + PDF attachments David Christensen <dpchrist@holgerdanske.com> - 2020-03-26 06:00 +0100
    Re: HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-03-26 07:40 +0100
    Re: HTML mail + PDF attachments Joe <joe@jretrading.com> - 2020-03-26 10:10 +0100
    Re: HTML mail + PDF attachments Dan Purgert <dan@djph.net> - 2020-03-26 12:40 +0100
      Re: HTML mail + PDF attachments Tixy <tixy@yxit.co.uk> - 2020-03-26 13:20 +0100
        Re: HTML mail + PDF attachments Dan Purgert <dan@djph.net> - 2020-03-26 13:40 +0100
  Re: HTML mail + PDF attachments Gene Heskett <gheskett@shentel.net> - 2020-03-26 06:10 +0100
  Re: HTML mail + PDF attachments Andrei POPESCU <andreimpopescu@gmail.com> - 2020-03-26 09:30 +0100
    Re: HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-03-26 10:20 +0100
      Re: HTML mail + PDF attachments <tomas@tuxteam.de> - 2020-03-26 10:50 +0100
        Over-engineering, Libre Software and Open Source (was: HTML mail +  PDF attachments) Nicolas George <george@nsup.org> - 2020-03-26 16:40 +0100
          Re: Over-engineering, Libre Software and Open Source (was: HTML mail  + PDF attachments) <tomas@tuxteam.de> - 2020-03-26 17:30 +0100
        Re: HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-03-26 18:50 +0100
      Re: HTML mail + PDF attachments Dan Purgert <dan@djph.net> - 2020-03-26 12:50 +0100
        Re: HTML mail + PDF attachments Dan Purgert <dan@djph.net> - 2020-03-26 12:50 +0100
      Re: HTML mail + PDF attachments Reco <recoverym4n@enotuniq.net> - 2020-03-26 16:50 +0100
        Re: HTML mail + PDF attachments Andrei POPESCU <andreimpopescu@gmail.com> - 2020-03-27 10:00 +0100
          Re: HTML mail + PDF attachments Reco <recoverym4n@enotuniq.net> - 2020-03-27 12:50 +0100
            Re: HTML mail + PDF attachments Andrei POPESCU <andreimpopescu@gmail.com> - 2020-03-27 13:30 +0100
              Re: HTML mail + PDF attachments Richard Hector <richard@walnut.gen.nz> - 2020-03-27 14:50 +0100
                Re: HTML mail + PDF attachments David Wright <deblis@lionunicorn.co.uk> - 2020-03-27 15:40 +0100
              Re: HTML mail + PDF attachments Reco <recoverym4n@enotuniq.net> - 2020-03-27 15:40 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) David Wright <deblis@lionunicorn.co.uk> - 2020-03-27 17:20 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) Greg Wooledge <wooledg@eeg.ccf.org> - 2020-03-27 17:50 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) Andrei POPESCU <andreimpopescu@gmail.com> - 2020-03-27 18:10 +0100
                Re: HTML mail + PDF attachments (with  șurubelniță) Curt <curty@free.fr> - 2020-03-27 18:40 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) deloptes <deloptes@gmail.com> - 2020-03-27 21:20 +0100
                Re: HTML mail + PDF attachments (with  șurubelniță) Curt <curty@free.fr> - 2020-03-28 10:10 +0100
                Re: HTML mail + PDF attachments (with  șurubelniță) Curt <curty@free.fr> - 2020-03-28 10:40 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) <tomas@tuxteam.de> - 2020-03-28 11:10 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) Joe <joe@jretrading.com> - 2020-03-28 14:20 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) <tomas@tuxteam.de> - 2020-03-28 15:00 +0100
                Re: HTML mail + PDF attachments (with  șurubelniță) Curt <curty@free.fr> - 2020-03-28 15:40 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) <tomas@tuxteam.de> - 2020-03-28 16:10 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) <tomas@tuxteam.de> - 2020-03-28 10:40 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) Joe <joe@jretrading.com> - 2020-03-28 10:40 +0100
                Re: HTML mail + PDF attachments (with  șurubelniță) Curt <curty@free.fr> - 2020-03-28 10:50 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) Joe <joe@jretrading.com> - 2020-03-28 14:10 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) Brian <ad44@cityscape.co.uk> - 2020-03-27 20:40 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) David Wright <deblis@lionunicorn.co.uk> - 2020-03-28 05:20 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) Andrei POPESCU <andreimpopescu@gmail.com> - 2020-03-28 09:40 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) David Wright <deblis@lionunicorn.co.uk> - 2020-03-30 20:40 +0200
                Re: HTML mail + PDF attachments (with șurubelniță) The Wanderer <wanderer@fastmail.fm> - 2020-03-31 01:30 +0200
                Re: HTML mail + PDF attachments (with șurubelniță) Richard Hector <richard@walnut.gen.nz> - 2020-03-31 12:00 +0200
                Re: HTML mail + PDF attachments (with șurubelniță) Joe <joe@jretrading.com> - 2020-03-28 09:50 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) <tomas@tuxteam.de> - 2020-03-28 09:50 +0100
                Re: HTML mail + PDF attachments (with șurubelniță) Greg Wooledge <wooledg@eeg.ccf.org> - 2020-03-30 13:30 +0200
                Re: HTML mail + PDF attachments (with șurubelniță) David Wright <deblis@lionunicorn.co.uk> - 2020-03-30 20:40 +0200
                Re: HTML mail + PDF attachments (with ??urubelni????) "Russell L. Harris" <russell@rlharris.org> - 2020-03-27 21:10 +0100
          Re: HTML mail + PDF attachments Dan Purgert <dan@djph.net> - 2020-03-27 13:30 +0100
            Re: HTML mail + PDF attachments Dan Purgert <dan@djph.net> - 2020-03-27 13:30 +0100
          Re: HTML mail + PDF attachments Andrei POPESCU <andreimpopescu@gmail.com> - 2020-03-28 10:00 +0100
      Re: HTML mail + PDF attachments Jason <electron@emypeople.net> - 2020-04-13 19:40 +0200
        Re: HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-04-13 20:50 +0200
          Re: HTML mail + PDF attachments Andrei POPESCU <andreimpopescu@gmail.com> - 2020-04-14 09:00 +0200
            Re: HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-04-14 09:30 +0200
              Re: HTML mail + PDF attachments Andrei POPESCU <andreimpopescu@gmail.com> - 2020-04-14 10:20 +0200
              Re: HTML mail + PDF attachments David Wright <deblis@lionunicorn.co.uk> - 2020-04-14 22:30 +0200
                Re: HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-04-14 23:20 +0200
                Re: HTML mail + PDF attachments David Wright <deblis@lionunicorn.co.uk> - 2020-04-23 03:20 +0200
    Re: HTML mail + PDF attachments Dan Purgert <dan@djph.net> - 2020-03-26 12:50 +0100
  Re: HTML mail + PDF attachments Nate Bargmann <n0nb@n0nb.us> - 2020-03-26 12:50 +0100
    Re: HTML mail + PDF attachments Erwan David <erwan@rail.eu.org> - 2020-03-26 15:00 +0100
    Re: HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-03-26 19:00 +0100
      Re: HTML mail + PDF attachments Nate Bargmann <n0nb@n0nb.us> - 2020-03-27 02:30 +0100
  Re: HTML mail + PDF attachments Eduardo M KALINOWSKI <eduardo@kalinowski.com.br> - 2020-03-26 13:30 +0100
    Re: HTML mail + PDF attachments Reco <recoverym4n@enotuniq.net> - 2020-03-26 16:50 +0100
  Re: HTML mail + PDF attachments David Wright <deblis@lionunicorn.co.uk> - 2020-03-26 17:20 +0100
    Re: HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-03-26 20:00 +0100
      Re: HTML mail + PDF attachments David Wright <deblis@lionunicorn.co.uk> - 2020-03-27 04:30 +0100
  [solved] Re: HTML mail + PDF attachments "Russell L. Harris" <russell@rlharris.org> - 2020-03-27 08:00 +0100
    Re: [solved] Re: HTML mail + PDF attachments David Wright <deblis@lionunicorn.co.uk> - 2020-03-27 16:00 +0100

csiph-web