Opened 8 years ago

Last modified 7 days ago

#131 new enhancement

read_mail (rdm) enhancement for brief header display mode

Reported by: Trn Owned by: Eric Swenson
Priority: minor Milestone:
Component: Unbundled Library Version: MR12.6f
Keywords: extended mail, rdm, read_mail, headers Cc:

Description

rdm would be greatly enhanced with an equivalent of Emacs rmail-header-format brief-formatting-mode.

Modern internet header bloat makes handling intersystem Mail in rdm less than friendly.

As rdm already support the "-lghe" control argument (long header), I propose that only a subset of important headers, ala rmail brief-formatting-mode be the default, and the full header can be displayed only if specifically requested.

Other alternative implementations are possible and the proposal likely merits further discussion.

Change History (1)

comment:1 by Eric Swenson, 7 days ago

What exists

  • read_mail -brief_header (-bfhe) makes brief headers the default for the whole read_mail session. The print request takes -bfhe, -header (the normal default) and -long_header. Brief mode shows the date, the authors, the subject if any, a recipient count when it matters, and forwarding comments (read_mail.info, print.info).
  • So a user can have brief headers now, with an abbrev, e.g. .ab rdm read_mail -brief_header, or in their start_up. The ticket's request to make brief the *system* default would change behavior for every user; I don't recommend it.

What is actually missing

The trouble with Internet mail is the default (-header) mode. In
mlsys_format_ (bound_mail_system_, around line 2017, "Finally, process
the user-defined fields") every user-defined field is printed. Fields the
mail system does not know (X-*, DKIM-Signature, MIME-Version,
Content-Type, List-*, ARC-*, ...) are all user-defined fields, so
they all appear. Received is trace and is already left out. Brief mode
drops all user-defined fields; there is nothing in between.

Possible enhancement (Emacs rmail-ignored-headers style)

  • A per-user list of field names to leave out (or keep) in the default mode, kept in the user's value segment, e.g. `value_set -pn mail_system read_mail.ignored_fields "X-* DKIM-Signature ...", read by read_mail` at startup and settable with a new control argument / print -ignore FIELDS.
  • Implementation: mlsys_format_ would skip a user-defined field whose name matches the list (star-name matching with match_star_name_). The list has to get there through the format options, so format_message_options (in mlsys_format_options.incl.pl1) needs a new version with a pointer to the list. The callers that build that structure (read_mail's print, print_mail, send_mail's print, Emacs rmail via the mail system) would keep working on the old version.
  • A system-wide default list (installed in a site value segment) could give reasonable behavior without changing -bfhe semantics.

This changes bound_mail_system_ and the read_mail/print_mail requests
and docs. A decision on the approach is needed first.

Note: See TracTickets for help on using tickets.