annotate README @ 8:a92d0d59b669 default tip

f-demime: indicate X-backslash-escapes encoding in output
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 06 May 2023 17:00:23 +0000
parents 36a95de13d30
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 The present code repository contains email software which Mother Mychaela
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 developed for her own personal use; it is unlikely to be of interest to other
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 people as my tastes in personal technology tend to be very different from the
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 rest of the world, but I publish almost all of my software nonetheless, as a
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 matter of general principle.
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 The main program in the present collection is f-demime - it is a de-MIME-ing
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 tool. f-demime processes one or more email messages in UNIX mailbox format
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 (each message preceded and delimited by a '^From ' line) and applies the
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 following transformations to each message:
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 1] base64 blobs that aren't text parts are excised from the message; each such
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 blob is decoded and saved into its own file. These saved attachment files
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 are written into a special directory that must be indicated with
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 FDEMIME_ATT_DIR= environment variable.
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 2] text/plain parts that are encoded in either base64 or quoted-printable are
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 decoded and written out in a form that (a) losslessly preserves the content
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 of the text part that originally contained non-ASCII characters and/or
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 insanely long lines, but also (b) is more suitable for direct consumption by
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 my wetware, rather than MIME software. The output form uses backslash
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 escapes to represent non-ASCII characters and machine-inserted line breaks.
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 3] text/html and other non-plain text parts that are encoded in base64 are
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 losslessly transcoded from base64 to quoted-printable.
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 The transformations applied by f-demime aren't fully lossless at level of
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 overall message lines and octets (one cannot take f-demime output and
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 reconstruct a message byte-identical to the original), but they are lossless at
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 the level of content which MIME itself promises to preserve.
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 One important demiming function which f-demime does NOT do is collapsing
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 multipart/alternative structures, keeping text/plain and discarding HTML. The
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 rationale for this functional omission is that I will be inserting f-demime
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 into my incoming mail handling path, such that every incoming message will
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 automatically pass through f-demime before it hits my eyeballs. Given the
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 current state of badness on the Internet, I occasionally receive mails in which
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 the HTML part (which would be thrown away in a multipart/alternative collapse)
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 contains some valuable or interesting information content that is missing in the
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 text/plain version - thus fully automatic collapsing is not a workable approach
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 currently. I plan on implementing another program (resurrecting maltcollapse
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 from my previous cdemime attempt circa 2006) to do this multipart/alternative
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 collapsing, and then devising a practical way to invoke it once I have
36a95de13d30 add README
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 determined that the HTML part is junk that can be safely thrown away.