Restore historical behaviour of *askb?cc* (Norman Ramsey)
[s-mailx.git] / NEWS
blob10cd2b7b09f9d54c3a9dab334a72d824af6da6d6
1 S - n a i l / S - m a i l x  N e w s
2 ====================================
4   mdocmx(7) anchors are denoted by a number-sign #: typing
5   "^A ANCHOR" while reading the man(1)ual in a capable less(1)
6   will scroll to the manual's Point-Of-Interest, and pointing
7   a web- browser to the "#ANCHOR" of the online manual works.
9 v14.9.3 ("Crested tit nibbling sunflower seeds"), 2017-08-03
10 ------------------------------------------------------------
12 This is a bugfix release but which ships some improvements, too.
13 It silently replaces both of v14.9.1 v14.9.2 from earlier this
14 week, which were broken or not entirely fixed.
16 Credits, in order of commit appearance: Felix Fontein, Paul Vojta,
17 Ralph Corderoy, Christos Zoulas, Gavin Troy, Gaetan Bisson.
18 Thanks, Coverity.com.
20 We welcome Christos Zoulas in THANKS.
22 Apologies to Viktor Szépe for the false spelling of his name in
23 the v14.9.0 announcement.
24 And to Gaetan Bisson for not giving credit for [14fbce97]!
26 NOTES, ChangeLog (packager-affine)
27 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29 - fakeroot support was blindly taken from Debian and broken.
30   (Gavin Troy, Gaetan Bisson)
32 - Base64 output was broken for cases which involved iconv(3).
33   The data is not lost, you can read it with S-nail v14.9.0 and
34   above, and save it somewhere.  I know of no other base64 decoder
35   which reads those things correctly, though.  We now have tests.
36   Along this i fixed an iconv(3) error which likely caused
37   stateful decoding (like, e.g., for ISO-2022-JP) to fail because
38   of an unnecessary reset of the iconv(3) state machine.
39   Thanks to Gaetan Bisson for mentioning this issue!
41 ChangeLog
42 ^^^^^^^^^
44 - In compose mode the MLE allows empty lines again.
46 - We no longer require a writable $HOME#561.  Due to false code
47   flow (but but but: with correct comment) a non-writable $HOME
48   entry in /etc/password (i.e., from getpwuid(3)) would lead to
49   a crash.  (Felix Fontain; Ralph Corderoy)
51 - Two faulty string operations slipped into the IMAP code,
52   resulting in a crash and a "is-same-host" test that would fail
53   for IMAPS connections like `save'#244 or `copy'#147 because of an
54   implicit IMAP protocol for the target of those operations (thus
55   IMAP != IMAPS).  (Paul Vojta)
57 - The MLE tab-expansion will now automatically append a "/" if
58   there is only one possible expansion and that is a directory,
59   saving the user one <TAB>.  (Christos Zoulas)
61   The shell expression parser had a bug regarding understood
62   metacharacters (;|&), which in turn could cause an infinite loop
63   in the MLE tab-expansion for, e.g., "move &9 +<TAB>", because
64   the "&" would never have been stepped over.
66 - New `~I'#307 command escape is like `~i'#308 but does not append
67   a newline.
69 - `localopts'#197 gained an optional second argument.
70   It is now possible to specify that any macro `call'#133ed
71   will have localopts enabled, and it is possible to fixate the
72   setting so that it cannot be reverted.
74 - *@*#331 should now act completely compatible to the sh(1)ell,
75   thus obsoleting my hysteric warnings in the v14.9.0 announcement.
77 - The `Lreply'#198, `reply'#232, `Reply'#231 series as well as
78   `mail'#200 now manage the error status *!*#325.
79   I.e., there are now errors like *^ERR*#327-DESTADDRREQ,
80   ^ERR-NODATA, ^ERR-PERM and similar.  It is not perfect yet,
81   because $DEAD#559 may have been written (with *save*#483) or not,
82   for example.
84   `Lreply' and `reply' have been rewritten rather completely
85   indeed.  They join Reply-To: and Mail-Followup-To: dependent on
86   the context (i.e., *reply-to-honour*#481, *followup-to-honour*#391,
87   see "Mailing lists"#10 for the picture), and if they did, use
88   this list as the receivers exclusively.  It now honours
89   *recipients-in-cc*#474 even for such addressees.  (And now i wonder
90   whether i should have credited Paul Vojta for that.)
92   Also `Lreply' would have crashed for mails with Reply-To: but
93   without *reply-to-honour*#481 set.  We now have a test.
95   Note *replyto* is obsoleted in favour of *reply-to*#480.
97 git(1) shortlog (edited)
98 ^^^^^^^^^^^^^^^^^^^^^^^^
100 670aabb6 a_amv_var_check_vips(): FIX code to match comment (Felix Fontein)..
101 3dcdaa83 THANKS: Felix Fontein
102 3745e002 FIX [81d7f4d8] (IMAP: try (hard) to reinstantiate..) (Paul Vojta)
103 33b2834f FIX [81d7f4d8] (IMAP: try (hard) to reinstantiate..) (Paul Vojta)..
104 1cc0d3de Allow non-writable $HOME (Felix Fontain, Ralph Corderoy)
105 32e5c7c2 MLE: KHT: auto-append / for directories at once (Christos Zoulas)
106 e2bb54b7 THANKS: Christos Zoulas
107 f593fc18 make-config.sh: do NOT skip fakeroot paths
108         (Gavin Troy, Gaetan Bisson)
109 4fe971ea FIX [4047a432] possible bound excess in memset()!
110 84efbcab FIX shexp parser regarding metachars (and poss. endless <TAB> loop)
111 14fbce97 FIX: OH!  The codebase NEVER supported *mime-encoding*=base64!
113 v14.9.0 ("Long-tailed tit"), 2017-07-16
114 ---------------------------------------
116 This is a major feature release which took about ~22 months (24
117 less two) of development to complete, and which imposed massive
118 changes under the hood, but also quite a lot of user visible
119 changes, including some **backward incompatibilities**.
120 As usual, "s-nail -d" will show obsoletion warnings.
122 We gain noticeable improvements regarding scriptability and its
123 reliability, but also for interactive use cases, especially
124 notable to users is our completely new M(ailx)L(ine)E(ditor) that
125 supports rather real tabulator expansion and program-mode-context-
126 sensitive key bindings.
128 We now support macros with arguments, which can be `shift'ed,
129 a `return' status can be used, and a `vexpr' multiplexer offers
130 some arithmetic and string operations.  `commandalias'es are
131 recursive, further command modifier prefixes, like `ignerr', give
132 a hand that we otherwise could not offer.  In compose-mode the new
133 `~^' command escape allows some message and attachment access, and
134 can be used, e.g., to implement things like custom headers, and
135 has been especially designed for scripted access via the new
136 *on-compose-splice* and *on-compose-splice-shell* hooks.
138 S-nail will move (more or less) backward-incompatibly to sh(1)ell
139 compatible argument quoting (documented in "COMMANDS"), and an
140 increasing number of commands do support this already: new ones
141 exclusively, some old ones have either been switched (like
142 `localopts'), others -- noticeably `set' -- can be switched to the
143 new syntax with a `wysh' command modifier prefix.  E.g.:
145   ? define __xv {
146     # Be careful to choose sh(1)ell-style on _entire_ line!
147      localopts yes; wysh set verbose; ignerr eval "${@}"; return $?
148     }
149   ? commandalias call echo boo-boo
150   ? commandalias xv call __xv
151   ? xv list
152   ? commandalias xv '\'call __xv
153   ? xv list
155 Calling the latter `xv' for `list' will give more detailed command
156 information, including which kind of argument is used.
158 I have not managed to implement the three features i have started
159 this development cycle for, these are thus subject to further
160 development, just like wysh for message-list argument commands to
161 support, e.g., negation, wysh for `if' and consorts, the --
162 terminator to finally overcome the ridiculous requirement to quote
163 entire shell commands filenames for commands like `pipe.
164 And and and.
166 Credits, in order of commit appearance: Antonio Radici,
167 Aharon Robbins, Mike Frysinger, Predrag Punosevac, Michael Convey,
168 Hariskar, Rudolf Sykora, Martin Neitzel, Gavin Troy,
169 Salvatore Bonaccorso, Todd C. Miller, Sergey Matveev, Robert Elz,
170 Mantas Mikulėnas, Respiranto, Jens Schleusener, Walter Alejandro
171 Iglesias, Ralph Corderoy, David Levine, Lyndon Nerenberg,
172 Thomas Dickey, Afan, Justin Ellingwood, Ingo Schwarze,
173 Viktor Szépe, Gaetan Bisson, Juan RP, William Yodlowsky,
174 Hilko Bengen, Matthew Dillon, Colin Watson, Donald Mugnai,
175 Stephen Isard, Jürgen Daubert, Sven Neuhaus, trondd, Ismael Bouya,
176 Felipe Gasper, Paul Eggert, Dr. Werner Fink, Ken Hornstein,
177 Noel Chiappa, Random832, Doug McIlroy, Baptiste Daroussin,
178 Riccardo Ductor, Pietro Cerutti, Jörg Schilling, rain1, Xin LI.
180 We welcome Antonio Radici, Mike Frysinger, Predrag Punosevac,
181 Michael Convey, Rudolf Sykora, Todd C. Miller, Robert Elz,
182 Jens Schleusener, Walter Alejandro Iglesias, Thomas Dickey, Afan,
183 Justin Ellingwood, Viktor Szépe, Juan RP, Matthew Dillon,
184 Colin Watson, Donald Mugnai, Sven Neuhaus, Ismael Bouya,
185 Felipe Gasper, Paul Eggert, Dr. Werner Fink, Ken Hornstein,
186 Noel Chiappa, Random832, Doug McIlroy, Baptiste Daroussin,
187 Riccardo Ductor, Pietro Cerutti, Jörg Schilling, rain1, and
188 Xin LI in THANKS.
190 Apologies: Sergey Matveev.
191 Members of the Roff community which await progress.
193 NOTES, ChangeLog (packager-affine)
194 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196 * This release brings some backward incompatibilities, outlined
197   in the following.  Most users will not be affected, and we have
198   added a lot of compatibility cruft, but that will vanish in v15.
199   "$ s-nail -v"!
201 * The configuration and build system has changed.
202   Packagers have received updated package files.
204   o Anything which was WANT_xy before is now OPT_xy, and
205     compiled-in paths and values, like PREFIX or PAGER, have
206     gained a VAL_ prefix (thus VAL_PREFIX and VAL_PAGER).
208     This is _not_ true for non-persistent or environmental values,
209     e.g., DESTDIR, CC, etc., and also not for the overwritable
210     program variables during configuration, e.g., $awk.
212   o SENDMAIL -> VAL_MTA, SENDMAIL_PROGNAME -> VAL_MTA_ARGV0,
213     MAILSPOOL -> VAL_MAIL.
214     And NAIL -> VAL_MAILX, though this is still a lie.
216   o The make system now needs config..build..install or
217     all..install or tangerine (config..build..test..install).
218     Some constants which some experts may want to fine-tune have
219     been moved to config.h.  Usual adjustments+doc via make.rc.
221   o The `build' phase can be parallelized by setting the $MAKEJOBS
222     environment variable, e.g., "make MAKEJOBS=-j4 build".
223     Note this variable is not tracked in the configuration.
224     (Gaetan Bisson)
226   o Unless DESTDIR is set an uninstallation script will be
227     installed along with the rest (see INSTALL file for more).
229   o Set the new OPT_CROSS_BUILD to avoid feature runtime tests,
230     only compile- and link-availability will be tested.  (Juan RP)
232   o VERBOSE is implemented straight, but must be given at
233     configuration time in order to become honoured.
234     (William Yodlowsky)
236   o ADDCFLAGS / ADDLDFLAGS -> EXTRA_CFLAGS / EXTRA_LDFLAGS.
238   o The LD_LIBRARY_PATH etc. building processes will skip any path
239     which contains the string "fakeroot".  (Hilko Bengen)
241   o We honour a set $SOURCE_DATE_EPOCH#578 environment variable to
242     an extend that allows reproducible tests, which is why the
243     repository gained a [test-out] branch with some expected plain
244     text outputs.  (reproducible-builds.org; Colin Watson)
246     The new *log-prefix*#417 variable aids in improving the
247     reproducibility of error messages.
249   o These are upward compatible changes.
251 * "make OPENSSL_API_COMPAT=0x10100000 all" should work.
253 * Internal and environment variables are now explicitly _defined_
254   and _tracked_ after variable handling has been rewritten
255   completely.  Notes:
257   o This means that, e.g., "$ password=NOT_SECRET s-nail" will
258     **NOT** work no more, since *password*#450 is an internal
259     variable!
261   o But if you do, e.g., "? set TMPDIR=~/tmp", then this will
262     also be reflected in the program environment (it is an
263     environment variable) and thus affect child processes.
265   o Therefore we no longer have `setenv' and `unsetenv'.
267   o To integrate any other environment variable transparently
268     into our variable management, the new command `environ'#169
269     needs to be used, e.g., "? environ set NEWVAR=value" or
270     "? environ link EXISTINGVAR".
272 - -H#62 and -L#65 have been decoupled:
273    it used to be -e#59 -L#65 instead!
275 - *NAIL_{HEAD,TAIL}* have been obsoleted in favour of
276   *message-inject-head*#425 and *message-inject-tail*#426.
278   *NAIL_HIST{FILE,SIZE}* have been obsoleted in favour of
279   *history-file*#399 and *history-size*#402.
281   *NAIL_EXTRA_RC* has been obsoleted in favour of
282   *mailx-extra-rc*#420.
284   *batch-exit-on-error* has been obsoleted by *errexit*#380, which
285   works just like the POSIX sh(1)ell "set -e" construct; the
286   `ignerr'#110 command modifier (`-' for command escapes in compose
287   mode, and see below) can be used to ignore command errors even
288   then.  (This will remain even if we at some later time will
289   support at least some of the sh(1) constructs which "swallow"
290   failures with set -e.)
292   *bsdannounce* is obsolete, the feature is integrated in
293   *header*#396 as this is much more useful.  (This is however also
294   dependent upon the also new but well-known $POSIXLY_CORRECT#576
295   <> *posix*#465, but that is just how it is; these affect more
296   behaviour, and increasing.)
298 - Colour support has been changed backward in- and upward (from
299   user interface side) compatibly, see the manual section
300   "Coloured display"#17.
302   + New commands: `colour'#142 and `uncolour'#143.
303     You can define context-sensitive, terminal-capability-
304     sensitive settings, e.g.:
306       if terminal && [ "$features" =% +colour ]
307         colour iso  view-header ft=bold,fg=magenta,bg=cyan
308         colour 256  view-header ft=bold,fg=208,bg=230 subject,from
309         colour mono view-header ft=bold
310         colour mono view-header ft=bold,ft=reverse subject,from
311       endif
313   + The variable *colour-pager*#366 defines whether colour and font
314     attribute sequences should be generated when viewing something
315     in $PAGER#574.
317   + Set the variable *colour-disable*#365 to turn colour off
318     without affecting established settings.
320   + It is deduced via termcap(5) (see below) whether the terminal
321     supports colors, e.g., "$ s-nail -Stermcap=Co#256".
322     This is also true if we don't have termcap support.
324   + Support for 256-colour terminals. (Gavin Troy)
326 - `source'#259 series support shell pipes if the last character
327    of the "filename" ends with a vertical bar |, e.g.,
329       ? source 'gpg -qd ~/.s-nailrc-private.gpg |'
331 - Shell pipes are also supported as targets for `move'#210,
332   `copy'#147 etc., yet unfortunately not with via a sh(1)ell token
333   parser, so that the target still has to be a single argument.
335       ? copy . '| cat; echo huhu'
337 - Support for custom headers via the new `~^'#323 compose-mode
338   command escape and in addition, or alternatively, with the
339   internal variable *customhdr*#370, which also can be covered by
340   `localopts'#197.  (Sergey Matveev)
342   + Support of $ORGANIZATION has been dropped.
344   + Command escape `~e'#302 supports _any_ header.
346   + Command escape `~^'#323 supports _any_ header.
348 - New -:#51 command line option can be used to more easily select
349   which startup files should be loaded, e.g., -:/ loads none.
350   (Robert Elz)
352 - `account'#122s and *folder-hook*#387s now have `localopts'#197
353    enabled by default.
355 - A first simple form of compose-mode hooks has been implemented:
356   *on-compose-enter*#443, *on-compose-leave*#444 and
357   *on-compose-cleanup*#442 can be set to macros which get invoked
358   at appropriate times.
359   For the `resend'#236 series there is *on-resend-enter*#448 and
360   *on-resend-cleanup*#447: this is very likely to change once
361   true message access is possible even in this mode.
363   An even more powerful mechanism is available via the also new
364   *on-compose-splice*#445 and *on-compose-splice-shell*#446 hooks.
365   These are executed in child processes and communicate with the
366   parent via their standard input and output, and therefore can
367   do anything and act as if they were the user.
369   `localopts'#197 are enabled and cannot be disabled (and extend
370   until the message is sent).
371   (Jens Schleusener, Rudolf Sykora)
373     ? set on-compose-splice=ocs
374     ? define ocs {
375       read ver
376       echo Splice protocol version is $ver
377       echo '~^header list'
378       read hl; vput vexpr es substring "${hl}" 0 1
379       if [ "$es" != 2 ]
380         echoerr 'Failed to read header list, bailing out'
381         echo '~x'
382       elif [ "$hl" @i!% ' cc' ]
383         echo '~^header insert cc Diet is your <mirr.or>'
384         read es; vput vexpr es substr "${es}" 0 1
385         if [ "$es" != 2 ]
386           echoerr 'Failed to insert Cc:, bailing out'; echo '~x'
387         end
388       end
389     }
391 - "The .netrc file"#36
393   + gained support for comments.
394     (Walter Alejandro Iglesias, Ralph Corderoy)
396   + `netrc'#213 now has a "load" subcommand.
398   + the new *netrc-pipe*#438 obsoletes OPT_AGENT and
399     *agent-shell-lookup*, and can be used to load an encrypted
400     .netrc file, e.g.:
402       ? set netrc-lookup netrc-pipe='gpg -qd ~/.netrc.gpg'
404     I.e., this is in usual .netrc syntax and thus possibly much
405     nicer than saying "? source 'gpg -qd ~/.credentials.gpg |'".
407 - termcap(5) / terminfo(5) support has been changed backward in-
408   and upward (from user interface side) compatibly, please read
409   "On terminal control and line editor"#16.
411   + OPT_TERMCAP is by default enabled.
412     The new, by default enabled, configuration option
413     OPT_TERMCAP_VIA_TERMINFO can be used to (try to) use
414     terminfo(5) instead.
416   + The variable *termcap*#541 can be used to freely define or
417     override terminal capabilities, and *termcap-disable*#543 will
418     disable interaction with the chosen library, leaving only
419     *termcap* in charge.
421     To use the so-called ca-mode on supporting terminals,
422     effectively turning S-nail into a fullscreen application,
423     *termcap-ca-mode*#542 must be set.
425   + The built-in line editor has been rather completely rewritten
426     to be the Mailx-Line-Editor (OPT_MLE, default yes), and
427     supports wide glyphs (if possible), infinite line lengths
428     (2 GB) and more.  Tabulator expansion is no longer an option
429     (but needs fnmatch(3)).
431   + Optionally (OPT_KEY_BINDINGS, default yes) it has become
432     possible to freely define key bindings for the MLE via the new
433     `bind'#131 and `unbind'#132 commands.  These key bindings can
434     make use of termcap(5) and/or terminfo(5) names.  The MLE will
435     install a set of default bindings (unless there is a set
436     *line-editor-no-defaults*#416), more so with OPT_TERMCAP,
437     i.e., try "? bind*".
439     Sufficient support provided, one can now, e.g., type "p " and
440     then collect the message numbers to type, scrolling forward
441     and backward via key-bindings, without loosing the line
442     content, then commit the final line.
444   + OPT_EDITLINE and OPT_READLINE support have been dropped.
445     The new MLE should not miss anything.  Does it?
446     Tip: in an UTF-8 locale try "? !touch /tmp/hall{,öchen}" and
447     then autocomplete that: once, then ^Q, and again.
449 - `source'#259 can be used in `call'#133ed macros.
450   What sounds so innocent replaced an entire machinery and got rid
451   of a brilliant idea of Kurt Shoens from the 70s, but which never
452   worked with Nail/Heirloom extensions, namely macros, and in the
453   right order.
454   Accompanying this -X#79 can (dig multiline arguments and can) be
455   used to define macros and run them etc.  Should work:
457     $ s-nail -X'define x {' -Xversion -Xx -X'}' -X'call x'
458     $ s-nail -X'source \' -X'"echo version|"' -Xx
460   Macros can be `undefine'#152d from within themselves, and re-
461   `define'#151d.  It is still not possible to define macros
462   from within macros, and/or have inner macros, not to talk
463   about local scoping or anything more sophisticated such.
465 - -u#76 / $LOGNAME#567 ($USER) handling has been redefined,
466   and "-u USER" is now exactly the same as "-f %USER", and
467   $LOGNAME (and $USER) is actively set to the active user.  (Afan)
469   $LOGNAME#567 is POSIX standardized and henceforth used and
470   preferred over $USER, which came from BSD.  (Todd C. Miller)
472 - In the future (at least non-message-list) argument handling will
473   be changed backward-incompatibly to be sh(1)ell compatible (and
474   thus POSIX standardized), see "Shell-style argument quoting"#23.
475   New commands use it already today (`bind'#131, `colour'#142,
476   `headerpick'#188), some others (most importantly, `set'#247) can
477   be forced to do so via the new `wysh'#112 command prefix, as in:
479     ? wysh set message-inject-tail=$'\n--steffen'
480     ? bind base $'\cA,\x61' 'echo control-A and small a'
482 - We now actively manage *umask*#548: 0077 by default, but an
483   empty string will use the setting that is active upon startup.
484   Just like changes to (known) environment variables, this setting
485   will also be inherited by any child process.
486   (Walter Alejandro Iglesias)
488 - Anything SENDMAIL / *sendmail*-ish has been renamed to *mta*#433,
489   *mta-arguments*#434, *mta-no-default-arguments*#435 and
490   *mta-argv0*#436.
492   The reason is that in v15 we won't even have *smtp*: it is just
493   another form of MTA, and thus obsolete by itself.
494   Note that *mta-arguments* is now parsed via the shell-token
495   parser, so the following ends up exactly as desired.
497     ? set mta-arguments='-t -X "/tmp/my log"'
499   For now we support a hack that understands a file:// URL in
500   *mta*, too, but that is also the default if there is no protocol.
501   E.g.: "? set mta=smtp://a:b@xy.z"
503 - The "spamd" *spam-interface*#514 is obsolete.  I haven't tested
504   it since my main machine died, it is error prone since it assumes
505   internals of the spamassassin wire protocol, and there never was
506   a speed improvement over "spamc".  (However it could react upon
507   the "is-spam" state of a message, which "spamc" doesn't allow.)
509 - The new *inbox*#410 variable will henceforth be looked up when
510   searching for a primary system mailbox (as in "? File %"),
511   followed by the usual $MAIL#568 and compile-time defined local
512   mailspool search.  (Stephen Isard, Jürgen Daubert)
514 - The semantic of -a#53 and `~@'#296 have been changed, and both
515   commands now use the same syntax:
517     -a file[=input-charset[#output-charset]]
519 - New "failinvaddr" keyword for *expandaddr*#382.
521 - We finally "can" the so-called (by myself) "Dr. Problem" (a bit):
522   (Dr. Werner Fink)
524     $ </dev/null s-nail -d:/ -sTrödler 'Dr. D. Iet <z@a.k>' 2>&1 |\
525       grep To:
526     s-nail: >>> To: "Dr. D. Iet" <z@a.k>
528   This can be done via the new `addrcodec'#124, too, note this
529   supports multiple modes (and the `vput'#111 command modifier):
531     $ echo 'addrcodec e Dr. Diet <to@fu.soj> Curd' | s-nail -#:/
532     "Dr. Diet Curd" <to@fu.soj>
534 - All commands with the string "codec" in their name use different
535   argument quoting, namely none at all, please read
536   "Raw data arguments for codec commands"#24.
537   This means that `urlcodec'#276 (and `imapcodec'#606) has
538   slightly changed semantics.
539   And, while here: there is a new `shcodec'#249, too.
541 - We gained "Command modifiers"#20: `\'#109 (avoid expansion of
542   `commandalias'#144es), `vput'#111 (store result in variable),
543   `ignerr'#110  (ignore an error of the following command, even
544   if the new *errexit*#380 is set), `wysh'#112 (use shell-style
545   arguments).
547     $ echo 'vput cwd resvar;echo $resvar' | s-nail -#:/
548     /home/steffen/src/nail.git
550   And the usual sh(1) stuff: `return'#242, `shift'#253, `eval'#171,
551   plus a `xcall'#285 stack-avoidance optimization (to be used in
552   place of a `call'#133 which would be the last called command).
553   And an "expr(1) like thing", yet simple, `vexpr'#281.
555     $ echo 'vexpr + 1 2' | s-nail -#:/
556     00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000011
557     03 | 0x3 | 3
558     $ echo 'vput vexpr resvar + 1 2;echo $resvar' | s-nail -#:/
559     3
561   We actually start walking (*?*#324, *^*#326).
563     ? vput vexpr res regex 'bananarama' 'Bana(.+)' '\$1\$0'
564     ? echo $?/$^ERRNAME :$res:
565     1/NODATA ::
566     ? vput vexpr res iregex 'bananarama' '(.+)rama' '\$1\$0'
567     ? echo $?/$^ERRNAME :$res:
568     0/NONE :bananabananarama:
570   The command `vpospar'#282 can be used to manage the stack of
571   positional parameters, i.e., much like "set --".
572   It also offers the possibility to save and restore the stack to
573   and from variables.  Etc.
575   Btw., to contact the maintainer (make.rc variables
576   VAL_CONTACT_WEB and VAL_CONTACT_MAIL):
578     ? echo $contact-web; eval mail $contact-mail
580 - `if'#194 no longer performs automatic number conversion, we
581   use the explicit -lt, -gt etc. syntax of the sh(1).
582   Note: `if' will change to be almost identical to sh(1) if(1),
583   so please ensure proper test bracketing, even if it is less
584   convenient.
586   Moreover, the default string comparison mode has changed to
587   case-sensitive, just like in the shell.  This is because in the
588   future this crux with trigger characters will vanish and `if'
589   etc. will simply slurp in already expanded shell tokens, it will
590   act like the shell in that respect.  We have modifiers, though,
591   yet only "@i" for case-insensitivity, also for regex matches:
593     LC_ALL=C
594     i=`LC_ALL=C.utf8 s-nail -:/ -# -X '
595        \define cset_test {
596           \if [ "${ttycharset}" @i=% utf ]
597              \echo $LC_ALL
598              \xit 0
599           \end
600           \if [ "${#}" -gt 0 ]
601              \wysh set LC_ALL=${1}
602              \shift
603              \eval xcall cset_test "${@}"
604           \end
605           \xit 1
606        }
607        \call cset_test C.UTF-8 POSIX.utf8 POSIX.UTF-8 \
608           en_EN.utf8 en_EN.UTF-8 en_US.utf8 en_US.UTF-8
609    '`
610    [ $? -eq 0 ] && UTF8_LOCALE=$i
612   Please note the `eval' in 'eval xcall cset_test "${@}".  This is
613   a difference of S-nail/mailx and the sh(1)ell that will remain,
614   as documented in "COMMANDS"#19: whereas the shell implements
615   a language and performs standardized expansions on the line
616   until finally the command is called, S-nail will decide the type
617   of command line parsing dependent on the seen command, and will
618   then perform a single expansion.  Therefore "${@}" will expand
619   to multiple arguments if $# is greater 0, but it will expand to
620   the empty string otherwise, which is not furtherly expanded away
621   since it is meaningless like it is in the shell: therefore $#
622   will be 1 (the empty string) not 0.
624 - Using an explicit proto:// prefix should get you the desired
625   thing apart of *newfolders*#439, e.g.:
627     ? File maildir:///tmp/x.mdir
628     ? copy * file:///tmp/x.mbox
630 - New variable *record-files*#476 can be set to extend the meaning
631   of *record*#475.  *record-resent*#477 was there already.
633 - New variable *ifs*#406 acts a bit like the sh(1)ell's $IFS for,
634   e.g., the new `read'#227 command.
636   There is a `readctl'#228 command which can be used to manage
637   the active channel used by `read'#227.
639 - The `~' alias for `call'#133 is gone.
641 - `mimetype'#202 only allows specification of a single type per
642   call, on the other hand no need to quote that.
644 - `mimeview'#206 must now be used explicitly to look at any
645   non-text MIME part, for normal display etc. purposes we only
646   support "copiousoutput"#593 MIME handlers.
648 - New *socks-proxy*#513 can be used to proxy all network traffic
649   over a SOCKS5 proxy.  (Gaetan Bisson)
651 ChangeLog
652 ^^^^^^^^^
654 - The manual has seen another major overhaul, all the variables
655   are now documented in a single, sorted list, and many
656   clarifications should have been added.  I hope it has become
657   a better read.
658   (Predrag Punosevac, Michael Convey, Hariskar, Rudolf Sykora,
659   Respiranto, Thomas Dickey, Donald Mugnai)
661 - To support RFC 1524 a.k.a. .mailcap files (see below) many
662   "trigger"-characters have been added for *pipe-TYPE/SUBTYPE*#452,
663   which may (rarely) affect existing values.
664   The .mailcap support itself is not yet implemented.
666 - *mime-counter-evidence*#430 gained bit 4 (perform proper in-depth
667   content inspection as necessary; set to 0xE for all bits).
668   (Aharon Robbins)
670 - Maildir paths are now created recursively as necessary.
671   (Justin Ellingwood)
673 - -M#66 and -m#67 options have been added to enforce a special
674   send mode that will flag standard input / the given file with
675   the specified / detected MIME 'Content-Type:'.  This can be used
676   to directly send, e.g., HTML log output.
677   (Viktor Szépe, Ralph Corderoy)
679 - Disallow symlinks on writable files.  Note this requires
680   O_NOFOLLOW support for the operating-system-call open(2), but
681   which has been standardized a long time ago.
682   (Matthew Dillon)
684 - `retain'#241, `ignore'#195 etc. now differentiate in between
685   From (the From: header) and From_ (the MBOX ident).
687   In fact we now have a new `headerpick'#188 command which
688   is a multiplexer for all retain and ignore lists used, call it
689   without arguments to see the current setting(s).
690   In v15 only `headerpick' and the standard-imposed wrappers
691   `retain' and `ignore' will remain, all other wrappers will
692   vanish.  Regular expressions can now be used if available:
694     ? headerpick
695       headerpick type retain blahblahblah cc date from \
696         mail-followup-to message-id openpgp reply-to subject to \
697         user-agent
698       #headerpick type ignore currently covers no fields
699       #headerpick save retain currently covers no fields
700       headerpick save ignore '^Original-.*$' '^X-.*$' '^DKIM.*$'
701       headerpick forward retain cc date from list-id \
702         mail-followup-to openpgp reply-to subject to
703       #headerpick forward ignore currently covers no fields
705 - `top'#268 has been rewritten completely, `Top'#267 is new.
706   It uses a built-in set of retain/ignore headers, but it is
707   possible to register a custom set via `headerpick'#188.
708   Also, *toplines*#544 has been extended a bit and the new
709   *topsqueeze*#545 variable may pimp your `top' experience.
711     ? headerpick top retain add subject
712     ? top
713     [-- Message  1 -- 87 lines, 4791 bytes --]:
714     Subject: Re: I can't dist to myself
716     I wrote:
717         3.22. bounce_delivered
719 - `features' has been dropped, `version'#280 extended.
721 - The *prompt*#467 handling has changed: we lost the capability to
722   expand \?, \@ and \$, instead new "private" variables *?*#324,
723   *account*#335, *mailbox-resolved*#419 and
724   *mailbox-display*#418 have been introduced, and the prompt
725   is completely shell expanded (thus twice with `wysh' or in v15),
726   as if dollar-single-quote quoted.  We do support the reverse-
727   solidus escaped bracket notation for embedding characters which
728   should not be counted when calculating the width of the prompt.
729   The `colour'#142 command has a slot for the prompt colour.
730   We gained *prompt2*#468 as a second level prompt.
732     ? var prompt
733     wysh set \
734       prompt='?\${?}!\${!}[\${account}#\${mailbox-display}]? '
736 - The filename "-" can be used as a receiver, e.g.,
738     $ echo Hey,\ you | s-nail -:/ -Sexpandaddr -sUB -
740 - The -s#74 command line option, the `~s'#315 command escape
741   as well as the corresponding slots of `~^'#323 will actively
742   strip [\r\n] from their value (Debian #419840).
744 - New `read'#227 and `echoerr'#162 commands, mostly for
745   *on-compose-splice*#445.
746   But also `echon'#163 and `echoerrn'#164, which do not write
747   a trailing newline.
749 - New variable *r-option-implicit*#473 may be helpful to those
750   who regulary need the functionality of the -r#72 command
751   line option.  (Felipe Gasper, Martin Neitzel)
753 - By using new "pseudo-URLs" one can automatize the use of S/MIME
754   keys / (certificates / intermediate include certificates) with
755   passwords.  E.g., to drive bob@exam.ple, set
756   *smime-sign-cert-bob@exam.ple* to the private key / certificate
757   pair as usual, the password lookup will then be performed for
758   bob@exam.ple.smime-cert-key, bob@exam.ple.smime-cert-cert and
759   bob@exam.ple.smime-include-certs.
760   Like this the password can be stored in an encrypted .netrc file
761   when *netrc-lookup*#437 and *netrc-pipe*#438 are set, or it may
762   be stored in an encrypted resource file that has been loaded via
763   `source'#259 as a simple *password*#450 variable.
765   Note that the prompting that happens as a last resort of
766   password lookup will still interfere with a possibly running
767   $PAGER#574 instance, dependent on the setting of *crt*#369, of
768   course.  Proper job control handling and recognizing that we are
769   running $PAGER when doing that prompt is a TODO for v15.  Sorry.
771 - Some commands, like `set'#247, `help'#191, `list'#196,
772   `mlist'#204 etc., now react upon the setting of *verbose*#551
773   and(/or) *debug*#373.
775 - `write'#284 uses iconv(3) as appropriate.
777 - *mbox-rfc4155*#422 has first been dropped, and was then
778   reintroduced with different semantics.  Because, it can be
779   helpful if a messed up MBOX is read, in which case we henceforth
780   will warn you and point you to this:
782     ? define mboxfix {
783       \localopts yes; \wysh set mbox-rfc4155;\
784         \wysh File "${1}"; \eval copy * "${2}"
785     }
786     ? call mboxfix /tmp/bad.mbox /tmp/good.mbox
788   P.S.  Here you see how weird the current thing still is, in v15:
790     ? define mboxfix {
791       localopts yes; set mbox-rfc4155; File "${1}"; copy * -- "${2}"
792     }
794   And also in v15 we will not apply (proper) so-called MBOXO
795   quoting, but instead (simply MIME) re-encode mail messages.
797 - `call_if'#134 is new and, different to "? ignerr call", silent
798   and not messing with the return status.
800 - The new *smime-ca-flags*#499 and *ssl-ca-flags*#527 can be used
801   to fine-tune X509_STORE_set_flags(3) a.k.a the X509 CA
802   certificate verification.
804     ? set ssl-ca-flags=partial-chain
805     ? wysh set smime-ca-flags="${ssl-ca-flags}"
807   Also, *ssl-curves*#532 for TLSv1.3.
809 - Socket connections use TLS S(erver)N(ame)I(ndication) as
810   appropriate (RFC 7817).
812 - `alternates'#127 checks arguments and supports `vput'#111.
813   It by default no longer replaces but appends alternates, unless
814   *posix*#465 mode is active.  There is a new `unalternates'#128
815   command to remove alternates.
817 - A new `charsetalias'#137 command.  (Pietro Cerutti, mutt#3925)
819 - New commands `filetype'#175 and `unfiletype'#176: in the future
820   we will no longer know any builtin filetypes, in fact we already
821   simulate .gz etc. via the new mechanism as necessary:
823     ? filetype \
824        bz2 'bzip2 -dc' 'bzip2 -zc' \
825        gpg 'gpg -d' 'gpg -e' \
826        gz 'gzip -dc' 'gzip -c' \
827        xz 'xz -dc' 'xz -zc' \
828        zst 'zstd -dc' 'zstd -19 -zc' \
829        zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
831 - `~<'#294 now offers a "- [HERE-delimiter]" mode for pasting etc.
832   (Ralph Corderoy)
834 - `exit'#172 and `quit'#226 take an optional exit status.
835   (That is not fixated yet, though.)
837 - We have a useful -h / --help output.  (Doug McIlroy)
839 - *encoding* obsoleted in favour of new *mime-encoding*#431, which
840   now defaults to base64.
842 - *allnet*#337 now works (broken since nail 10.00, 2002-09-29).
844 git(1) shortlog (abbreviated)
845 '''''''''''''''''''''''''''''
847 f01291d extract_date_from_from_(): dig more invalid MBOXes (Antonio Radici)..
848 df8768b Add *mime-counter-evidence* bit 4 (Aharon Robbins)..
849 d3fe980 Ftmp(): drop "mode" argument (not wrong: Mike Frysinger)..
850 86159db nail.1: we support searching, really (Predrag Punosevac)
851 5b61a08 nail.1: talk about address lists (again) (Michael Convey)..
852 0eeffc4 nail.1: try improve states / MBOX etc. relation (Michael Convey)
853 43ea039 nail.1: what is an environment variable (Michael Convey)
854 13e0804 nail.1: fix typo (Hariskar (archlinux Wiki))
855 03d6af5 nail.1: more on sortability (Rudolf Sykora)..
856 4da9043 Not "binary", but "boolean" variables! (Predrag Punosevac)..
857 c85f56d Support :d specifier for at least `from' (Martin Neitzel)..
858 b12e1ed Be more friendly when composing mails (Martin Neitzel)..
859 b50eac0 nail.1: use display/show not type/print (Michael Convey)..
860 6feafaf Add `search' alias for `from' (Predrag Punosevac)
861 a4e2612 Support 256-colour terminals (Gavin Troy)
862 8655aff Error framework: print UAGENT prefix (ident in pipes; Salvatore
863         Bonaccorso)
864 e96baaa Introduce $LOGNAME, the POSIX equivalent of $USER (Todd C. Miller)
865 76e6364 Add `customhdr' (Sergey Matveev)..
866 ad58c91 Support *customhdr*, too (Sergey Matveev)..
867 6322e0a Support _any_ user header via ~e (Sergey Matveev)..
868 5d52578 Add -: command line option (Robert Elz)..
869 53b5f07 README: use git(1) --single-branch (Mantas Mikulėnas)
870 420131f Fix mispelling: can|to be send->sent (Respiranto (archlinux Wiki))
871 d6902e1 Add *on-compose-{enter,leave}* hooks (Jens Schleusener, Rudolf
872         Sykora)..
873 abf2e5d .netrc: support comments (Walter Alejandro Iglesias, Ralph Corderoy)..
874 37e0c26 nail.1: .netrc comma separator was in original Berknet parser! (Ralph
875         Corderoy)
876 40522c3 nail.1: use -v option to cat(1) if available (Thomas Dickey)
877 d8f7cd7 (BWDIC!) Redefine -u / $LOGNAME / $USER (Afan)..
878 e337e00 Support expansions in $MAIL!; more on `account's (Afan)..
879 d596d74 Compare *newfolders* case-insensitively (Justin Ellingwood)..
880 57744f9 Redefine *folder* / getfold->folder_query() / *HOME* (Justin
881         Ellingwood)..
882 3c57c83 n_path_mkdir(): create recursively as necessary (Justin Ellingwood)
883 0bbe981 nail.1: fix spelling errors as by igor(1) (Ingo Schwarze)
884 f1a775b Add -M and -m options (Viktor Szépe, Ralph Corderoy)..
885 1bd8e48 Add *umask*, and set actively (Walter Alejandro Iglesias)..
886 6b1cd93 Now with *umask*, just drop fchmod(2)++ calls (Walter Alejandro
887         Iglesias)
888 ba22166 Change make targets; add $MAILJOBS; don't track $DESTDIR (Gaetan
889         Bisson)..
890 cd244b1 Add WANT_CROSS_BUILD make.rc option (Juan RP)..
891 95141f6 Tweak VERBOSE handling (William Yodlowsky)..
892 d74a18a mk-conf.sh:path_check(): skip any "fakeroot" path (Hilko Bengen)
893 10990e4 Add n_O_NOFOLLOW, disallow symlinks for writable files (Matthew
894         Dillon)..
895 df4954c Add $SOURCE_DATE_EPOCH (reproducible-builds.org; Colin Watson)
896 dc92f2c savedeadletter()->sendout.c; tweak POSIX compliance (Ralph Corderoy)
897 20f3cd2 nail.1: more explicit `set' references instead of saying 'Set' (Donald
898         Mugnai)..
899 2d53b46 url_parse(): better take better care for path parts (Stephen Isard)..
900 21f0eaa mk-conf.sh: find terminfo on Sun (Thomas Dickey)..
901 e4ddaa8 Change n_iconv*() protos, add enum n_iconv_flags (Ralph Corderoy)..
902 1587069 FIX [44cec1f] (Fix "address" message specifications (John Dodson))..
903 e40e181 nail.1, nail.rc: set *sendwait* by default (Ralph Corderoy)
904 7adcf99 `write'++: !interactive: urlxenc() attachment paths (Ralph Corderoy)..
905 b14aae7 `write'++: !interactive:.. But now, really (Lyndon Nerenberg, David
906         Levine)..
907 5270bf1 Simplify *folder* (implicit trail solidus) (Stephen Isard, Ralph
908         Corderoy)
909 a638bcf Add *typescript-mode*, set it for -# (Ralph Corderoy, Martin
910         Neitzel)..
911 053e19f Add *inbox* (Stephen Isard, and Jürgen Daubert)..
912 20e3240 Add OPT_ALWAYS_UNICODE_LOCALE (Predrag Punosevac)..
913 14b5a3a Make combinetime() overflow safe (Vincent Lefevre)..
914 7a657d9c cc-test.sh: add S/MIME disproofs via smime(1) (Sven Neuhaus)..
915 ae86c884 cmd1.c:__hprf(): compensate for add. bytes of UTF-8 seq.(s) (Martin
916         Neitzel)
917 975e6869 (BWDIC!) Only rm sysboxes, unless *posix* (Walter A. Iglesias,
918         trondd)..
919 81e33751 Throw away file_expand() (Ismael Bouya)..
920 5ae556f8 Add *r-option-implicit* (Felipe Gasper, Martin Neitzel)..
921 33709163 nail.1: some more words for *inbox*, and such sort (Stephen Isard)
922 88c19049 mk-release.inc: place OpenPGP signatures last (learned from Paul
923         Eggert)
924 0ede309c Rudely fix the RFC 5322 dot-atom, the "Dr. Problem" (Dr. Werner Fink)
925 f797c27e FIX privsep.c, yes, vulnerability (wapiflapi)..
926 f2699449 FIX privsep.c vulnerability, II (forgot hostname!) (wapiflapi)
927 303d46cd FIX [3d7835fc] aka `~^' attachments, especially Content-ID: (Ralph
928         Corderoy)
929 4ce4eb55 privsep.c: and just verify the box is also in CWD (wapiflapi)
930 25d9e6e2 Generate Content-ID: as applic. (Ralph Corderoy, Ken Hornstein, David
931         Levine)
932 6409c886 nail.1: clarify/FIX doc. of \cX (Noel Chiappa, Random832)..
933 5a1c023c nail.1: furtherly clarify doc. of \cX (Doug McIlroy)..
934 d33294c2 mk-release.inc: use %B for $DATE_MAN (Baptiste Daroussin)..
935 eafa9411 (BWDIC!) Defaults for *datefield{-markout-older}* (Debian #855582;
936         r.ductor)..
937 5ab93627 MLE: set FEXP_NOPROTO for mle-complete expansions (Ralph Corderoy)
938 ada72661 ~<: add "- [HERE-delimiter]" for pasting etc. (Ralph Corderoy)
939 d4d46c42 Add `charsetalias', and use it (Pietro Cerutti, mutt#3925)
940 65e2b75f Redefine VIP handling of variables (Ralph Corderoy)..
941 162cafb7 *mime-counter-evidence*, bit 4: allow "soft" controls (Jörg
942         Schilling)..
943 90861930 Readd removed fflush()/fseek() in between read and write..
944   [That should credit Jörg Schilling indeed]
945 aae47707 Tweak previous, and include O_CREAT in "a+" (Jörg Schilling)..
946 3e4441f8 a_main_usage(): new synopsis (Doug McIlroy)
947 8f61025b FIX icase hmaps (`charsetalias', `filetype', `mlist') (rain1)
948 2e6a811d a_termcap_init_var(): numerics not necessarily decimal (Thomas
949         Dickey)..
950 9d58267f config.h+: add n_PATH_DEVNULL, use it instead of hardcoding (Xin LI)
951 8075cf00 Support *socks-proxy* (SOCKS5) (Gaetan Bisson)
953 Appendix
954 ^^^^^^^^
956 The complete changelog of commits in between two versions OLD and
957 NEW can be inspected by using the git(1) `log' command:
959   $ git log --reverse --topo-order --abbrev-commit OLD..NEW
960   # Only topic branch headers (--no-merges for content commits only):
961   $ git log --oneline --reverse --topo-order --merges OLD..NEW
962   # Same, but truly accessible:
963   $ git log --oneline --reverse --topo-order --merges --parents OLD..NEW |
964     while read c1 c2 c3 c4 c5 c6; do
965       printf "%-24s: \$ git log --oneline --no-merges %s ^%s\n" \
966         "${c6}" "${c1}" "${c2}";
967     done
969 Entries for releases before v14.9.0 have been cut off and can be
970 found in the git(1) repository:
972   v14.8.0 - v14.8.16: $ git show v14.8.16:NEWS
973   v13     - v14.8.5 : $ git show v14.8.5:NEWS
974   9.0     - 12.5    : $ git show heirloom:ChangeLog
976 Also accessible via HTTPS?, just replace X.Y.Z accordingly:
978   \https?://git.sdaoden.eu/cgit/s-nail.git/tree/NEWS?h=vX.Y.Y
980 For even older releases you need to look into the [timeline]
981 branch, but no changelog has been administrated for them.
983 # s-tm-mode