*inbox*: if empty, only bypass *folder* to $MAIL or builtin default
[s-mailx.git] / NEWS
blobb917f68a13f89c567ce7f88ad9ad76458474e0c6
1 S - n a i l  N e w s
2 ====================
4 In the following numbers in [] reference either the commit SHA1 hash or
5 the name of a topic branch which relate to the NEWS entry;
6 Likewise, numbers after an at-sign @ are mdocmx(7) manual anchor
7 references which allow directly jumping to the given anchor.
8 Commits can be browsed by appending the commit hash to
9   https://git.sdaoden.eu/cgit/s-nail.git/commit/?id=
11 The complete changelog of commits in between two versions can be
12 inspected by using the git(1) `log' command as shown below, where "OLD"
13 and "NEW" are the two versions to be compared.
15   # All commits:
16   $ git log --reverse --topo-order --abbrev-commit OLD..NEW
17   # Only topic branch headers (--no-merges for content commits only):
18   $ git log --oneline --reverse --topo-order --merges OLD..NEW
19   # Same, but truly accessible:
20   $ git log --oneline --reverse --topo-order --merges --parents OLD..NEW |
21     while read c1 c2 c3 c4 c5 c6; do
22       printf "%-24s: \$ git log --oneline --no-merges ${c1} ^${c2}\n" "${c6}";
23     done
25 v14.8.12 ("Bubas"), 2016-10-05  (v14.8.11 as of 2016-10-03 broken)
26 ------------------------------------------------------------------
28 A cumulated bugfix release.
29 It also brings in some corrections to no-brainers of the past.
31 Thanks to Antonio Radici, Stephen Isard and Predrag Punosevac.
32 We welcome Antonio Radici and Predrag Punosevac in THANKS.
34 Apologies to Stephen Isard, and John Dodson.
36   S-nail will become S-mailx after v14.9, and all project resources
37   will move to www.sdaoden.eu with v14.9; only the ML remains hosted
38   at Sourceforge.net as of this writing.
39   We thank Sourceforge.net for hosting this project so many years!
41 NOTES, ChangeLog (packager-affine)
42 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 - The repository layout has been changed / extended!
45   Please see README on interest.
47 git(1) shortlog (edited)
48 ^^^^^^^^^^^^^^^^^^^^^^^^
50   f01291d extract_date_from_from_(): dig more invalid MBOXes (Antonio Radici)..
51   98050a7 THANKS: Antonio Radici
53 freedesktop.org obfuscates MBOX From_ lines, and S-nail was much too
54 strict for quite some time.  This strict behaviour was introduced as
55 part of the fixes which finally allowed roundtripping messages in
56 between different mailbox types, but it didn't really work out.
58 In the future we only warn if we see invalid MBOX files, and will print
59 the invalid lines with *debug* or *verbose* set, but anyway accept what
60 we get.
62   096809e popen.c:_file_save(): FIX false cherry-pick [41250b1] for IMAP..
64 v14.8.10 couldn't do "copy * IMAP-SPEC" due to this.
66   788aad0 url_parse(): better take better care for path parts (Stephen Isard)..
67   fb32f8f IMAP: honour readonly via -R, not only via `File' (Stephen Isard)
69 Please see below.
71   bd6090d sendout.c: fix HAVE_DEBUG From_ quoting..
72   e716a9c Many: drop support for *mbox-rfc4155* - a no-brainer..
74 More on MBOX, as above.
76   603a3dd sendmp(), setfile(): FIX: ensure time_current is actualized
78 Oh!  Yes, there were actually two code paths which suffered a lot from
79 the "optimize date and time systemcalls" from years ago!  Now fixed. ._.
81   63e7ade is_head(): change compat argument to check_rfc4155..
83 More on MBOX, as above.
85   c5b40e4 okeys.h: regenerate (Apologies: Stephen Isard)
87 Sorry, Stephen!
89   3838ffd setptr(): tweak [63e7ade], log more invalid From_'s if verbose
91 More on MBOX, as above.
93   2eb6ca1 mime_types.c:_mt_by_filename(): basename() path (fix/tweak relative
94           paths)
95   b9599b0 make.rc, mk-conf.sh: WANT_DEVEL includes WANT_DEBUG, but not vice
96           versa
97   ec81a41 cmd_tab.h: allow history for `set', `setenv', `varshow'
99 Much better to see them in the `history'.
101   a715162 Add a RFC 6068 url_mailto_to_address() hack for List-Post:
103 We will now strip off any hfield additions after a "?", and we will
104 perform URL percent decoding before using the value given.
105 (Is only used for "automatic mailing-list detection".)
107   e774dfb imap.c: do not hard error out if FEDIT_SYSBOX|FEDIT_NEWMAIL
108   39a7571 FIX "," message specification (since [1c4b8c9], v14.8.4)..
110 Yes, you can say "f," again, and it should find the parent message.
112   171f111 FIX [44cec1f] (Fix "address" message specifications (John Dodson))..
114 Sorry, Mr. John Dodson of Australia.  They now really work as
115 standardized with our extensions, and there is nothing anyone can do
116 to prevent it.
118   256da01 *folder*: IMAP: add /INBOX when there is a trailing slash (Stephen
119           Isard)
120   2afd5c8 Previous, IMAP now for much better (Stephen Isard)
121   e5eb5fe Fix + expansion for IMAP, broken since [edb2dcd], 2013-06!!
122   ce40a87 imap.c: do not print update message on readonly boxes
123   52fcb7e Oops, restore proper *folder* behaviour for non-IMAP
124   111f80a FixFix IMAP "+" expansion and more (Predrag Punosevac)
126 More IMAP fixes.  Should really work now as good as never before.
128 v14.8.10 ("Anachalcos"), 2016-08-20
129 -----------------------------------
131 A cumulated bugfix release.
132 And because v14.9 still takes time.
134 Credits to trondd.
136 Apologies to Sergey and those members of the Roff community which would
137 like to see progress!
139   S-nail will become S-mailx after v14.9, and all project resources
140   will move to www.sdaoden.eu with v14.9; only the ML remains hosted
141   at Sourceforge.net as of this writing.
142   We thank Sourceforge.net for hosting this project so many years!
144 git(1) shortlog
145 ^^^^^^^^^^^^^^^
147 Yes, "quick and dirty" only for Anachalcos.
149   7f7bae1 Fix `z' (Tim)
151 Fixes page-wise movement if the argument is greater than 9.
153   43ad441 THANKS: update mail address of Tim (trondd)
154   8b85b96 Fix compiler warning of [7f7bae1] (Fix `z' (Tim))
155   6afff81 FIX possible intwrap caused delays (for mailboxes with size == 1)
156   530e81f FIX n_utf8_to_utf32() sequence length checks (since [558d8b8],
157           2015-03!)
158   78083c0 HTML filter: filter out some characters
159   407a705 Actively filter out U+00AD characters (Vincent Lefevre)..
160   e5591f2 THANKS: Vincent Lefevre
161   5c458cc FIX MBOX append (since ever (nail 11.16, 2004-11-18])!)..
163 This only fixes invalid non-empty MBOX mailboxes, so "FIX" is possibly
164 a bit overstated.
166   75982b9 bidi_info_needed(): no variation selectors etc. -- CText, where are
167           you!
168   e65db06 FIX n_verr(): cannot reuse va_list..
170 Only for error messages > ~2 KB, which we usually don't produce.
172   23e8697 Fix *quote-fold* (on GNU/Linux iswspace() does not return boolean!)
173   98cf903 FIX: really_rewind() for pre POSIX Issue 7
175 Hardly affects anyone, i had to look into old v5 FreeBSD: maybe.
177   41250b1 FIX: no O_APPEND for .bz2/.xz/*file-hook-load*!  Use lseek(2)!!..
179 This is the reason for this release, and applies to all C libraries
180 which optimize fseek(3) and do not adjust the file descriptor via
181 lseek(2) if the resulting offset is in the I/O buffer.
182 It seems to enable me to say
184     set file-hook-load-xz_pgp='gpg -d | xz -dc' \
185           file-hook-save-xz_pgp='xz -zc | gpg -e'
187 on a GNU/Linux system without ending up with corrupted boxes,
188 i.e., a complaining gpg(1) that says that says so.
190   224d858 popen.c:_file_save(): adjust partial [41250b1] cherry-pick
191   87c902a sendmp(): fix possible false insertion of colour reset seq.
193 v14.8.9 ("Dung Beetle"), 2016-06-21
194 -----------------------------------
196 A cumulated bugfix release.
198 Credits Ralph Corderoy.
199 Apologies, Dirk-Wilhelm Peters.
201   S-nail will become S-mailx after v14.9, and all project resources
202   will move to www.sdaoden.eu with v14.9; only the ML remains hosted
203   at Sourceforge.net as of this writing.
204   We thank Sourceforge.net for hosting this project so many years!
206 ChangeLog
207 ^^^^^^^^^
209 - *signature* and tail injections now work correctly even in combination
210   with -t. [d4237ac]  (Dirk-Wilhelm Peters)
212 - Fix faulty (by-one) buffer overflow calculation in the NCL line editor
213   that could sometimes be seen when using ^W for backward deleting
214   a word when using this at a freshly created rightmost columns.
215   Bug was introduced in [d33bd89] (tty.c, NCL: reduce realloc counts,
216   2013-08-23).  (Ralph Corderoy)
218 git(1) shortlog
219 ^^^^^^^^^^^^^^^
221 b0b974e mk-conf.sh: disable -b for tcc(1) [mob]
222 a415c58 makefile:_update-release: symlinks do not work with lighttpd, use hard
223         ones
224 2fefb1f collect(): fit ~? output in 25 lines (fixes [5dea8a4,4e61d5c] ;)
225 7c7c888 mime.types: oops, fix x-xz tbz->txz extension!
226 c40c206 collect(): hint for `~.' if *ignoreeof* is set, not ".": needs *dot*
227 d4237ac Fix *signature* / tail injection in conjunction with -t..
228 ef6a9c2 mk-conf.sh: pcc(1) as of CVS works without stack protectors!
229 d5cec10 FIX HTML filter: swallow lone ampersands in parameters (SIGH!)..
230 08eb902 FIX: avoid duplicate output for HTML filter..
231 524adf4 makeprint(): filter some iswprint()==true, but which really aren't..
232 552b2b8 `set': fix quoting when printing all variables
233 aa8df72 mk-conf.sh: fix DEVEL<->DEBUG interdependency; terminate printf(1)
234         args
235 f84b0cd mk-conf.sh: check for the needed environ(3)
236 b5af710 mk-conf.sh: fix [f84b0cd]: NULL needs stdio.h
237 fdcbf59 Again "improve" ~? listing
238 ba29651 FIX: cntrlchar() was broken since [4e49924] from 2012-10-15!!
239 08ab13f tty.c, NCL fix possible off-by-one (Ralph Corderoy)
240 815e99f makefile:_update-release: rm TODO in [timeline] _shipout release_ ball
242 v14.8.8 ("The Vulture 38"), 2016-03-26 (v14.8.7 as of 2016-03-25 broken)
243 ------------------------------------------------------------------------
245 A cumulated bugfix release.
247 Credits Gaetan Bisson, Sergey Matveev, Dirk-Wilhelm Peters, Allan McRae
248 and Ralph Corderoy.
249 All the mentioned persons deserve special thanks indeed.
251 We welcome Sergey Matveev, Allan McRae and Ralph Corderoy in THANKS.
253   S-nail will become S-mailx after v14.9, and all project resources
254   will move to www.sdaoden.eu with v14.9; only the ML remains hosted
255   at Sourceforge.net as of this writing.
256   We thank Sourceforge.net for hosting this project so many years!
258 NOTES, ChangeLog (packager-affine)
259 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
261 - Thanks to Sergey Matveev the Maildir code is now compatible to *BSD.
262   Interested persons may read the commit log. [0c30b14] (Sergey Matveev)
264 - The (much to restricted) test target should now work if $SHELL is set
265   to something "nologin". [7876f3a]  (Gaetan Bisson)
267 - If *sendmail-no-default-arguments* is set we will NOT (!) terminate
268   MTA options with "--", assuming the user does.  This allows, e.g.,
269   very sick things like (ouch) [8b0bdbe]
271     set sendmail="/bin/ssh" \
272       sendmail-arguments="steffen@sdaoden.eu /usr/sbin/sendmail -t" \
273       sendmail-no-default-arguments \
274       sendmail-progname="ssh"
276 ChangeLog
277 ^^^^^^^^^
279 - The primitive builtin HTML filter should now correctly parse HTML
280   parameters.  It seems to become necessary ;) [e227a78,65df701]
282 - *signature* will now undergo MIME encoding. [fe209f7]
283   (Dirk-Wilhelm Peters)
285 - Operating systems without getaddrinfo(3) but only with gethostname(3)
286   should be able to resolve DNS (port numbers) correctly again.
287   [7dd3a71]  (Allan McRae)
289 - The builtin NCL no longer counts gabby history limits against the
290   given maximum persistent history size unless gabbiness is desired.
291   [76780e4,f06ccb6]
293 - The builtin NCL couldn't paste more than one line since October 2015.
294   [ff5d914]  (Ralph Corderoy)
296 ChangeLog (purely technical)
297 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
299 - WANT_READLINE environments should possibly have a better experience
300   hen interactively editing the attachment list. [ede2800]
301   (In general interactive situation has to improve a lot.)
303 - Fix a bit of weird buffer handling. [536d3a7,0f2cc31,e9a5c22]
304   (Ralph Corderoy)
306 - Fix the fixed buffer handling which broke v14.8.7. [3e4831a]
307   (Gaetan Bisson)
309 v14.8.6 ("Hen Harrier II"), 2015-12-28
310 --------------------------------------
312 A cumulated bugfix release.
314 Credits Hilko Bengen, Salvatore Bonaccorso, Martin Sebor,
315 Aharon Robbins and Philip Guenther.
317 We welcome all credited persons in THANKS.
319 NOTES, ChangeLog (packager-affine)
320 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
322 - WANT_AMALGAMATION dependency tracking has been fixed.
323   [0ed139d,8c126a9]
325 - "INSTALL": clarification: "make" OR "make install", NOT "[make &&]
326   make install".  More to come in v14.9.  Also INSTALL now says that the
327   default configuration includes all non-experimental features, whereas
328   the otherwise identical CONFIG=MAXIMAL does include them.
329   (Hilko Bengen)
331 - SENDMAIL will now fallback to /usr/sbin/sendmail if we don't find any
332   executable sendmail(1).  We had some similar issue on ArchLinux, but
333   i failed to deal with the no-sendmail-available case.  sendmail(1) is
334   expected in /usr/sbin on *BSD and according to Debian Policy 11.6.
335   [0e09d5e]  (Salvatore Bonaccorso)
337 - SYSCONFRC no longer includes SYSCONFDIR.  I.e., S-nail now does
338     load(SYSCONFDIR "/" SYSCONFRC);
339   instead of
340     load(SYSCONFRC);
341   It seems only CRUX-Linux is affected, and i've sent a patch. [807f64e]
343 - We now support the TinyCCompiler. [topic/tcc]
345 - And -- ouch! -- fix S-nail on Solaris, again.  It was broken since
346   [3e863c6] (2015-06-23) since necessary linker flags had been
347   overwritten. [fd40d5a,6fe5448]
348   (We also deal with NAME_MAX being the minimum possible now, see below.)
350 ChangeLog
351 ^^^^^^^^^
353 - When `Lreply'ing to multiple messages and using the `~:' tilde command
354   the argument list of the `Lreply' itself would have been overwritten,
355   resulting in crashs. [9f5c403 (+ 1162af5,5f08362)]
357 - Temporarily forbid `mbox' but in a system mailbox.  I hope v14.9 can
358   perform the action gracefully. [781ee34]
360 - On systems with "unsigned char" "char"s S-nail was broken for about
361   two and a half year since an E(nd)O(f)F(ile) condition would never
362   have been satisfied, resulting endless loops.  Detected by the Debian
363   package build bot who hung endlessly when running "$ make test".
364   [f43e04e]
366 - Fixes to false signal handler restoration, partially false forever.
367   [0948199,364bc48]
369 - Fix crashes in the error path of Zopen().  If a de-/compressor fails
370   Heirloom mailx would crash, and S-nail would have crashed in the debug
371   path and print "Alert: Invalid file pointer" in optimized code.  Since
372   S-nail allows *file-hook-{load,save}-EXTENSION* the situation is much
373   worse, however. [8e7f0f4]
375 - Don't crash in `varedit' when $EDITOR doesn't start up. [5a5350b]
377 - The build system now sorts source files in order to honour
378   <https://reproducible-builds.org/>. [a939517]
380 - The build script has seen improvements.  The (mysterious) hangs in VMs
381   are gone now that i have switched configuration evaluation to awk(1)
382   thanks to a suggestion by Aharon Robbins.  In fact doing "$ make
383   CC=tcc devel" now takes the same time all-in-all that the mentioned
384   evalution took alone. [fa2e248]  (Aharon Robbins)
386   This is true even if we know do a lot more of run tests instead of
387   plain link tests for native environment detection since the GNU
388   C library monster uses empty ENOSYS stubs for system calls it doesn't
389   provide.  This is the reason why the Debian kFreeBSD S-nail package
390   doesn't work out by now.  We are not aware of booting different
391   kernels with different feature sets than what we detected upon compile
392   time, though.  I don't think we ever will. [3ee2d4c]
394 ChangeLog (purely technical)
395 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
397 - Dotlock file locking now ignores lock file creation failures on
398   readonly filesystems.  Since the mailbox will be degraded to read-only
399   no dotlock file is needed. [40785bc]
401   And that really hurts: [3517800]!  On Solaris NAME_MAX is set to the
402   minimum that POSIX allows (14), and we were not really prepared for
403   that.  I.e., the lock for /var/mail/sdaoden would be
404   /var/mail/sdaoden.lock, we require at least one more byte for safe
405   lock file creation and yet included the terminating NUL in the
406   calculation, and whoops, dotlocking failed because of ENAMETOOLONG!
407   So do use pathconf(2) _exclusively_ if that succeeds to give an
408   answer.  And we still have room for improvements that i as a C++
409   programmer with speedy dynamic Str objects would never thought i have
410   to deal with.
412 - Fix pathconf(2) usage. [31ce3e1]  (Not wrong: Martin Sebor)
414 - First step to use the new *at() series of system-calls if available,
415   inspired by (Philip Guenther). [topic/time]
417 v14.8.5 ("Hen Harrier"), 2015-09-05
418 -----------------------------------
420 Credits John Dodson, Claudio Cappelli.
422 We welcome Claudio Cappelli in THANKS.
424 NOTES, ChangeLog (packager-affine)
425 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
427 - I've forgotten to add obsoletion warning messages in v14.8.4, so
428   running with enabled -d/*debug* -vv/2x*verbose* may be useful.
429   Sorry! [b3e34db]
431 - A series of bug FIXes (which caused the "Hen Harrier" in the end):
433   . v14.8.4 bug: macro content will be added to the history. [28672e5]
435   . Fallout of massive not-yet-dead style and control flow change series
436     in February 2014, I.: the close-on-exec bit of temporary file
437     descriptors wasn't set. [8f58404]
439   . Fallout of massive not-yet-dead style and control flow change series
440     in February 2014, II.: temporary files were always created in the
441     current directory.  Aloha, heh. [edc12c8]
443   . v14.8.4 bug: when `resend'ing messages a crash would happen when
444     generating the Message-Id: (control flow messed up when hastily
445     implementing extended -t parsing). [9e63ae6]
446     (Hello, Bob Tennent: i finally have added at least a simple `resend'
447     test.  Don't your worry.)
449   . v14.8.4 bug: plugged a file descriptor leak in the dotlock code (one
450     side of the control pipe was leaked upon success; there you see how
451     large ulimit(3) limits are by default today). [ed5c8cf]
453 - When using -t and a template message recipients given on the command
454   line will now be joined into the message instead of being discarded.
455   [9eb4cbf]
457 ChangeLog
458 ^^^^^^^^^
460 - The `set' command will now mark out assembled variables if *debug* or
461   2x*verbose* is set. [2b6e64a]
463 - Added *smime-cipher* @433 option (i.e., generic variant of
464   *smime-cipher-USER@HOST*). [58804ea]
466 - Messages will now _only_ be saved in *DEAD* if *save* is set (POSIX).
467   [3fefac9]
469 - The (pretty useless for now) `pipe' command will now also print the
470   overall message info (it printed MIME part infos already). [e0a8196]
472 - NAIL_FILENAME_GENERATED is now nothing but a random string. [36097df]
474 - *debug* now implies no*record* and no*save*. [ca9f512]
476 - After almost three years i've finally heard what John Dodson said and
477   changed/restored behaviour of plain "address" message specifications
478   to reflect the original intent (and a bit POSIX) so we now have
479     A case-insensitive “any substring matches” search against the
480     ‘From:’ header, which will match addresses (too) even if
481     showname[339] is set [things are different if *allnet* is set]
482   [44cec1f]  (John Dodson)
484 - ..and therefore we need the possibility to somehow perform "exact
485   boundary" matches: for this i've extended the "@" message
486   specification with a header-name "~" prefix and header abbreviations:
487     ‘f’, ‘t’, ‘c’, ‘b’ and ‘s’ will match ‘From’, ‘To’, ‘Cc’, ‘Bcc’ and
488     ‘Subject’, respectively and case-insensitively.
489   And:
490     This message specification performs full text comparison, but even
491     with regular expression support it is almost impossible to write a
492     search expression that savely matches only a specific address
493     domain.  To request that the content of the header is treated as a
494     list of addresses, and to strip those down to the plain email
495     address which the search expression is to be matched against, pre‐
496     fix the header name (abbreviation) with a tilde ‘~’:
497       '@~f@@a\.safe\.domain\.match$'
498   [50c2816]
500 - New option: *sendmail-no-default-arguments* @426 [d983036]
501   (Claudio Cappelli)
503 - Do no longer make a difference in "no mail for user" and "missing
504   system mailbox".  The latter caused yet an annoying error message even
505   with *emptystart*. [7abff87]
507 - New command `source_if' @187 is like `source' but don't fails if the
508   file cannot be loaded.  That is to say, we do not yet support
509   "-f FILE@ tests nor `test -f FILE` shell commands for `if', sigh.
510   [893bd5f]
512 ChangeLog (purely technical)
513 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
515 - Unless Gunnar Ritter is directly affected the fourth clause of the BSD
516   copyright has been dropped, as has been done for NetBSD Mail.
517   [b9ea247]
519 - Quoted-printable encoding will avoid printing a soft newline if only
520   a single character is about to follow. [6b31542]
522 - The configuration script now shows what it is doing at the beginning,
523   to overcome those hangs that can be seen especially in VMs. [4c29cea]
525 - The configuration will do an automatic "make clean" when the
526   configuration had been updated. [9706734]
528 - We no longer generate a MIME message unless that is necessary.  I.e.,
529   a plain 7-bit (US-ASCII) message without attachments send from
530   a system daemon is a plain RFC 822/2822/5322 message and doesn't
531   require any MIME header. [824257a]
533 - To avoid that DNS resolver becomes unusable due to ^C interruption.
534   Also fixes a possible leak in non-getaddrinfo(3) codepath (old boxes).
535   [767897a]
537 v14.8.4 ("Nameless bird (shot by Hemingway)", 2015-08-04
538 --------------------------------------------------------
540 Thanks for Jérémie Courrèges-Anglas for beating me to it.
542 NOTES, ChangeLog (packager-affine)
543 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
545 - Added support for the (BSD-licensed) idnkit[1] IDNA library which is
546   now in the base system of DragonFly BSD.  We still only support
547   encoding, though.  (And assume the hostname is in locale encoding.)
548   [cbded82,22ac479]
550     [1] <https://www.nic.ad.jp/ja/idn/idnkit/download/>
552 - I have rewritten the privilege-separated dotlock helper program,
553   because among others a SETGID one is of no use in todays world.
554   So it is now SETUID to the new PRIVSEP_USER.
556   . WANT_PRIVSEP and PRIVSEP_GROUP have been dropped.
558   . New option: WANT_DOTLOCK, by default enabled.
559     It is henceforth possible to strip any dotlock code off S-nail.
560     So either S-nail has complete dotlock support, including the
561     privilege-separated dotlock helper, or none at all.
563   . New variable: PRIVSEP_USER, by default "root".
564     It must be a privileged user that can be used to implement the new
565     strategy: we create the dotlock file and then fchown(2) it to the
566     UID and GID of the mailbox that we created it for.  Like this the
567     owner of the mailbox (remember %USER, $USER, -u USER ..) will be
568     capable to remove the lock file herself.  Or himself.
570   . No dotlocking was performed for reading, only for writing.  I've
571     changed this.  We also didn't perform any (file) locking at all when
572     updating non system-mailboxes, which i have changed, too.
574   . Fixed horrific bug: on systems without realpath(3), e.g., Solaris 9,
575     S-nail would not resolve symbolic links on the mailbox to lock,
576     potentially creating the lock file in the wrong directory.
578   . We now compare the inode/device/etc. of the mailbox file with the
579     information we collected a lot earlier from the open mailbox file
580     descriptor, and bail if they are not identical, to reduce attach
581     surface.
583   . The privsep helper now re-checks that it is capable to read (or
584     read/write) the mailbox it is creating a dotlock for, to reduce the
585     chance of being misused (by itself).  I.e., it does so before
586     raising its privileges, say.
588   [d5ec3cb,b29e2c8]
590 - The predefined CONFIG=urations have been changed a bit and now
591   "require" more options than they did before.
593 - Renamed WANT_ALL_SSL_ALGORITHMS to WANT_SSL_ALL_ALGORITHMS.
594   That was a no-brainer, default of "yes" remains, but it now can also
595   be "require"d. [910849e]
597 - The GitLab project repository URL has been changed and now is
598   <https://gitlab.com/sdaoden/s-nail.git> (leave off ".git" for browsing
599   purposes).
601 ChangeLog
602 ^^^^^^^^^
604 - It has become possible to fixate the input character set of
605   attachments from the command line (without going over ~@):
606   when the -a @39 option cannot access(2) the file to be attached it
607   searches the filename for an equals-sign "=" and splits into filename
608   and character set shall it find one.  A character set defined like
609   this is "fixated" and therefore no character set conversion occurs.
611     $ echo body |
612     ./s-nail -d -s subject du@auch \
613       -aversion.h -aversion.h=KoI8-r -aversion.h=LaTin1 -aversion.h
615   >>> Content-Type: text/x-chdr; charset=US-ASCII
616   >>> Content-Type: text/x-chdr; charset=KoI8-r
617   >>> Content-Type: text/x-chdr; charset=LaTin1
618   >>> Content-Type: text/x-chdr; charset=US-ASCII
620   [1f07d9e,804e561]
622 - In *debug* mode the content of the message that would have been sent
623   is printed on standard error not only in *smtp*, but also MTA mode.
624   E.g., as in the example above. [c106f35]
626 - S/MIME oops: S-nail yet didn't test for the "application/pkcs7-mime"
627   MIME type at all, but only for "/x-pkcs7-mime" (pre-standardized
628   variant), so that S/MIME messages generated by more modern MUAs (e.g.
629   Alpine) wouldn't have been understood!
630   And we do now use that MIME type ourself, as standardized by RFC
631   5751.  However, we are still stupid and don't handle a signed message
632   inside a multipart/mixed message, neither do we support fully
633   encrypted messages (nothing but rfc822 member) etc. [10c2b16]
635 - *smime-cipher-USER@HOST* @431 values changed to versions without
636   hyphen, as that is what OpenSSL uses: e.g., AES256 not AES-256; the
637   latter versions are no longer documented and will be dropped with
638   v15.0. [f2c6eec]
640 - New variable *smime-sign-message-digest* [-USER@HOST] @437 can be used
641   to define the message digest for S/MIME signing.  RFC 5751 mandates
642   a default of SHA1, by default available are also SHA256, SHA512,
643   SHA384 and SHA224, MD5 may be available, dependent on OpenSSL.
644   With WANT_SSL_ALL_ALGORITHMS more digests may be available. [2f6dac3]
646 - Using NAIL_FILENAME_GENERATED was prevented since some time since it
647   ended up longer than NAME_MAX (ENAMETOOLONG). [3bcbbfc,f632b5b]
649 - Heavily rewritten manual section "Signed and encrypted messages with
650   S/MIME" @35, giving a ready-to-go example for CAcert.org.
652 - Nicer output for `help' @126 / `?' @74 when given an argument:
653   if that is a command ghost we search for the expansion and do print
654   the (further expansion and) help for that if possible [cea8c20]:
656     ?0[]? ?save
657     save: Append <message-list> to <file>
658     ?0[]? ?s
659     s (save): Append <message-list> to <file>
660     ?0[]? gh s s
661     ?0[]? ?s
662     s -> s (save): Append <message-list> to <file>
664 - No longer allowing recursive commands in macros to avoid that the
665   following can crash us (check can be bypassed):
667       ? define ouch {
668         echo ouch
669         reply 2
670       }
671       ? reply
672       ~:call ouch
674   This is a pity because "? call ouch" does no longer cause a reply,
675   but the real healing will take time.
676   Also the `source' command is now actively disabled during macro
677   evaluation -- this only works(/ed) by accidence and anyway non-
678   synchronously (the `source'd file will be loaded after the macro
679   evaluation has finished).  The real healing for this is heavy stuff
680   and will remove a smart and fantastic idea from before 1979, but it
681   won't work out with macro support (see commit message for more upon
682   interest). [5461a30]
684 - And `source' will be actively forbidden in compose mode, too.  It
685   never worked the way it should. [abd388c]
687 - Did -t @60 ever work for real?  Now it does.
688   Even better it now "supports" some more header fields (References:,
689   In-Reply-To:, Message-ID:, and Mail-Followup-To:, but the latter will
690   be subject of a nice followup content massage) -- S-nail can
691   henceforth be used for git(1)s send-email command.
692   We also improved the interdependency of -t (with[out] From:, Sender:),
693   -r, *from* and *sender*, but i don't say it is perfect yet.
694   [6842f12,631d402,a86ca2d]
696 - Completely reworked *expandaddr* @373 handling, and you can now define
697   *exactly* what you want, e.g., "fail,-all,+addr,+file" will only allow
698   mail address or file recipients and hard error out otherwise.
699   Note that in order to make that work "restrict" has been changed to be
700   effectively "restrict,-all,+name,+addr", which matters in, e.g.,
701   "fail,-all,+file,restrict" which therefore truly is "restrict,fail"!
703   Even in conjunction with -t you should now see proper (-d / *debug*,
704   -v / *verbose*) messages for *expandaddr* caused address stripping,
705   or, with "fail", hard errors. [8668be3]
707 ChangeLog (purely technical)
708 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
710 - We again allow Message-Id:s to start with a leading slash, as in
711   "/p/forge/site-support/10.../...". [143372a]
713 - We now support multiline values in make.rc: to do so, escape the
714   newlines with a backslash "\", e.g. [621cbed,9cf4e7b]
716     MAILSPOOL=`\
717        if [ -d /var/spool/mail ]; then \
718           echo /var/spool/mail;\
719        else \
720           echo /var/mail;\
721        fi`
723 - Lowered the memory pressure caused by malicious spam messages that
724   place hundreds of references into the References: header body.
725   And we don't use alloca(3) no more for such things, in order to lower
726   stack usage. [1c4b8c9,47a1a5c]
728 v14.8.3 ("Startled chicken"), 2015-07-05
729 ----------------------------------------
731 Credits go to Martin Neitzel!
733 NOTES, ChangeLog (packager-affine)
734 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
736 - Prefilling INCS and LIBS is finally honoured by the build system, just
737   as documented. [9a34822]
739 - In place of "packager-install" "doinstall" will also do.
741 - New `make.rc' option: WANT_ERRORS, by default enabled.
742   Will enable the new command `errors' @105 (#_105) and an error message
743   queue ring: error messages will no longer get lost but duplicated into
744   the queue, to be displayed in interactive mode via `errors'.  This is
745   a finite ring which rotates oldest messages if it full.
746   [topic/errors]
748 - S-nail no longer offers hooks for group identity switching: it no
749   longer makes sense to install it SETGID to a mail group (shall anyone
750   has done so). [ac42d24]
752 - New `make.rc' option: WANT_PRIVSEP, by default enabled.
753   The dotlock'ing has been completely rewritten (see `make.rc' for
754   a longer explanation of traditional Unix mailspool locking, please).
756   In order to be able to create lock files in *any* SETGID mailspool
757   directory in which user system mailboxes may reside S-nail now ships
758   with a privilege-separated mini dotlock program (source in
759   `privsep.c'), which will be installed in the new also LIBEXECDIR (as
760   YOUR_MUA_NAME-privsep) SETGID to the group given by the also new
761   PRIVSEP_GROUP (default "mail").
763   This dotlock program will be used whenever a mailbox has to be
764   dotlocked which is owned by group that is not the group of the user
765   who is running S-nail, assuming that the file in question resides in
766   a SETGID mailspool directory.
768   The new variable *dotlock-ignore-error* @294 (#_294) now controls
769   wether it is a failure if creation of a dotlock file is not possible.
770   This variable is by default enabled if WANT_PRIVSEP is false.
771   [topic/dotlock]
773 ChangeLog
774 ^^^^^^^^^
776 - Fix file locking, which was broken since v14.8. [7f8ebc0]
777   (Martin Neitzel)
779 - -e now works with given boxes; -e is mutual exclusive with -H and -L;
780   and then any of -e, -H and -L causes the mailbox opened in readonly
781   mode. [3bb05a2, 2cf15c1]
783 - In *debug* mode no process will be started for a set *smtp*, but
784   instead the message will be directly generated (on the error channel).
785   Also GSS-API authentication will no longer be performed even with
786   enabled debug, oops. [3333d71]
788 ChangeLog (purely technical)
789 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
791 - A readonly IMAP box is opened via EXAMINE not SELECT. [2d5259c]
793 - snprintf(3) and vsnprintf(3) are now required preconditions. [c58c7e9]
795 v14.8.2 ("Wandering albatross"), 2015-06-17
796 -------------------------------------------
798 Many thanks Bob Tennent, for reporting and testing!
800 NOTES, ChangeLog (packager-affine)
801 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
803 - Configuration will now find clock_gettime(2) in -lrt and
804   gettimeofday(2) as such on Linux. [47c9ea7,5e248d2,df7d77f]
805   (Bob Tennent)
807 - MANDIR now defaults to ${PREFIX}/share/man (not ${PREFIX}/man)
808   [6371740]
810 ChangeLog
811 ^^^^^^^^^
813 -  Added missing condition clause in `if' expression parsing
814    [74c7cac,5da6d4d]:
816     ?0[ +mbox]? if $du @@ hey
817     ?0[ +mbox]? endif
818     -->
819     ?0[ +mbox]? if $du @@ hey
820     `if' conditional: unrecognized condition -- near "du"
821        Expression: $du @@ hey
822        Left to parse: $du @@ hey
823     ?1[ +mbox]? endif
825 - Ooops, fix pipe-TYPE/SUBTYPE @403 with value "@" (a.k.a. treat as
826   plain text and display "as is"): i've broken that once i've introduced
827   the extended type markers for the `mimetype' command.  Must have been
828   a Freudian error, sorry! [ea655de]
830 - Fix a bug introduced in nail 9.29, 2001-12-10: a temporary buffer is
831   closed with fclose() even though it is a registered file that instead
832   needs to be closed via Fclose().  This effectively results in
833   a double-fclose(3) of the underlaying file descriptor once the
834   registered files are cleaned up next, which happens either after
835   signal interruption and, since [65e0510] as of 2015-05-21, whenever
836   the command loop ticks. [97fcb97]  (Bob Tennent)
838 v14.8.1 ("Tristan albatross"), 2015-06-11
839 -----------------------------------------
841 Kudos!
842 Ypnose, Tarqi Kazan, Dagobert Michelsen and OpenCSW.org, Gianluca
843 Ramunno, Bob Tennent.
845 We welcome Dagobert Michelsen in THANKS.
847 NOTES, ChangeLog (packager-affine)
848 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
850 $ In all the following noticable changes to the release candidate are
851 $ marked with a $ in the first column
853 - We have been ported to Sun Solaris!
854   Thanks to Dagobert Michelsen for giving me an account on OpenCSW.org!
856 - The build system will now really find strip(1). [54e91c4]
858 - WANT_TERMCAP fix: we simply passed tputs(3) a pointer to putchar(3)
859   though that may be a macro etc. [cc65bc3]
861 - The following variables can be used to overwrite utilities needed
862   during configuration and build:
864     MAKE=, STRIP=, awk=, cat=, chmod=, cp=, cmp=, cksum=, grep=, mkdir=,
865     mv=, tee=, rm=, sed=, tr=
867   Note that rm(1), sed(1) and tr(1) are needed before `make.rc' is read.
868   Fix: these will now also affect "make test".
870 - WANT_AUTOCC now no longer sets compiler flags as of experience, but
871   compiles a test program to actually detect wether the compiler will
872   swallow the flag.  This increases configuration time quite a bit.
873   Users who really did use "make devel" possibly want to use "make
874   CONFIG=DEVEL" followed by "make build" now.
875   Note we now also test for -fPIE as well as relro,now,noexecstack.
877 - WANT_SPAM_SPAMD is now decoupled from WANT_SOCKETS. [d247d86]
879 - The configuration now also detects any changes on PATH, C_INCLUDE_PATH
880   and LD_LIBRARY. [1038028]
882 ChangeLog
883 ^^^^^^^^^
885 - Fixed importing of SHELL/LISTER/PAGER variables from the program
886   environment. [940c7f1]  (Ypnose)
888 - Moved -X @64 command line option handling before attachment
889   evaluation, so that, e.g., `mimetype's registered via it will already
890   be seen when classifying attachments. [5d9742f]
892 - Honour *asksign* @274 again, even if *askatend* @270 or *bsdcompat* @281
893   are not set.  This also changes *askattach* @271 as we'll only ask for
894   addition of attachments if there are none yet. [e054d6a]  (Tarqi Kazan)
896 - Support OpenSSL 1.1.0 and above: it obsoletes the more-than-a-decade
897   old SSLv23_client_method() in favour of a new TLS_client_method()
898   (instead of using some "magical" constant like, say, "SSL_METHOD_ANY",
899   but who am i). [c35b567]
901 - Generic file (mailbox) load and save hooks have been introduced:
902   *file-hook-(load|save)-EXTENSION* @374,@375, e.g.:
904     set file-hook-load-xy='echo >&2 XY-LOAD; gzip -cd' \
905         file-hook-save-xy='echo >&2 XY-SAVE; gzip -c' \
906         record=+null-sent.xy
908   One could think about using all-encrypted mailboxes, or the like.
909   Note that before v15.0 these variables may not be changed while
910   a mailbox handled by these hooks is open. [b4c2c37]  (Tarqi Kazan)
912 - When DNS resolving fails we now print error messages.
913   And then, if it fails because of an unknown service (protocol), we
914   check for the protocol and retry shall we have a well-known port
915   number builtin (smtp, submission, smtps, pop3, pop3s, imap, imaps).
916   [5f52370, (3f189f9)]  It is not wrong to credit (Gianluca Ramunno)
918 - One may now force treatment of addresses as files with the new "./"
919   or "/" prefixes -- until now it wasn't possible to address files if
920   the addressee includes an at sign, now "./me@here.com" will do, just
921   as will "/me@here.com". [2cf5890,0da473f]  (Bob Tennent)
923 - Fix *record-resent* @329, which never made it to *record* @414 since
924   [a11935b], but instead save the message in a file named after the
925   addressee! [a82af9f]  (Bob Tennent)
927 - Fixed signal handler uninstallation in sopen() (DNS lookup and socket
928   creation): v14.8.0 could be forced in endless loop after failed DNS
929   lookups due to this. [3cca23b]
931 - Fixed possible double-free (causing a crash) after failed SSL
932   certificate verification (*ssl-verify*=strict etc.) with OpenSSL
933   versions that support SSL_CONF_CTX (1.0.2+). [c691726]
935 - Assorted changes:
937   . The builtin HTML filter will now silently discard carriage-return
938     characters (looks better in e.g. less(1)). [cf4d800]
939   . When reopening the same box we now recognize if changes had been
940     written, forcing a reread of the box in order to display the actual
941     real content. [7dfbd38,0835212,a15dfed]
942   . `netrc' output changed, so that the output could (in theory) be fed
943     back into S-nail again in order to gain the same settings. [a9a2722]
944   . *pop3-keepalive* @410 gained (@USER)?-HOST forms [69cae68]
945   . *imap-keepalive* @387 gained (@USER)?-HOST forms [9a8c929]
946   . Do not use the builtin random generator if we find a suitable one in
947     the host environment. [0e01aeb,6bcb430,fc846c6]  (Bob Tennent)
948   . The builtin HTML filter will now also expand entities in parameter
949     names. [8d16dc0]
950 $ . *crt* will now only be checked when attached to a terminal device;
951 $   and no*crt* will now be honoured. [2508c32]
953 ChangeLog (purely technical)
954 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
956 - Solaris port resulted in a lot of changesets for the build system.
957 - I didn't use git(1) rebasing and the [crawl] branch but only [master].
958   And see where that ended: S-nail would have 10000 fossil commits!
959 - Plugged some memory leaks.
961 v14.8.0 ("Albatros"), 2015-04-30
962 --------------------------------
964 Puuuh!
965 I'm glad and happy to announce "Albatros" after about seven months of
966 development.  Development that brought many new features, bugfixes,
967 technical overhauling and behaviour tweaking.  Shall you ever have been
968 interested in BSD Mail or its deriviatives you might want to give it
969 a try.
971 "Albatros" is indeed the first version of the codebase as such that
972 should allow IMAP->Maildir->MBOX->Maildir->IMAP message roundtripping
973 without causing possible message splitting due to faulty From_
974 detection / encoding.  It also generates compliant MIME parameters.
976 Note there are incompatible changes, documented below.  And it is also
977 advisable to try out existing configurations with enabled *debug* and/or
978 *verbose* (-d, -vv) in order to check for "obsoletion" warnings.
979 (Here "obsolete" would refer to v15, of course.)
981 Credits and Thanks go to Ypnose, Jérémie Courrèges-Anglas, Josef Jurek,
982 Gavin Troy, Rich Salz, Martin Brandenburg, Bob Tennent, Dominic Meskys
983 and Peter Bray.
985 We welcome Jérémie Courrèges-Anglas, Josef Jurek, Rich Salz,
986 Dominic Meskys, Peter Bray, Dirk-Wilhelm Peters and Martin Brandenburg
987 in THANKS.
988 Apologies to Dirk-Wilhelm Peters and Martin Brandenburg whom i had
989 forgotten to add to THANKS at first glance once i've added this file; it
990 was nothing but an oversight.
992 I also say «Thank you» to GitLab.com – i've mirrored the S-nail git(1)
993 repository (alongside others) to this free service.
995 Credits finally also have to go to Coverity.com [1] which helped to find
996 some bugs; the claim of a 0.00 defect density after a Friday 13th test
997 must have been an error from their side, though, as well as that the
998 page [1] still remains at a test with a defect density of 0.01, since
999 i've posted yet another run that must have ended with 0.00.  (Note the
1000 codebase was tested without IMAP code, i.e. my _next_ developer branch.)
1002   [1] https://scan.coverity.com/projects/444
1004 NOTES, ChangeLog (packager-affine)
1005 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1007 $ In all the following noticable changes to the release candidate are
1008 $ marked with a $ in the first column
1010 + Crawling along the path of CVE [topic/cve-2014-7844.2]: to enable MTA
1011   arguments after -- the new *expandargv* @372 must be set.  More below.
1013 + Even more crawling along the path of the CVE i decided to replace the
1014   wordexp(3) based shell word expansion mechanism with an entirely new,
1015   internally implemented restricted one, but complete mitigation will
1016   take time.  This has consequences in respect to backslash escaping in
1017   file names (shall you ever have used such a filename with S-nail and
1018   its predecessors, of course, and only ...).
1019   Please see [topic/fexpand.2] below.
1021 + A new member for the *attrlist* @351 variable (for unsure spam status).
1022   Since a user setting with a false length will be ignored yet causes an
1023   error message this is a backward incompatible change. [topic/spam.2]
1025 - New make.rc option: WANT_ALL_SSL_ALGORITHMS (enabled).
1026   See make.rc and *smime-cipher-USER@host* @427 below. [topic/ssl.1]
1028 - The make.rc option WANT_IPV6 is gone; we use the respective standard
1029   library facilities automatically whenever possible. [999e79a]
1031 - New make.rc option: WANT_TERMCAP (disabled).
1032   See *term-ca-mode* @345 below.  [topic/termcap]
1034 - The make.rc option WANT_SPAM has been dropped.  Instead we have (see
1035   [topic/spam.2] below for more):
1037   . WANT_SPAM_SPAMC (default off):
1038     Rather identical to the former WANT_SPAM (interaction with spamc(1)
1039     from spamassassin(1)), but internally improved.
1040   . WANT_SPAM_SPAMD (default off):
1041     Direct interaction with spamd(1) from spamassassin(1) via a local
1042     unix(4) domain socket.
1043   . WANT_SPAM_FILTER (default on):
1044     Freely configurable hook programs, e.g., bogofilter(1).
1046 - It turned out that the manual wasn't mandb(1) compatible. [f5ab838]
1048 - New make.rc option: WANT_FILTER_HTML_TAGSOUP (enabled).
1049   S-nail now ships with a very primitive HTML-to-text converter.
1050   It'll be used for HTML parts automatically if no pipe handler is
1051   installed (and the builtin mime.types haven't been changed).
1052   This works because of the new TYPEMARKER extension to mime.types(5) as
1053   documented for [topic/mime.types.2] below.
1054   (It is quite experimental but i think it rocks except it can be fooled
1055   since it doesn't know about double quoted strings, e.g., <a href=""
1056   onmouseover='javascript:alert("> This is plain text you see, oops");'>.
1057 $ Yet it is ment for displaying HTML mails, and it works really well.
1058 $ It doesn't support non-standard type="quote" attributes nor even-more
1059 $ non-standard CSS classes "gmail_quote" or whatever it's name was --
1060 $ these are used in the wild to generate automatic mail quoting, which
1061 $ has resulted in an immense amount of top-posting; but maybe there will
1062 $ be a S-nail v14.8.1 which will implement those, to ease the pain.
1063   [topic/html-tagsoup]
1065 $- List output of `alias' @78, `ghost' @123 and `shortcut' @181
1066 $ uses a new syntax that should (in theory) make it possible to feed
1067 $ the output back into S-nail. [2913df3]
1068 $ Ditto `set' @178 unless *bsdcompat* or *bsdset* are set. [373cc8a]
1070 $- *keep* @308 will also affect secondary mailboxes (because *emptybox*
1071 $ has been obsoleted, see below). [5fa5f8b]
1073 $- New make.rc option: WANT_FORCED_STACKPROT (enabled with WANT_DEVEL or
1074 $ WANT_DEBUG).
1075 $ In conjunction with WANT_AUTOCC this will trigger stack protectors
1076 $ if the detected compiler does support them.  (Before they were only
1077 $ enabled if WANT_DEBUG was set, automatically.)
1079 + v14.8 is the last release with IMAP support, which has been removed
1080   from the developer's [crawl] branch for quite some time already.
1081   He really hopes he can affort to readd support sometime after v15.0.
1083 ChangeLog
1084 ^^^^^^^^^
1086 - S-nail now knows about named booleans (e.g., `localopts' @133 or
1087   interactive approval prompts can now be given any of 1/yes/true/on or
1088   0/no/false/off, case-insensitively; note this is true for the make.rc
1089 $ system, too) and so-called "quad" options (either normal boolean or
1090 $ "ask-BOOLEAN", which, in interactive context, will be prompted with
1091 $ default values; the default value is chosen in non-interactive mode).
1092 $ (on/off support not in the RC.)
1093   [topic/xify]
1095 - The `if' @128 combo:
1097   . gained <, >, <= and >= tests;
1098     ==, !=, <, <=, >=, > will try to convert their arguments to numbers
1099     and perform their test numerically, if possible, [143d409]
1100   . `if' supports boolean (as above) arguments, [topic/ifpimp]
1101   . `if 1'+ return value fixed, [topic/ifpimp]
1102   . `if'+: on syntax error, NOOP anything 'till `endif', [topic/ifpimp]
1103   . `if'+ now support bracket groups, AND-OR lists and unary ! (not),
1104     note that the separating spaces are required: [topic/ifpimp]
1106       if [ [ true ] && [ [ $debug ] || [ $verbose ] ] ]
1107         echo Noisy, noisy
1108       endif
1109       if true && $debug || $verbose
1110         echo Left associativity, as is known from the shell
1111       endif
1112       if ! ! true && ! [ ! $debug && ! $verbose ]
1113         echo Unary operator support
1114       endif
1116   . `if'+ now support new case-insensitive (ASCII) substring operators
1117     =@ and !@: [topic/ifpimp]
1119       if $features =@ "regex"
1120         if $TERM =~ "^xterm.*"
1121           echo ..in an X terminal
1122         endif
1123       endif
1125 $ . `if'+: the three argument forms can now be given variables also on
1126 $   the right hand side: [topic/ifpimp]
1128 $     set xtest='^xterm.*'
1129 $     if $TERM =~ $xtest
1130 $       echo Variables as right hand value
1131 $     endif
1133 - `unalias' @198 learned that * means "all aliases".
1134   Fixed: faulty list-head relinking caused "dead" aliases (since ever)
1135   [topic/names]
1137 - `unshortcut' @219 learned that * means "all shortcuts".
1138   `shortcut' @181 in turn can now define multiple shortcuts in one go
1139   [topic/names]:
1141     ?0[ /var/mail/steffen]? sho you 'any one' me 'no "one"'
1142     ?0[ /var/mail/steffen]? sho
1143     shortcut me "no \"one\""
1144     shortcut you "any one"
1145     ?0[ /var/mail/steffen]? unsho*
1146     ?0[ /var/mail/steffen]? sho
1147     ?0[ /var/mail/steffen]?
1149 - S-nail learned how to deal with mailing-lists in respect to
1150   Mail-Followup-To headers etc. (manual: "Mailing lists" @21):
1152   . new commands `(un)?ml(list|subscribe)' to let S-nail decide which
1153     addresses are mailing-lists, [topic/names]
1154   . *headline* learned %T format to display message recipient flags:
1155     "L" for a mailing-list, "S" for a subscribed one, [topic/names]
1156   . new variable *followup-to-honour*, [topic/mft]
1157   . new variable *reply-to-honour*, [topic/mft]
1158   . new command `Lreply', forcing a list-only `reply' if possible.
1159     When `Lreply'ing to messages which seem to originate from
1160     mailing-lists (contain a "List-Post:" header), then S-nail will
1161     treat the list address as a known mailing list (as via `mlist').
1163     (It is advisable to try out several different combinations of non-/
1164     subscribed mailing-lists in conjunction with `reply', `Reply' and
1165     `Lreply' with *debug* set in order to get used to how S-nail will
1166     modify the address lists; the results should be quite logical
1167     though.) [topic/mft]
1168   . For convenience `reply' and `Lreply' can now be used to reply to
1169     multiple messages in one go (each message will still be handled by
1170     itself, we simply start over internally). [topic/mft]
1172 - `unset' @217 no longer "fails" for unset variables, but only prints
1173   a message in *debug* or *verbose* mode.  This changes traditional,
1174   decade-old behaviour, but shells don't even say something in (*debug*
1175   or) *verbose* mode, and it really simplifies things. [topic/okeys-attr]
1177 - SSL/TLS changes: [topic/ssl.1]
1179   . new variables: *ssl-cert-HOST* @451, *ssl-key-HOST* @456,
1180     *ssl-method-HOST* @457, *ssl-verify-HOST* @461,
1181   . *ssl-v2-allow* has been dropped,
1182   . *ssl-verify* @461 and *smime-cipher-USER@HOST* @427 use
1183     case-insensitive matching for value checks,
1184   . new variable-chain: *ssl-protocol* @458 (the introduction of which
1185     obsoletes *ssl-method* @457, see below),
1186   . new variants of *ssl-cipher-list* @452: *ssl-cipher-list-USER@HOST*,
1187     *ssl-cipher-list-HOST*,
1188   . new variable: *ssl-config-file* @453,
1189   . *smime-cipher-USER@HOST* @427 dropped builtin support for the
1190     obsolete RC2-40 and RC2-64 ciphers -- use the make.rc option
1191     WANT_ALL_SSL_ALGORITHMS to readd support,
1192   . with SSL_CONF_CTX support (OpenSSL v1.0.2+) the values of the
1193     following variables (and variants) will be parsed by OpenSSL instead
1194     of S-nail, offering more user and packager flexibility:
1195     *ssl-cert* @451, *ssl-cipher-list* @452, *ssl-key* @456,
1196     *ssl-protocol* @458.
1198     E.g., shall a new OpenSSL ship with TLS v1.3 S-nail doesn't need to
1199     be adjusted in order to support TLS v1.3, all there is to do is that
1200     the user has to adjust her *ssl-protocol* setting.
1201     This is at least the theory. :)
1202     And maybe OpenSSL (will) offer(s) symbolic constants like "NEWEST"
1203     or "SAFEST".
1205 - Folder hooks have been extended:
1207   . if there was no *folder-hook-FULLNAME* @376 we'll try
1208     *folder-hook-+NAME* if the mailbox NAME resides in *folder*, e.g.,
1209     the author has "folder-hook-+sent=MACRO" and all his *record*
1210     variables are "record=+sent", therefore MACRO can be shared in
1211     between all accounts with a single hook definition. [a5a4d89]
1212   . `localopts' @133 can now be used in folder hooks: the covered
1213     settings will be reverted once the folder is left again.
1214 $   (I know for sure someone asked for this long ago, directly after
1215 $   `localopts' came up first, but i couldn't find the corresponding
1216 $   message.  Sorry!) [2c67091]
1218 - More security control à la CVE 2014-7844, possibly for the first time
1219   enabling safe usage of S-nail via CGI: [topic/cve-2014-7844.2]
1221   . fixed *sendmail-arguments* @420 parsing:
1222     *sendmail-arguments*='-F "Dubi Da"' will now result in <"-F" "Dubi
1223     Da"> not <"-F" ""Dubi Da"">,
1224   . new command line argument "-." @67 forcefully terminates options
1225     and enters send mode.  I.e., using this option avoids possible
1226     misinterpretation of the following arguments.
1228     This operation is usually reserved for --, but since S-nail passes
1229     anything after -- to the MTA (but read on) i had to invent something
1230 $   else.  Also, -. forcefully enters send mode, which -- couldn't have
1231 $   been overloaded to do.
1232   . New variable: *expandargv* @372: in equal spirit to *expandaddr* @371
1233     this one is required in order to pass arguments after -- to the MTA.
1234     If set to "fail" existence of such arguments is a hard error,
1235     "restrict" likewise except in interactive mode or in conjunction
1236     with the -~ or -# options.
1237   . *expandaddr* @371: new special value "fail" causes presence of
1238     extended recipient addresses to be treated as a hard error.
1239 $   In fact this is now interpreted as a comma separated list and may
1240 $   also include the string "noalias", disallowing non-network-addresses
1241 $   in the remaining (non-"extended") recipient addresses -- note this
1242 $   applies to system global aliases only, not to those of `alias'
1243 $   (except for their content, of course); "noalias" is a hard error in
1244 $   combination with "fail".
1246 - `unaccount' @197 and `undefine' @201 learned that * means "all
1247   accounts" and "all macros", respectively. [4c09114]
1249 - Spam handling has been rewritten completely, revealing a very old
1250   misbehaviour in nail's subprocess handling (malloc in signal handler).
1251   Please reread the manual section "Handling spam" @37 for more.
1252   The motivation was also that bogofilter(1), sylfilter(1) etc. can
1253   export their databases, so should the author ever find time to
1254   implement spam handling in C like his predecessor it will be possible
1255   to continue to use those databases: [topic/spam.2]
1257   . *headline* @380 format %$ has been fixed,
1258   . when working on multiple messages the operation is cancelled if an
1259     error occurs,
1260   . new variables: *spam-interface* @436 chooses the, well, ...
1261     This one has extensive documentation.  Plus the interface dependent
1262     *spamc-command* @438, *spamc-arguments* @439, *spamc-user* @440,
1263     *spamd-socket* @441, *spamd-user* @442,
1264     *spamfilter-ham* @443, *spamfilter-noham* @444,
1265     *spamfilter-nospam* @445, *spamfilter-rate* @446,
1266     *spamfilter-spam* @447 and *spamfilter-rate-spamscore* @448.
1267   . The *attrlist* @351 variable gained a new slot for an unsure-spam
1268     status (default character is ~).
1269     Messages with that flag can be specified via the :S colon modifier.
1271 - Fix: even though -# @66 implies *sendwait* @335 a user should have the
1272   option to turn *sendwait* off again. [4274bed]
1274 - Completely reworked mime.types(5) handling, note the backward
1275   incompatible drop of `mimetypes': [topic/mime.types.2]
1277   . dropped the `mimetypes' command,
1278   . new commands: `mimetype' @138 and `unmimetype' @209,
1279   . *encoding* @369 is now parsed case-insensitively,
1280   . *mime-counter-evidence* @390 gained new bit 3 to indicate the desire
1281     to forcefully overwrite MIME types if we think we know it better,
1282   . *mimetypes-load-control* @391 gained an extension that can be used to
1283     load more and specific files, which in addition may make use of
1284     a new non-portable S-nail-specific TYPEMARKER extension.  The manual
1285     section "The mime.types files" @32 has been rewritten accordingly.
1286     (In short: mime.types(5) lines can be prefixed by @, @h@ or @H@, for
1287     plain text, builtin HTML filter (plain text fallback), ditto
1288     (without fallback).)
1289 $ . The builtin MIME types now make a lot of use of the @ and @h@
1290 $   TYPEMARKER extensions, so that you possibly can get rid of a lot of
1291 $   pipe-TYPE/SUBTYPE=@ plain-text type hooks, shall you have used them.
1293 - Support for RFC 2231 has been added.  This means that S-nail generates
1294   truly MIME compliant messages and no longer requires help from other
1295   MUAs!  In fact MIME parameter handling has been rewritten completely.
1296   [topic/rfc2231]
1298 - On the long run shell word expansion (via wordexp(3)) will be replaced
1299   by a new, restricted (and thus (hopefully) safer), internally
1300   implemented path expansion mechanism that only supports ~/ -> HOMEDIR
1301   and $SHELLVAR / ${SHELLVAR}.
1302   Since the original expansion is *so* hardwired that'll take time, for
1303   now it is used for attachments only, but here all through the way.
1305   But where it is used already it has consequences regarding backslash
1306   escaping; to improve user experience a bit `~@' @239 will display the
1307   escaped filename so that users only have to hit ENTER to accept paths:
1308   e.g., "diet\ is \curd.txt" will show up as "diet\\ is \\curd.txt".
1309   And, e.g., the test script does the following for RFC 2231 (excerpt):
1311     MAILRC=/dev/null "${SNAIL}" ${ARGS} -Snodot \
1312       -a "ma'ger.txt" -a "mä'ger.txt" \
1313       -a 'diet\\\ is\ \\curd.txt' -a diet \"is\" curd.txt \
1314                                          ^      ^ NOTE: 0x00A0, NBSP
1315       -a ✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆.txt
1317   The introduction of the manual section "COMMANDS" @5 has been updated
1318   accordingly.  Also see -a @39.  [topic/fexpand.2]
1320 - Assorted changes:
1322   . Multiple crash-causing bugs regarding `source' @185, also if used
1323     via `~:source', have been fixed. [aafb688,6979c73,4c6dfc2]
1324   . The NAILRC environment variable is no longer supported. [104c254]
1325   . The *Replyall* variable has been dropped as it was only an alias
1326     for the POSIX standard *flipr* @296 variable. [topic/mft]
1327   . New variables: *version*, *version-(major|minor|update)*,
1328     *features*. [topic/okeys-attr]
1329   . `varedit' @224 can be used to create variables. [topic/okeys-attr]
1330   . New variable: *charset-unknown-8bit* @357. [9b672f6]
1331   . *smtp-auth* @434 now defaults to "plain" (if *v15-compat* is set).
1332     (Josef Jurek, Gavin Troy) [dcbb31a]
1333   . All obsoleted: *autothread*, `thread' and `unthread'.
1334     Use *autosort*=thread, `sort thread' etc. instead. [ef16f43]
1335   . *showlast* @336 should have gained meaning. [4213d52]  (Gavin Troy)
1336   . If the -r @57 option is given a full name specification (rather
1337     than only an address), pass the MTA the respective address parts
1338     via -F and -f. [dd90c14]
1339 $   Also try to pass -F _and_ -f if an empty argument was given to -r
1340 $   but *from* @378 (or, say, "From:") includes a full name. [5f68921]
1341   . New variable: *term-ca-mode* @345 (for WANT_TERMCAP).  In
1342     interactive mode S-nail can now be forced to use ti and te termcap
1343     entries; in conjunction with a PAGER that does too ... [topic/termcap]
1344   . `ghost' @123 gained a new mode and tweaks (see manual). [8a49b12]
1345   . -r @57 option: fixed -h output and manual. [9a1a303]
1346     (Martin Brandenburg)
1347   . With *debug* or 2x *verbose* command lines (including those read
1348     from files) are now traced. [06042c4]  (Bob Tennent)
1349   . NAIL_TMPDIR (new) and TMPDIR environment variables are now
1350     (guaranteed to be) set in pipe hooks. [a1cfb02]
1351   . "Subject:" Re: trimming: MIME decoding is now performed. [ede7c7d]
1352   . New variants of *pop3-bulk-load* @320: *-[USER@]HOST*. [5f5ae10]
1353   . *crt*=0 @366 now really works. [22f1477]
1354   . Maildir code now uses string relaxation which drastically reduced
1355     memory usage for large mailboxes. [d1c945f]
1356     And for the first time it performs real memory cleanup. [e549110]
1357   . Improved error message on MTA exec failure.  (Dominic Meskys)
1358   . Fix: "setenv noVAR" would have set noVAR. [3c1f886]
1359   . When `setenv' is used to set any of HOME, USER, TMPDIR it'll be
1360     reflected by our internal variables.  (Still hacky as special code
1361     is needed to do so; also "set HOME=x" shadows HOME for "varshow
1362     HOME" instead of being rejected.  Future cleanup work.) [3f03b80]
1363   . Colon modifiers can now be joined, as in "f :uas". [8b6c259]
1364 $ . Maildir code did faulty From_ line detection, resulting in any
1365 $   non-quoted "From " line to start a new message (e.g., when doing
1366 $   things like "copy * MAILDIR" we could have f...ed up completely).
1367 $   Seems to have been added with Heirloom mailx 11.6 ([faf4b65],
1368 $   2004-09-07).  Neither goes credit to Jacob Gelbman nor to Robin
1369 $   Stjerndorff for messages to nail-devel@ on 2015-01-21 and
1370 $   2015-02-20, respectively.  :-)) [ae539c9]
1371 $ . *emptybox* has been obsoleted.  *keep* @308 will also affect
1372 $   secondary mailboxes, and then both only deal with local regular
1373 $   MBOXes anyway, not to e.g., maildir files nor IMAP boxes. [d747c0a]
1374 $ . `unghost' @207 learned that * has to drop all ghosts. [34a92a5]
1375 $ . NAIL_TMPDIR (new) and TMPDIR environment variables are now
1376 $   (guaranteed to be) set for *agent-shell-lookup* @350. [5c3d7b5]
1377 $ . Things like "copy * MAILDIR" from within an IMAP (or POP3?) mailbox
1378 $   to a Maildir mailbox should now work again. [d747c0a]
1379 $ . IMAP code did faulty From_ line detection, resulting in some
1380 $   non-quoted "From " line to start a new message (e.g., when doing
1381 $   things like "copy * MAILDIR" we could have f...ed up completely).
1382 $   Present in Heirloom mailx since ever ([^b4ad9f2]). [66e3c93]
1383 $ . New variable: *mbox-rfc4155* @312: because of all the bugs in From_
1384 $   quoting etc., err, no.  "Albatros" will last.  I've just touched
1385 $   a lot of stuff regarding MBOX writing: From_ quoting (which may
1386 $   happen whenever we save already existent data in a MBOX, shall
1387 $   the original generator not have taken appropriate steps to ensure
1388 $   "false" From_ lines can't happen (S-nail does)) is now definitely
1389 $   POSIX compliant, meaning that we may quote much too much lines.
1390 $   So set *mbox-rfc4155* and we generate RFC 4155 compliant MBOX files,
1391 $   possibly leaving behind backward POSIX-only software. [70ba3ef]
1392 $ . New command line option: "-X cmd" @64 will execute "cmd" right
1393 $   before normal operation starts.  The only option to execute commands
1394 $   in non-interactive mode when reading of resource files has been
1395 $   actively suppressed.  This is an experimental feature. [d202869]
1397 ChangeLog (purely technical)
1398 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1400 . Improved output flushing, avoidance of printing of useless
1401   output (especially smoothens *editalong*). [topic/stdout-fflush]
1402 . String relaxation is now everywhere (but IMAP), the builtin buffer
1403   sizes were reduced to 1/3.
1404 . Again a manual review.  The manual now supports mdocmx(7).
1405 . Using builtin ARC4 pseudo-random for random generation.
1406 . Better signal handling here and there.
1407 . Fixed most "unpluggable memory leaks" by plugging them via chains of
1408   signal handlers and longjmps.  Terrible.  But no more leaks.
1409 . A lot of this and that.  (Really.)
1410 $. Slightly more tolerance for faulty Base64 encoding in message text
1411 $ parts.  No real healing possible today, but requires v15.0 environment.
1412 $ This, however, only affects invalid data that, e.g., OpenSSL doesn't
1413 $ even give any output for! [54137fd,4d59cca]
1415 I didn't make it to improved message selection.
1416 And i also can't seem to find the necessary peace of mind to do a real
1417 review with this codebase, it's always that i start off doing something
1418 non-reviewish; but i'll see the day (what i hope).
1420 NEWS entries for the S-nail releases before v14.8.0 have been cut off
1421 before release v14.8.5 and can be found in the git(1) repository:
1423   v14.8.0 - v14.8.12: $ git show v14.8.12:NEWS
1424   v13     - v14.8.5 : $ git show v14.8.5:NEWS
1425   9.0     - 12.5    : $ git show heirloom:ChangeLog
1427 Also accessible via the following URL, just replace X.Y.Z accordingly:
1428   https://git.sdaoden.eu/cgit/s-nail.git/tree/NEWS?h=vX.Y.Y
1429 For even older releases you need to look into the [timeline] branch, but
1430 no changelog has been administrated for them.
1432 # s-ts-mode