S - n a i l  N e w s
====================

In the following numbers in [] reference either the commit SHA1 hash or
the name of a topic branch which relate to the NEWS entry;
Likewise, numbers after an at-sign @ are mdocmx(7) manual anchor
references which allow directly jumping to the given anchor.

The complete changelog of commits in between two versions can be
inspected by using the git(1) `log' command as shown below, where "OLD"
and "NEW" are the two versions to be compared.

  # All commits:
  $ git log --reverse --topo-order --abbrev-commit OLD..NEW
  # Only topic branch headers (--no-merges for content commits only):
  $ git log --oneline --reverse --topo-order --merges OLD..NEW
  # Same, but truly accessible:
  $ git log --oneline --reverse --topo-order --merges --parents OLD..NEW |
    while read c1 c2 c3 c4 c5 c6; do
      printf "%-24s: \$ git log --oneline --no-merges ${c1} ^${c2}\n" "${c6}";
    done

v14.8.5 ("Hen Harrier"), 2015-09-05
-----------------------------------

Credits John Dodson, Claudio Cappelli.

We welcome Claudio Cappelli in THANKS.

NOTES, ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- I've forgotten to add obsoletion warning messages in v14.8.4, so
  running with enabled -d/*debug* -vv/2x*verbose* may be useful.
  Sorry! [b3e34db]

- A series of bug FIXes (which caused the "Hen Harrier" in the end):

  . v14.8.4 bug: macro content will be added to the history. [28672e5]

  . Fallout of massive not-yet-dead style and control flow change series
    in February 2014, I.: the close-on-exec bit of temporary file
    descriptors wasn't set. [8f58404]

  . Fallout of massive not-yet-dead style and control flow change series
    in February 2014, II.: temporary files were always created in the
    current directory.  Aloha, heh. [edc12c8]

  . v14.8.4 bug: when `resend'ing messages a crash would happen when
    generating the Message-Id: (control flow messed up when hastily
    implementing extended -t parsing). [9e63ae6]
    (Hello, Bob Tennent: i finally have added at least a simple `resend'
    test.  Don't your worry.)

  . v14.8.4 bug: plugged a file descriptor leak in the dotlock code (one
    side of the control pipe was leaked upon success; there you see how
    large ulimit(3) limits are by default today). [ed5c8cf]

- When using -t and a template message recipients given on the command
  line will now be joined into the message instead of being discarded.
  [9eb4cbf]

ChangeLog
^^^^^^^^^

- The `set' command will now mark out assembled variables if *debug* or
  2x*verbose* is set. [2b6e64a]

- Added *smime-cipher* @433 option (i.e., generic variant of
  *smime-cipher-USER@HOST*). [58804ea]

- Messages will now _only_ be saved in *DEAD* if *save* is set (POSIX).
  [3fefac9]

- The (pretty useless for now) `pipe' command will now also print the
  overall message info (it printed MIME part infos already). [e0a8196]

- NAIL_FILENAME_GENERATED is now nothing but a random string. [36097df]

- *debug* now implies no*record* and no*save*. [ca9f512]

- After almost three years i've finally heard what John Dodson said and
  changed/restored behaviour of plain "address" message specifications
  to reflect the original intent (and a bit POSIX) so we now have
    A case-insensitive “any substring matches” search against the
    ‘From:’ header, which will match addresses (too) even if
    showname[339] is set [things are different if *allnet* is set]
  [44cec1f]  (John Dodson)

- ..and therefore we need the possibility to somehow perform "exact
  boundary" matches: for this i've extended the "@" message
  specification with a header-name "~" prefix and header abbreviations:
    ‘f’, ‘t’, ‘c’, ‘b’ and ‘s’ will match ‘From’, ‘To’, ‘Cc’, ‘Bcc’ and
    ‘Subject’, respectively and case-insensitively.
  And:
    This message specification performs full text comparison, but even
    with regular expression support it is almost impossible to write a
    search expression that savely matches only a specific address
    domain.  To request that the content of the header is treated as a
    list of addresses, and to strip those down to the plain email
    address which the search expression is to be matched against, pre‐
    fix the header name (abbreviation) with a tilde ‘~’:
      '@~f@@a\.safe\.domain\.match$'
  [50c2816]

- New option: *sendmail-no-default-arguments* @426 [d983036]
  (Claudio Cappelli)

- Do no longer make a difference in "no mail for user" and "missing
  system mailbox".  The latter caused yet an annoying error message even
  with *emptystart*. [7abff87]

- New command `source_if' @187 is like `source' but don't fails if the
  file cannot be loaded.  That is to say, we do not yet support
  "-f FILE@ tests nor `test -f FILE` shell commands for `if', sigh.
  [893bd5f]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Unless Gunnar Ritter is directly affected the fourth clause of the BSD
  copyright has been dropped, as has been done for NetBSD Mail.
  [b9ea247]

- Quoted-printable encoding will avoid printing a soft newline if only
  a single character is about to follow. [6b31542]

- The configuration script now shows what it is doing at the beginning,
  to overcome those hangs that can be seen especially in VMs. [4c29cea]

- The configuration will do an automatic "make clean" when the
  configuration had been updated. [9706734]

- We no longer generate a MIME message unless that is necessary.  I.e.,
  a plain 7-bit (US-ASCII) message without attachments send from
  a system daemon is a plain RFC 822/2822/5322 message and doesn't
  require any MIME header. [824257a]

- To avoid that DNS resolver becomes unusable due to ^C interruption.
  Also fixes a possible leak in non-getaddrinfo(3) codepath (old boxes).
  [767897a]

v14.8.4 ("Nameless bird (shot by Hemingway)", 2015-08-04
--------------------------------------------------------

Thanks for Jérémie Courrèges-Anglas for beating me to it.

NOTES, ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Added support for the (BSD-licensed) idnkit[1] IDNA library which is
  now in the base system of DragonFly BSD.  We still only support
  encoding, though.  (And assume the hostname is in locale encoding.)
  [cbded82,22ac479]

    [1] <https://www.nic.ad.jp/ja/idn/idnkit/download/>

- I have rewritten the privilege-separated dotlock helper program,
  because among others a SETGID one is of no use in todays world.
  So it is now SETUID to the new PRIVSEP_USER.

  . WANT_PRIVSEP and PRIVSEP_GROUP have been dropped.

  . New option: WANT_DOTLOCK, by default enabled.
    It is henceforth possible to strip any dotlock code off S-nail.
    So either S-nail has complete dotlock support, including the
    privilege-separated dotlock helper, or none at all.

  . New variable: PRIVSEP_USER, by default "root".
    It must be a privileged user that can be used to implement the new
    strategy: we create the dotlock file and then fchown(2) it to the
    UID and GID of the mailbox that we created it for.  Like this the
    owner of the mailbox (remember %USER, $USER, -u USER ..) will be
    capable to remove the lock file herself.  Or himself.

  . No dotlocking was performed for reading, only for writing.  I've
    changed this.  We also didn't perform any (file) locking at all when
    updating non system-mailboxes, which i have changed, too.

  . Fixed horrific bug: on systems without realpath(3), e.g., Solaris 9,
    S-nail would not resolve symbolic links on the mailbox to lock,
    potentially creating the lock file in the wrong directory.

  . We now compare the inode/device/etc. of the mailbox file with the
    information we collected a lot earlier from the open mailbox file
    descriptor, and bail if they are not identical, to reduce attach
    surface.

  . The privsep helper now re-checks that it is capable to read (or
    read/write) the mailbox it is creating a dotlock for, to reduce the
    chance of being misused (by itself).  I.e., it does so before
    raising its privileges, say.

  [d5ec3cb,b29e2c8]

- The predefined CONFIG=urations have been changed a bit and now
  "require" more options than they did before.

- Renamed WANT_ALL_SSL_ALGORITHMS to WANT_SSL_ALL_ALGORITHMS.
  That was a no-brainer, default of "yes" remains, but it now can also
  be "require"d. [910849e]

- The GitLab project repository URL has been changed and now is
  <https://gitlab.com/sdaoden/s-nail.git> (leave off ".git" for browsing
  purposes).

ChangeLog
^^^^^^^^^

- It has become possible to fixate the input character set of
  attachments from the command line (without going over ~@):
  when the -a @39 option cannot access(2) the file to be attached it
  searches the filename for an equals-sign "=" and splits into filename
  and character set shall it find one.  A character set defined like
  this is "fixated" and therefore no character set conversion occurs.

    $ echo body |
    ./s-nail -d -s subject du@auch \
      -aversion.h -aversion.h=KoI8-r -aversion.h=LaTin1 -aversion.h

  >>> Content-Type: text/x-chdr; charset=US-ASCII
  >>> Content-Type: text/x-chdr; charset=KoI8-r
  >>> Content-Type: text/x-chdr; charset=LaTin1
  >>> Content-Type: text/x-chdr; charset=US-ASCII

  [1f07d9e,804e561]

- In *debug* mode the content of the message that would have been sent
  is printed on standard error not only in *smtp*, but also MTA mode.
  E.g., as in the example above. [c106f35]

- S/MIME oops: S-nail yet didn't test for the "application/pkcs7-mime"
  MIME type at all, but only for "/x-pkcs7-mime" (pre-standardized
  variant), so that S/MIME messages generated by more modern MUAs (e.g.
  Alpine) wouldn't have been understood!
  And we do now use that MIME type ourself, as standardized by RFC
  5751.  However, we are still stupid and don't handle a signed message
  inside a multipart/mixed message, neither do we support fully
  encrypted messages (nothing but rfc822 member) etc. [10c2b16]

- *smime-cipher-USER@HOST* @431 values changed to versions without
  hyphen, as that is what OpenSSL uses: e.g., AES256 not AES-256; the
  latter versions are no longer documented and will be dropped with
  v15.0. [f2c6eec]

- New variable *smime-sign-message-digest* [-USER@HOST] @437 can be used
  to define the message digest for S/MIME signing.  RFC 5751 mandates
  a default of SHA1, by default available are also SHA256, SHA512,
  SHA384 and SHA224, MD5 may be available, dependent on OpenSSL.
  With WANT_SSL_ALL_ALGORITHMS more digests may be available. [2f6dac3]

- Using NAIL_FILENAME_GENERATED was prevented since some time since it
  ended up longer than NAME_MAX (ENAMETOOLONG). [3bcbbfc,f632b5b]

- Heavily rewritten manual section "Signed and encrypted messages with
  S/MIME" @35, giving a ready-to-go example for CAcert.org.

- Nicer output for `help' @126 / `?' @74 when given an argument:
  if that is a command ghost we search for the expansion and do print
  the (further expansion and) help for that if possible [cea8c20]:

    ?0[]? ?save
    save: Append <message-list> to <file>
    ?0[]? ?s
    s (save): Append <message-list> to <file>
    ?0[]? gh s s
    ?0[]? ?s
    s -> s (save): Append <message-list> to <file>

- No longer allowing recursive commands in macros to avoid that the
  following can crash us (check can be bypassed):

      ? define ouch {
        echo ouch
        reply 2
      }
      ? reply
      ~:call ouch

  This is a pity because "? call ouch" does no longer cause a reply,
  but the real healing will take time.
  Also the `source' command is now actively disabled during macro
  evaluation -- this only works(/ed) by accidence and anyway non-
  synchronously (the `source'd file will be loaded after the macro
  evaluation has finished).  The real healing for this is heavy stuff
  and will remove a smart and fantastic idea from before 1979, but it
  won't work out with macro support (see commit message for more upon
  interest). [5461a30]

- And `source' will be actively forbidden in compose mode, too.  It
  never worked the way it should. [abd388c]

- Did -t @60 ever work for real?  Now it does.
  Even better it now "supports" some more header fields (References:,
  In-Reply-To:, Message-ID:, and Mail-Followup-To:, but the latter will
  be subject of a nice followup content massage) -- S-nail can
  henceforth be used for git(1)s send-email command.
  We also improved the interdependency of -t (with[out] From:, Sender:),
  -r, *from* and *sender*, but i don't say it is perfect yet.
  [6842f12,631d402,a86ca2d]

- Completely reworked *expandaddr* @373 handling, and you can now define
  *exactly* what you want, e.g., "fail,-all,+addr,+file" will only allow
  mail address or file recipients and hard error out otherwise.
  Note that in order to make that work "restrict" has been changed to be
  effectively "restrict,-all,+name,+addr", which matters in, e.g.,
  "fail,-all,+file,restrict" which therefore truly is "restrict,fail"!

  Even in conjunction with -t you should now see proper (-d / *debug*,
  -v / *verbose*) messages for *expandaddr* caused address stripping,
  or, with "fail", hard errors. [8668be3]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- We again allow Message-Id:s to start with a leading slash, as in
  "/p/forge/site-support/10.../...". [143372a]

- We now support multiline values in make.rc: to do so, escape the
  newlines with a backslash "\", e.g. [621cbed,9cf4e7b]

    MAILSPOOL=`\
       if [ -d /var/spool/mail ]; then \
          echo /var/spool/mail;\
       else \
          echo /var/mail;\
       fi`

- Lowered the memory pressure caused by malicious spam messages that
  place hundreds of references into the References: header body.
  And we don't use alloca(3) no more for such things, in order to lower
  stack usage. [1c4b8c9,47a1a5c]

v14.8.3 ("Startled chicken"), 2015-07-05
----------------------------------------

Credits go to Martin Neitzel!

NOTES, ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Prefilling INCS and LIBS is finally honoured by the build system, just
  as documented. [9a34822]

- In place of "packager-install" "doinstall" will also do.

- New `make.rc' option: WANT_ERRORS, by default enabled.
  Will enable the new command `errors' @105 (#_105) and an error message
  queue ring: error messages will no longer get lost but duplicated into
  the queue, to be displayed in interactive mode via `errors'.  This is
  a finite ring which rotates oldest messages if it full.
  [topic/errors]

- S-nail no longer offers hooks for group identity switching: it no
  longer makes sense to install it SETGID to a mail group (shall anyone
  has done so). [ac42d24]

- New `make.rc' option: WANT_PRIVSEP, by default enabled.
  The dotlock'ing has been completely rewritten (see `make.rc' for
  a longer explanation of traditional Unix mailspool locking, please).

  In order to be able to create lock files in *any* SETGID mailspool
  directory in which user system mailboxes may reside S-nail now ships
  with a privilege-separated mini dotlock program (source in
  `privsep.c'), which will be installed in the new also LIBEXECDIR (as
  YOUR_MUA_NAME-privsep) SETGID to the group given by the also new
  PRIVSEP_GROUP (default "mail").

  This dotlock program will be used whenever a mailbox has to be
  dotlocked which is owned by group that is not the group of the user
  who is running S-nail, assuming that the file in question resides in
  a SETGID mailspool directory.

  The new variable *dotlock-ignore-error* @294 (#_294) now controls
  wether it is a failure if creation of a dotlock file is not possible.
  This variable is by default enabled if WANT_PRIVSEP is false.
  [topic/dotlock]

ChangeLog
^^^^^^^^^

- Fix file locking, which was broken since v14.8. [7f8ebc0]
  (Martin Neitzel)

- -e now works with given boxes; -e is mutual exclusive with -H and -L;
  and then any of -e, -H and -L causes the mailbox opened in readonly
  mode. [3bb05a2, 2cf15c1]

- In *debug* mode no process will be started for a set *smtp*, but
  instead the message will be directly generated (on the error channel).
  Also GSS-API authentication will no longer be performed even with
  enabled debug, oops. [3333d71]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- A readonly IMAP box is opened via EXAMINE not SELECT. [2d5259c]

- snprintf(3) and vsnprintf(3) are now required preconditions. [c58c7e9]

v14.8.2 ("Wandering albatross"), 2015-06-17
-------------------------------------------

Many thanks Bob Tennent, for reporting and testing!

NOTES, ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Configuration will now find clock_gettime(2) in -lrt and
  gettimeofday(2) as such on Linux. [47c9ea7,5e248d2,df7d77f]
  (Bob Tennent)

- MANDIR now defaults to ${PREFIX}/share/man (not ${PREFIX}/man)
  [6371740]

ChangeLog
^^^^^^^^^

-  Added missing condition clause in `if' expression parsing
   [74c7cac,5da6d4d]:

    ?0[ +mbox]? if $du @@ hey
    ?0[ +mbox]? endif
    -->
    ?0[ +mbox]? if $du @@ hey
    `if' conditional: unrecognized condition -- near "du"
       Expression: $du @@ hey
       Left to parse: $du @@ hey
    ?1[ +mbox]? endif

- Ooops, fix pipe-TYPE/SUBTYPE @403 with value "@" (a.k.a. treat as
  plain text and display "as is"): i've broken that once i've introduced
  the extended type markers for the `mimetype' command.  Must have been
  a Freudian error, sorry! [ea655de]

- Fix a bug introduced in nail 9.29, 2001-12-10: a temporary buffer is
  closed with fclose() even though it is a registered file that instead
  needs to be closed via Fclose().  This effectively results in
  a double-fclose(3) of the underlaying file descriptor once the
  registered files are cleaned up next, which happens either after
  signal interruption and, since [65e0510] as of 2015-05-21, whenever
  the command loop ticks. [97fcb97]  (Bob Tennent)

v14.8.1 ("Tristan albatross"), 2015-06-11
-----------------------------------------

Kudos!
Ypnose, Tarqi Kazan, Dagobert Michelsen and OpenCSW.org, Gianluca
Ramunno, Bob Tennent.

We welcome Dagobert Michelsen in THANKS.

NOTES, ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

$ In all the following noticable changes to the release candidate are
$ marked with a $ in the first column

- We have been ported to Sun Solaris!
  Thanks to Dagobert Michelsen for giving me an account on OpenCSW.org!

- The build system will now really find strip(1). [54e91c4]

- WANT_TERMCAP fix: we simply passed tputs(3) a pointer to putchar(3)
  though that may be a macro etc. [cc65bc3]

- The following variables can be used to overwrite utilities needed
  during configuration and build:

    MAKE=, STRIP=, awk=, cat=, chmod=, cp=, cmp=, cksum=, grep=, mkdir=,
    mv=, tee=, rm=, sed=, tr=

  Note that rm(1), sed(1) and tr(1) are needed before `make.rc' is read.
  Fix: these will now also affect "make test".

- WANT_AUTOCC now no longer sets compiler flags as of experience, but
  compiles a test program to actually detect wether the compiler will
  swallow the flag.  This increases configuration time quite a bit.
  Users who really did use "make devel" possibly want to use "make
  CONFIG=DEVEL" followed by "make build" now.
  Note we now also test for -fPIE as well as relro,now,noexecstack.

- WANT_SPAM_SPAMD is now decoupled from WANT_SOCKETS. [d247d86]

- The configuration now also detects any changes on PATH, C_INCLUDE_PATH
  and LD_LIBRARY. [1038028]

ChangeLog
^^^^^^^^^

- Fixed importing of SHELL/LISTER/PAGER variables from the program
  environment. [940c7f1]  (Ypnose)

- Moved -X @64 command line option handling before attachment
  evaluation, so that, e.g., `mimetype's registered via it will already
  be seen when classifying attachments. [5d9742f]

- Honour *asksign* @274 again, even if *askatend* @270 or *bsdcompat* @281
  are not set.  This also changes *askattach* @271 as we'll only ask for
  addition of attachments if there are none yet. [e054d6a]  (Tarqi Kazan)

- Support OpenSSL 1.1.0 and above: it obsoletes the more-than-a-decade
  old SSLv23_client_method() in favour of a new TLS_client_method()
  (instead of using some "magical" constant like, say, "SSL_METHOD_ANY",
  but who am i). [c35b567]

- Generic file (mailbox) load and save hooks have been introduced:
  *file-hook-(load|save)-EXTENSION* @374,@375, e.g.:

    set file-hook-load-xy='echo >&2 XY-LOAD; gzip -cd' \
        file-hook-save-xy='echo >&2 XY-SAVE; gzip -c' \
        record=+null-sent.xy

  One could think about using all-encrypted mailboxes, or the like.
  Note that before v15.0 these variables may not be changed while
  a mailbox handled by these hooks is open. [b4c2c37]  (Tarqi Kazan)

- When DNS resolving fails we now print error messages.
  And then, if it fails because of an unknown service (protocol), we
  check for the protocol and retry shall we have a well-known port
  number builtin (smtp, submission, smtps, pop3, pop3s, imap, imaps).
  [5f52370, (3f189f9)]  It is not wrong to credit (Gianluca Ramunno)

- One may now force treatment of addresses as files with the new "./"
  or "/" prefixes -- until now it wasn't possible to address files if
  the addressee includes an at sign, now "./me@here.com" will do, just
  as will "/me@here.com". [2cf5890,0da473f]  (Bob Tennent)

- Fix *record-resent* @329, which never made it to *record* @414 since
  [a11935b], but instead save the message in a file named after the
  addressee! [a82af9f]  (Bob Tennent)

- Fixed signal handler uninstallation in sopen() (DNS lookup and socket
  creation): v14.8.0 could be forced in endless loop after failed DNS
  lookups due to this. [3cca23b]

- Fixed possible double-free (causing a crash) after failed SSL
  certificate verification (*ssl-verify*=strict etc.) with OpenSSL
  versions that support SSL_CONF_CTX (1.0.2+). [c691726]

- Assorted changes:

  . The builtin HTML filter will now silently discard carriage-return
    characters (looks better in e.g. less(1)). [cf4d800]
  . When reopening the same box we now recognize if changes had been
    written, forcing a reread of the box in order to display the actual
    real content. [7dfbd38,0835212,a15dfed]
  . `netrc' output changed, so that the output could (in theory) be fed
    back into S-nail again in order to gain the same settings. [a9a2722]
  . *pop3-keepalive* @410 gained (@USER)?-HOST forms [69cae68]
  . *imap-keepalive* @387 gained (@USER)?-HOST forms [9a8c929]
  . Do not use the builtin random generator if we find a suitable one in
    the host environment. [0e01aeb,6bcb430,fc846c6]  (Bob Tennent)
  . The builtin HTML filter will now also expand entities in parameter
    names. [8d16dc0]
$ . *crt* will now only be checked when attached to a terminal device;
$   and no*crt* will now be honoured. [2508c32]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Solaris port resulted in a lot of changesets for the build system.
- I didn't use git(1) rebasing and the [crawl] branch but only [master].
  And see where that ended: S-nail would have 10000 fossil commits!
- Plugged some memory leaks.

v14.8.0 ("Albatros"), 2015-04-30
--------------------------------

Puuuh!
I'm glad and happy to announce "Albatros" after about seven months of
development.  Development that brought many new features, bugfixes,
technical overhauling and behaviour tweaking.  Shall you ever have been
interested in BSD Mail or its deriviatives you might want to give it
a try.

"Albatros" is indeed the first version of the codebase as such that
should allow IMAP->Maildir->MBOX->Maildir->IMAP message roundtripping
without causing possible message splitting due to faulty From_
detection / encoding.  It also generates compliant MIME parameters.

Note there are incompatible changes, documented below.  And it is also
advisable to try out existing configurations with enabled *debug* and/or
*verbose* (-d, -vv) in order to check for "obsoletion" warnings.
(Here "obsolete" would refer to v15, of course.)

Credits and Thanks go to Ypnose, Jérémie Courrèges-Anglas, Josef Jurek,
Gavin Troy, Rich Salz, Martin Brandenburg, Bob Tennent, Dominic Meskys
and Peter Bray.

We welcome Jérémie Courrèges-Anglas, Josef Jurek, Rich Salz,
Dominic Meskys, Peter Bray, Dirk-Wilhelm Peters and Martin Brandenburg
in THANKS.
Apologies to Dirk-Wilhelm Peters and Martin Brandenburg whom i had
forgotten to add to THANKS at first glance once i've added this file; it
was nothing but an oversight.

I also say «Thank you» to GitLab.com – i've mirrored the S-nail git(1)
repository (alongside others) to this free service.

Credits finally also have to go to Coverity.com [1] which helped to find
some bugs; the claim of a 0.00 defect density after a Friday 13th test
must have been an error from their side, though, as well as that the
page [1] still remains at a test with a defect density of 0.01, since
i've posted yet another run that must have ended with 0.00.  (Note the
codebase was tested without IMAP code, i.e. my _next_ developer branch.)

  [1] https://scan.coverity.com/projects/444

NOTES, ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

$ In all the following noticable changes to the release candidate are
$ marked with a $ in the first column

+ Crawling along the path of CVE [topic/cve-2014-7844.2]: to enable MTA
  arguments after -- the new *expandargv* @372 must be set.  More below.

+ Even more crawling along the path of the CVE i decided to replace the
  wordexp(3) based shell word expansion mechanism with an entirely new,
  internally implemented restricted one, but complete mitigation will
  take time.  This has consequences in respect to backslash escaping in
  file names (shall you ever have used such a filename with S-nail and
  its predecessors, of course, and only ...).
  Please see [topic/fexpand.2] below.

+ A new member for the *attrlist* @351 variable (for unsure spam status).
  Since a user setting with a false length will be ignored yet causes an
  error message this is a backward incompatible change. [topic/spam.2]

- New make.rc option: WANT_ALL_SSL_ALGORITHMS (enabled).
  See make.rc and *smime-cipher-USER@host* @427 below. [topic/ssl.1]

- The make.rc option WANT_IPV6 is gone; we use the respective standard
  library facilities automatically whenever possible. [999e79a]

- New make.rc option: WANT_TERMCAP (disabled).
  See *term-ca-mode* @345 below.  [topic/termcap]

- The make.rc option WANT_SPAM has been dropped.  Instead we have (see
  [topic/spam.2] below for more):

  . WANT_SPAM_SPAMC (default off):
    Rather identical to the former WANT_SPAM (interaction with spamc(1)
    from spamassassin(1)), but internally improved.
  . WANT_SPAM_SPAMD (default off):
    Direct interaction with spamd(1) from spamassassin(1) via a local
    unix(4) domain socket.
  . WANT_SPAM_FILTER (default on):
    Freely configurable hook programs, e.g., bogofilter(1).

- It turned out that the manual wasn't mandb(1) compatible. [f5ab838]

- New make.rc option: WANT_FILTER_HTML_TAGSOUP (enabled).
  S-nail now ships with a very primitive HTML-to-text converter.
  It'll be used for HTML parts automatically if no pipe handler is
  installed (and the builtin mime.types haven't been changed).
  This works because of the new TYPEMARKER extension to mime.types(5) as
  documented for [topic/mime.types.2] below.
  (It is quite experimental but i think it rocks except it can be fooled
  since it doesn't know about double quoted strings, e.g., <a href=""
  onmouseover='javascript:alert("> This is plain text you see, oops");'>.
$ Yet it is ment for displaying HTML mails, and it works really well.
$ It doesn't support non-standard type="quote" attributes nor even-more
$ non-standard CSS classes "gmail_quote" or whatever it's name was --
$ these are used in the wild to generate automatic mail quoting, which
$ has resulted in an immense amount of top-posting; but maybe there will
$ be a S-nail v14.8.1 which will implement those, to ease the pain.
  [topic/html-tagsoup]

$- List output of `alias' @78, `ghost' @123 and `shortcut' @181
$ uses a new syntax that should (in theory) make it possible to feed
$ the output back into S-nail. [2913df3]
$ Ditto `set' @178 unless *bsdcompat* or *bsdset* are set. [373cc8a]

$- *keep* @308 will also affect secondary mailboxes (because *emptybox*
$ has been obsoleted, see below). [5fa5f8b]

$- New make.rc option: WANT_FORCED_STACKPROT (enabled with WANT_DEVEL or
$ WANT_DEBUG).
$ In conjunction with WANT_AUTOCC this will trigger stack protectors
$ if the detected compiler does support them.  (Before they were only
$ enabled if WANT_DEBUG was set, automatically.)

+ v14.8 is the last release with IMAP support, which has been removed
  from the developer's [crawl] branch for quite some time already.
  He really hopes he can affort to readd support sometime after v15.0.

ChangeLog
^^^^^^^^^

- S-nail now knows about named booleans (e.g., `localopts' @133 or
  interactive approval prompts can now be given any of 1/yes/true/on or
  0/no/false/off, case-insensitively; note this is true for the make.rc
$ system, too) and so-called "quad" options (either normal boolean or
$ "ask-BOOLEAN", which, in interactive context, will be prompted with
$ default values; the default value is chosen in non-interactive mode).
$ (on/off support not in the RC.)
  [topic/xify]

- The `if' @128 combo:

  . gained <, >, <= and >= tests;
    ==, !=, <, <=, >=, > will try to convert their arguments to numbers
    and perform their test numerically, if possible, [143d409]
  . `if' supports boolean (as above) arguments, [topic/ifpimp]
  . `if 1'+ return value fixed, [topic/ifpimp]
  . `if'+: on syntax error, NOOP anything 'till `endif', [topic/ifpimp]
  . `if'+ now support bracket groups, AND-OR lists and unary ! (not),
    note that the separating spaces are required: [topic/ifpimp]

      if [ [ true ] && [ [ $debug ] || [ $verbose ] ] ]
        echo Noisy, noisy
      endif
      if true && $debug || $verbose
        echo Left associativity, as is known from the shell
      endif
      if ! ! true && ! [ ! $debug && ! $verbose ]
        echo Unary operator support
      endif

  . `if'+ now support new case-insensitive (ASCII) substring operators
    =@ and !@: [topic/ifpimp]

      if $features =@ "regex"
        if $TERM =~ "^xterm.*"
          echo ..in an X terminal
        endif
      endif

$ . `if'+: the three argument forms can now be given variables also on
$   the right hand side: [topic/ifpimp]
$
$     set xtest='^xterm.*'
$     if $TERM =~ $xtest
$       echo Variables as right hand value
$     endif

- `unalias' @198 learned that * means "all aliases".
  Fixed: faulty list-head relinking caused "dead" aliases (since ever)
  [topic/names]

- `unshortcut' @219 learned that * means "all shortcuts".
  `shortcut' @181 in turn can now define multiple shortcuts in one go
  [topic/names]:

    ?0[ /var/mail/steffen]? sho you 'any one' me 'no "one"'
    ?0[ /var/mail/steffen]? sho
    shortcut me "no \"one\""
    shortcut you "any one"
    ?0[ /var/mail/steffen]? unsho*
    ?0[ /var/mail/steffen]? sho
    ?0[ /var/mail/steffen]?

- S-nail learned how to deal with mailing-lists in respect to
  Mail-Followup-To headers etc. (manual: "Mailing lists" @21):

  . new commands `(un)?ml(list|subscribe)' to let S-nail decide which
    addresses are mailing-lists, [topic/names]
  . *headline* learned %T format to display message recipient flags:
    "L" for a mailing-list, "S" for a subscribed one, [topic/names]
  . new variable *followup-to-honour*, [topic/mft]
  . new variable *reply-to-honour*, [topic/mft]
  . new command `Lreply', forcing a list-only `reply' if possible.
    When `Lreply'ing to messages which seem to originate from
    mailing-lists (contain a "List-Post:" header), then S-nail will
    treat the list address as a known mailing list (as via `mlist').

    (It is advisable to try out several different combinations of non-/
    subscribed mailing-lists in conjunction with `reply', `Reply' and
    `Lreply' with *debug* set in order to get used to how S-nail will
    modify the address lists; the results should be quite logical
    though.) [topic/mft]
  . For convenience `reply' and `Lreply' can now be used to reply to
    multiple messages in one go (each message will still be handled by
    itself, we simply start over internally). [topic/mft]

- `unset' @217 no longer "fails" for unset variables, but only prints
  a message in *debug* or *verbose* mode.  This changes traditional,
  decade-old behaviour, but shells don't even say something in (*debug*
  or) *verbose* mode, and it really simplifies things. [topic/okeys-attr]

- SSL/TLS changes: [topic/ssl.1]

  . new variables: *ssl-cert-HOST* @451, *ssl-key-HOST* @456,
    *ssl-method-HOST* @457, *ssl-verify-HOST* @461,
  . *ssl-v2-allow* has been dropped,
  . *ssl-verify* @461 and *smime-cipher-USER@HOST* @427 use
    case-insensitive matching for value checks,
  . new variable-chain: *ssl-protocol* @458 (the introduction of which
    obsoletes *ssl-method* @457, see below),
  . new variants of *ssl-cipher-list* @452: *ssl-cipher-list-USER@HOST*,
    *ssl-cipher-list-HOST*,
  . new variable: *ssl-config-file* @453,
  . *smime-cipher-USER@HOST* @427 dropped builtin support for the
    obsolete RC2-40 and RC2-64 ciphers -- use the make.rc option
    WANT_ALL_SSL_ALGORITHMS to readd support,
  . with SSL_CONF_CTX support (OpenSSL v1.0.2+) the values of the
    following variables (and variants) will be parsed by OpenSSL instead
    of S-nail, offering more user and packager flexibility:
    *ssl-cert* @451, *ssl-cipher-list* @452, *ssl-key* @456,
    *ssl-protocol* @458.

    E.g., shall a new OpenSSL ship with TLS v1.3 S-nail doesn't need to
    be adjusted in order to support TLS v1.3, all there is to do is that
    the user has to adjust her *ssl-protocol* setting.
    This is at least the theory. :)
    And maybe OpenSSL (will) offer(s) symbolic constants like "NEWEST"
    or "SAFEST".

- Folder hooks have been extended:

  . if there was no *folder-hook-FULLNAME* @376 we'll try
    *folder-hook-+NAME* if the mailbox NAME resides in *folder*, e.g.,
    the author has "folder-hook-+sent=MACRO" and all his *record*
    variables are "record=+sent", therefore MACRO can be shared in
    between all accounts with a single hook definition. [a5a4d89]
  . `localopts' @133 can now be used in folder hooks: the covered
    settings will be reverted once the folder is left again.
$   (I know for sure someone asked for this long ago, directly after
$   `localopts' came up first, but i couldn't find the corresponding
$   message.  Sorry!) [2c67091]

- More security control à la CVE 2014-7844, possibly for the first time
  enabling safe usage of S-nail via CGI: [topic/cve-2014-7844.2]

  . fixed *sendmail-arguments* @420 parsing:
    *sendmail-arguments*='-F "Dubi Da"' will now result in <"-F" "Dubi
    Da"> not <"-F" ""Dubi Da"">,
  . new command line argument "-." @67 forcefully terminates options
    and enters send mode.  I.e., using this option avoids possible
    misinterpretation of the following arguments.

    This operation is usually reserved for --, but since S-nail passes
    anything after -- to the MTA (but read on) i had to invent something
$   else.  Also, -. forcefully enters send mode, which -- couldn't have
$   been overloaded to do.
  . New variable: *expandargv* @372: in equal spirit to *expandaddr* @371
    this one is required in order to pass arguments after -- to the MTA.
    If set to "fail" existence of such arguments is a hard error,
    "restrict" likewise except in interactive mode or in conjunction
    with the -~ or -# options.
  . *expandaddr* @371: new special value "fail" causes presence of
    extended recipient addresses to be treated as a hard error.
$   In fact this is now interpreted as a comma separated list and may
$   also include the string "noalias", disallowing non-network-addresses
$   in the remaining (non-"extended") recipient addresses -- note this
$   applies to system global aliases only, not to those of `alias'
$   (except for their content, of course); "noalias" is a hard error in
$   combination with "fail".

- `unaccount' @197 and `undefine' @201 learned that * means "all
  accounts" and "all macros", respectively. [4c09114]

- Spam handling has been rewritten completely, revealing a very old
  misbehaviour in nail's subprocess handling (malloc in signal handler).
  Please reread the manual section "Handling spam" @37 for more.
  The motivation was also that bogofilter(1), sylfilter(1) etc. can
  export their databases, so should the author ever find time to
  implement spam handling in C like his predecessor it will be possible
  to continue to use those databases: [topic/spam.2]

  . *headline* @380 format %$ has been fixed,
  . when working on multiple messages the operation is cancelled if an
    error occurs,
  . new variables: *spam-interface* @436 chooses the, well, ...
    This one has extensive documentation.  Plus the interface dependent
    *spamc-command* @438, *spamc-arguments* @439, *spamc-user* @440,
    *spamd-socket* @441, *spamd-user* @442,
    *spamfilter-ham* @443, *spamfilter-noham* @444,
    *spamfilter-nospam* @445, *spamfilter-rate* @446,
    *spamfilter-spam* @447 and *spamfilter-rate-spamscore* @448.
  . The *attrlist* @351 variable gained a new slot for an unsure-spam
    status (default character is ~).
    Messages with that flag can be specified via the :S colon modifier.

- Fix: even though -# @66 implies *sendwait* @335 a user should have the
  option to turn *sendwait* off again. [4274bed]

- Completely reworked mime.types(5) handling, note the backward
  incompatible drop of `mimetypes': [topic/mime.types.2]

  . dropped the `mimetypes' command,
  . new commands: `mimetype' @138 and `unmimetype' @209,
  . *encoding* @369 is now parsed case-insensitively,
  . *mime-counter-evidence* @390 gained new bit 3 to indicate the desire
    to forcefully overwrite MIME types if we think we know it better,
  . *mimetypes-load-control* @391 gained an extension that can be used to
    load more and specific files, which in addition may make use of
    a new non-portable S-nail-specific TYPEMARKER extension.  The manual
    section "The mime.types files" @32 has been rewritten accordingly.
    (In short: mime.types(5) lines can be prefixed by @, @h@ or @H@, for
    plain text, builtin HTML filter (plain text fallback), ditto
    (without fallback).)
$ . The builtin MIME types now make a lot of use of the @ and @h@
$   TYPEMARKER extensions, so that you possibly can get rid of a lot of
$   pipe-TYPE/SUBTYPE=@ plain-text type hooks, shall you have used them.

- Support for RFC 2231 has been added.  This means that S-nail generates
  truly MIME compliant messages and no longer requires help from other
  MUAs!  In fact MIME parameter handling has been rewritten completely.
  [topic/rfc2231]

- On the long run shell word expansion (via wordexp(3)) will be replaced
  by a new, restricted (and thus (hopefully) safer), internally
  implemented path expansion mechanism that only supports ~/ -> HOMEDIR
  and $SHELLVAR / ${SHELLVAR}.
  Since the original expansion is *so* hardwired that'll take time, for
  now it is used for attachments only, but here all through the way.

  But where it is used already it has consequences regarding backslash
  escaping; to improve user experience a bit `~@' @239 will display the
  escaped filename so that users only have to hit ENTER to accept paths:
  e.g., "diet\ is \curd.txt" will show up as "diet\\ is \\curd.txt".
  And, e.g., the test script does the following for RFC 2231 (excerpt):

    MAILRC=/dev/null "${SNAIL}" ${ARGS} -Snodot \
      -a "ma'ger.txt" -a "mä'ger.txt" \
      -a 'diet\\\ is\ \\curd.txt' -a diet \"is\" curd.txt \
                                         ^      ^ NOTE: 0x00A0, NBSP
      -a ✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆✆.txt

  The introduction of the manual section "COMMANDS" @5 has been updated
  accordingly.  Also see -a @39.  [topic/fexpand.2]

- Assorted changes:

  . Multiple crash-causing bugs regarding `source' @185, also if used
    via `~:source', have been fixed. [aafb688,6979c73,4c6dfc2]
  . The NAILRC environment variable is no longer supported. [104c254]
  . The *Replyall* variable has been dropped as it was only an alias
    for the POSIX standard *flipr* @296 variable. [topic/mft]
  . New variables: *version*, *version-(major|minor|update)*,
    *features*. [topic/okeys-attr]
  . `varedit' @224 can be used to create variables. [topic/okeys-attr]
  . New variable: *charset-unknown-8bit* @357. [9b672f6]
  . *smtp-auth* @434 now defaults to "plain" (if *v15-compat* is set).
    (Josef Jurek, Gavin Troy) [dcbb31a]
  . All obsoleted: *autothread*, `thread' and `unthread'.
    Use *autosort*=thread, `sort thread' etc. instead. [ef16f43]
  . *showlast* @336 should have gained meaning. [4213d52]  (Gavin Troy)
  . If the -r @57 option is given a full name specification (rather
    than only an address), pass the MTA the respective address parts
    via -F and -f. [dd90c14]
$   Also try to pass -F _and_ -f if an empty argument was given to -r
$   but *from* @378 (or, say, "From:") includes a full name. [5f68921]
  . New variable: *term-ca-mode* @345 (for WANT_TERMCAP).  In
    interactive mode S-nail can now be forced to use ti and te termcap
    entries; in conjunction with a PAGER that does too ... [topic/termcap]
  . `ghost' @123 gained a new mode and tweaks (see manual). [8a49b12]
  . -r @57 option: fixed -h output and manual. [9a1a303]
    (Martin Brandenburg)
  . With *debug* or 2x *verbose* command lines (including those read
    from files) are now traced. [06042c4]  (Bob Tennent)
  . NAIL_TMPDIR (new) and TMPDIR environment variables are now
    (guaranteed to be) set in pipe hooks. [a1cfb02]
  . "Subject:" Re: trimming: MIME decoding is now performed. [ede7c7d]
  . New variants of *pop3-bulk-load* @320: *-[USER@]HOST*. [5f5ae10]
  . *crt*=0 @366 now really works. [22f1477]
  . Maildir code now uses string relaxation which drastically reduced
    memory usage for large mailboxes. [d1c945f]
    And for the first time it performs real memory cleanup. [e549110]
  . Improved error message on MTA exec failure.  (Dominic Meskys)
  . Fix: "setenv noVAR" would have set noVAR. [3c1f886]
  . When `setenv' is used to set any of HOME, USER, TMPDIR it'll be
    reflected by our internal variables.  (Still hacky as special code
    is needed to do so; also "set HOME=x" shadows HOME for "varshow
    HOME" instead of being rejected.  Future cleanup work.) [3f03b80]
  . Colon modifiers can now be joined, as in "f :uas". [8b6c259]
$ . Maildir code did faulty From_ line detection, resulting in any
$   non-quoted "From " line to start a new message (e.g., when doing
$   things like "copy * MAILDIR" we could have f...ed up completely).
$   Seems to have been added with Heirloom mailx 11.6 ([faf4b65],
$   2004-09-07).  Neither goes credit to Jacob Gelbman nor to Robin
$   Stjerndorff for messages to nail-devel@ on 2015-01-21 and
$   2015-02-20, respectively.  :-)) [ae539c9]
$ . *emptybox* has been obsoleted.  *keep* @308 will also affect
$   secondary mailboxes, and then both only deal with local regular
$   MBOXes anyway, not to e.g., maildir files nor IMAP boxes. [d747c0a]
$ . `unghost' @207 learned that * has to drop all ghosts. [34a92a5]
$ . NAIL_TMPDIR (new) and TMPDIR environment variables are now
$   (guaranteed to be) set for *agent-shell-lookup* @350. [5c3d7b5]
$ . Things like "copy * MAILDIR" from within an IMAP (or POP3?) mailbox
$   to a Maildir mailbox should now work again. [d747c0a]
$ . IMAP code did faulty From_ line detection, resulting in some
$   non-quoted "From " line to start a new message (e.g., when doing
$   things like "copy * MAILDIR" we could have f...ed up completely).
$   Present in Heirloom mailx since ever ([^b4ad9f2]). [66e3c93]
$ . New variable: *mbox-rfc4155* @312: because of all the bugs in From_
$   quoting etc., err, no.  "Albatros" will last.  I've just touched
$   a lot of stuff regarding MBOX writing: From_ quoting (which may
$   happen whenever we save already existent data in a MBOX, shall
$   the original generator not have taken appropriate steps to ensure
$   "false" From_ lines can't happen (S-nail does)) is now definitely
$   POSIX compliant, meaning that we may quote much too much lines.
$   So set *mbox-rfc4155* and we generate RFC 4155 compliant MBOX files,
$   possibly leaving behind backward POSIX-only software. [70ba3ef]
$ . New command line option: "-X cmd" @64 will execute "cmd" right
$   before normal operation starts.  The only option to execute commands
$   in non-interactive mode when reading of resource files has been
$   actively suppressed.  This is an experimental feature. [d202869]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

. Improved output flushing, avoidance of printing of useless
  output (especially smoothens *editalong*). [topic/stdout-fflush]
. String relaxation is now everywhere (but IMAP), the builtin buffer
  sizes were reduced to 1/3.
. Again a manual review.  The manual now supports mdocmx(7).
. Using builtin ARC4 pseudo-random for random generation.
. Better signal handling here and there.
. Fixed most "unpluggable memory leaks" by plugging them via chains of
  signal handlers and longjmps.  Terrible.  But no more leaks.
. A lot of this and that.  (Really.)
$. Slightly more tolerance for faulty Base64 encoding in message text
$ parts.  No real healing possible today, but requires v15.0 environment.
$ This, however, only affects invalid data that, e.g., OpenSSL doesn't
$ even give any output for! [54137fd,4d59cca]

I didn't make it to improved message selection.
And i also can't seem to find the necessary peace of mind to do a real
review with this codebase, it's always that i start off doing something
non-reviewish; but i'll see the day (what i hope).

v14.7.11, 2015-01-04
--------------------

A cumulative bugfix update release.

Credits to Marius Nestor, Tim and Johannes Löthberg.
Apologies to Ypnose, Mantas Mikulėnas for not really listening.  Thanks!
Special apologies to Mantas: i forgot to credit him in commit [fda7acd].
We welcome Marius Nestor and Tim in THANKS.

NOTES, ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Our nail.rc now sets *keepsave* by default. [38fdacb]

ChangeLog
^^^^^^^^^

- ~t will no longer loop infinitely.
  Bug introduced nail "[9.27] released 5/13/01". [a105121]

- We now support -h and --help command line options. [7409040]
  (Marius Nestor)

- Fix autosort crash in non-thread mode.
  Bug introduced together with threaded display in
  nail "[11.2] released 8/15/04". [4064771]

- Two fixes for IMAP credential lookup without a set *v15-compat*:
  1. Faulty password reuse. [fda7acd]
  2. Missing duplication of a string could crash S-nail. [21c05f8]
  3. The latter was not detected during my (anyway too shallow) testing
     because a long time back i didn't implement memory trashing for our
     HAVE_DEBUG memory wrapper: caught up. [6ef2c13]
  (Tim, Ypnose, Mantas Mikulėnas)

v14.7.10, 2014-12-18
--------------------

A bugfix release of v14.7.9 which fixes `ghost' processing
and reenables further command line arguments of ghosts, as in

  ? gh ll !ls -Flar
  ? ll | grep nail

In v14.7.9 the " | grep nail" part would not be recognized since
a terminating NUL character would be placed before it (which in
the C programming language means "end of string").
It is a one line patch, commit [f86f7aa].

v14.7.9, 2014-12-17
-------------------

This is a subminor release to address CVEs 2004-2771 and 2014-7844 [1].

These CVEs address decade old documented behaviour that was supposed to
be classifieable under "feature" rather than "bug": it is possible to
use file and pipe addresses, as in "./out.mbox" or "|cat > out.mbox" and
have the mail delivered accordingly.
They enforce a new option *expandaddr*, unset by default, which
specifies wether such special addresses shall be supported or not.

Thanks to Jürgen Daubert and Peter Hofmann.

  [1] http://seclists.org/oss-sec/2014/q4/1066

ChangeLog
^^^^^^^^^

- In -v / *verbose* mode SSL/TLS certificate date and time information
  will be printed; until now we only supported UTC times which could
  result in false messages stating that the datetime is bogus. [16ef155]

- *netrc-lookup* could have matched ambiguous entries. [debbf98]

- *sendmail-arguments* works without "allocating" more destination space
  by adding space characters to the string. [1c7daaf]

- Always terminate MTA option processing with "--".
  Part of addressing the CVEs as above: prevent system-wide aliases that
  start with a hyphen to be interpreted as arguments to the MTA. [597249b]

- New value: *expandaddr*, as above.
  Extending the CVE S-nail's *expandaddr* can be set to the value
  "restrict" in which case even a set *expandaddr* doesn't enable file
  and pipe addresses in non-interactive mode unless -~ or -# command
  line options were given. [ba8c596]

- fio.c:_globname(): use WRDE_NOCMD if available.
  Part of addressing the CVEs as above: prevent command substitutions
  when expand() strings (mailbox names). [7c7134b]

- Drop the "line" statistics counter that could be seen when `copy'ing
  or `save'ing messages, only keep the "byte" counter.  The former was
  a lie since it counted the lines of the source- rather than of the
  destination message.  Bug introduced on 2007-07-16 (in [670ea1c]).
  We'll reintroduce correct statistics once we can generate them.
  Could crash S-nail because it assumed false (readonly) buffer sizes.

  I give the credit to Peter Hofmann since i think this is why he
  insisted on very long, soft-newline continued quoted-printable lines
  back in the day.  Wasn't seen since the stdio buffer sizes on
  practically all operating systems are pretty large, and the access in
  the buffers was read-only (so no canary cheep). [effb676]

- Until now blocks inside of `if' etc. were evaluated (as noops) even if
  the conditional block was as such a noop.  Therefore non-existing
  commands etc. would have been recognized as errors.  From now on this
  is no longer true. [c41d564, dc15be6]

- `ghost's can now defined without quoting. [f183818] E.g.:

    -? ghost ls '!ls -latro'
    +? ghost ls !ls -Flatr

v14.7.8, 2014-09-29
-------------------

I would like to give prominence to Gaetan Bisson.

- Fix: "make test" works when no "s-nail" binary is produced, as via
  "make SID= NAIL=mail all".  (Gaetan Bisson) [d704599]

- Fix: on NetBSD and FreeBSD snprintf(3) follows POSIX and fails to work
  if the "size_t n" argument is larger than INT_MAX.  Linux systems
  don't have this problem (presumably the function fails if buffer runs
  out, but who knows, this is GNU software ;), and OpenBSD reduces any
  "n" >INT_MAX to INT_MAX.
  But anyhow, what S-nail did is not standard conforming, and since this
  version is hopefully used for many months i think this -- actually
  a bug -- is worth fixing with a subminor release. [3b19639, cb674bd]

v14.7.7, 2014-09-27
-------------------

Thanks to Jan Chaloupka, Frantisek Holop, Matthias Kilian and
Peter Hofmann.  We welcome Frantisek, Matthias and Peter in THANKS.

NOTES, ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- 1. No need to change anything.

  2.1. The build system has been reworked a bit, `conf.rc' has been
       renamed to `make.rc'.
  2.2. It is now possible to say 1/yes/true 0/no/false,
       case-insensitive, e.g., "WANT_ICONV=yes".
  2.3. Some options can be "require"d: a failure to fulfill the request
       causes the configuration step to fail, e.g.,

        $ make WANT_ICONV=require WANT_SMTP=require WANT_SSL=require all

       Should fail unless all of iconv(3), BSD sockets and OpenSSL
       are available.
  2.4. This can be improved.  (E.g., there should be warnings if an
       option is required that doesn't support this mode.  Or -- all
       options should be requireable.  Hm.)
  [topic/mandconf]

- The build system should now correctly auto-detect $MAILSPOOL and
  $SENDMAIL!?! [c1a51bb]

  P.S.: why are you guys setting those explicitly?
  It is a BUG if that doesn't work automatically!

  P.P.S.: Packager heroes! Packager heroes!! Packager heroes!!!

  P.P.P.S.: .. and a nice weekend ;)

- "make test" will now regulary test S/MIME when available.
  (A few tests have been added, to test the QP issue and to test the RFC
  2047 MIME rewrite; which is still intermediate though.)

- 2014-09-27: add-on:
  you may see more warnings for format strings which use the
  "size_t" integer type, and in the future even more of these will
  happen -- please read `INSTALL' again for more on that, but be
  ensured that we still compile-time-assert that the format
  strings fits the type size.  (Enable ISO C99 mode for your
  compiler will cause any warnings to vanish.)

ChangeLog
^^^^^^^^^

- FIXES: Maildir folders will now display correct content even after
  `newmail'.  (Matthias Kilian; Frantisek Holop for nudging!) [158cfb6]

  Also *newmail* was somewhat broken since introduction of `File'
  command (missed updating a function argument back then). [58017a8]

  And unfortunately the readonly state of a folder could be forgotten
  after `newmail', too. [0cd5c9e, 0679ee4]

- *quote-fold*: fix faulty line length calculation when a line started
  with a lot of leading whitespace. [731b8c9]

- Fix: calculation of required memory for quoted-printable encoding was
  faulty for very long input that forces soft newline insertions.
  (Peter Hofmann) [c299c45, b043cfc, d105d80]

- `headers' was falsely documented. (Jan Chaloupka) [ee76a42]

- Complete rewrite of RFC 2047 header encoding.
  (Credit to Peter Hofmann because he peeked shitty MIME handling)
  [0add96e]

  Remark:
  S-nail doesn't yet support RFC 2231 and thus our RFC 2047 support is
  incomplete; also stateful character encodings, like ISO-2022-JP, are
  still not supported and thus we're in fact non-compliant.
  The same that it ever was.
  Well, we're not alone, and e.g. mutt(1) offers
  a "rfc2047_parameters=yes" option to deal..., also with us.
  I really hate to say that.
  But of course we all know that the mail standards are inherently
  braindead anyway, right?  O-ho, yes, they are like that.
  I hope S-nail isn't part of the problem no more in 2016.

- Oh, the [topic/retrim] in v14.7.6 actually missed a single occurance
  of fixed Re: checking! [ed1c865]

- Allow $USER to be set to the empty string and no longer abort(3) if
  the user is not known, but instead exit(3) with value 67 (BSD
  EX_NOUSER constant from /usr/include/sysexits.h).

    $ USER= LC_ALL=C s-nail ...

  [a846fdb]

v14.7.6, 2014-08-15
-------------------

Thanks to Georg Schlisio.

Several bugfixes: it's definitely more than enough now, v14.7.8 in mid
2015 will have to and will definetely ship with a test series.

NOTES, ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- The global default nail.rc file now sets *sendcharsets* to
  'utf-8,iso-8859-1', i.e., the order has been reversed.
  (Georg Schlisio)

  Also *bsdflags* is no longer set by default. [e39679b]

ChangeLog
^^^^^^^^^

- Fix: in some configurations a `resend' message would end up with two
  'Resend-Date:', instead of one such and a 'Resend-Message-Id:' field.
  [21b9218]

- The internal exit status of a `mail' command will now be 0 upon
  success and 1 on failure, not vice versa. [1112375]

- FIX: dependend on the set of retained / ignored etc. headers a MIME
  part with a *pipe-CONTENT/SUBTYPE* set to the special '@' plain-text
  command would try to execute a command equal to the name of the last
  header of the MIME part, most often 'Content-Disposition:'.
  [dee1fed,686a383]

- Detected that the `fwd' / `forward' command(s) used the false (imho)
  mode to strip the address from the command line, now it's possible to:

    ? fwd MSG-SPEC "my friend <his@addr>"
  [1c4e164]

- New variable *reply-strings*.  It's more unlikely now to end up with
  threads which read 'Re: Aw: Re: Aw:' etc. [topic/retrim]

- Because of user inconvenience, introduce a temporary hack not to mince
  user input lines in history entries, even if this means that each and
  every line is first duplicated before it is used.  So now the `fwd'
  command as above will enter history in the given form. [f1ded4c]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Fixed one missing IMAP / IMAP-cache string relaxation restore.  (In
  about six weeks or so this condition hit me once). [66ef04f]

P.S.: I still see an occasional IMAP-cache crash that occasionally
  happens after several connects and diconnects without intervening
  folder changes; after being bitten once by that even after commit
  [cf7f63d] it seems this is a deeper structural problem, but i'll try
  to track that down for v14.8.

v14.7.5, 2014-08-01
-------------------

Jan Chaloupka (jchaloup AT redhat DOT com) reported on nail-devel@ that
Heirloom mailx can be crashed by setting *smtp* in combination with with
*from* effectively set to a NULL string.  I first was optimistic, but it
turns out S-nail can, too.

v14.7.4, 2014-07-15
-------------------

Fixes maildir code which was broken in May (too).
Readds auto-detection of compressed boxes (i.e., if `$ Fi mybox' is
executed and `mybox' doesn't exist, but `mybox.bz2' does, then the name
is automatically expanded and `mybox.bz2' is used instead).
Sorry for the inconvience.

v14.7.3, 2014-07-14
-------------------

Thanks to Mantas Mikulėnas (grawity AT gmail DOT com).

This is a bugfix release which fixes a regression in the handling of
user credentials when *v15-compat* is not set, introduced in v14.7.1,
quoting Mantas:

  In other words, $folder *requires* the @ to be percent-encoded, but
  $password requires the *opposite*.

And that is not valid when *v15-compat* is not set.

v14.7.2, 2014-07-12
-------------------

Thank you: Gavin Troy, Bob Tennent (rdt AT cs DOT queensu DOT ca),
Tarqi Kazan.

NOTES:
^^^^^^

v14.7.2 brings incompatible credential lookup changes when *v15-compat*
is set; the lookup order now is:

- *user-HOST*, *user*, [.netrc] ...

- *password-USER@HOST*, *password-HOST*, *password*, [.netrc] ..

Changelog in reverse order, oldest first.

ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- New configuration option WANT_AGENT to support *agent-shell-lookup*
  (, -HOST, -USER@HOST) lookups of potentially encrypted password
  storage (inspired by Gavin Troy) [b2d41d3,516a7f0]

- MAILSPOOL is now automatically set to /var/spool/mail if that
  directory exists, only otherwise we use /var/mail [4a83018]

- WANT_GSSAPI is again enabled by default - Tarqi Kazan has correctly
  pointed out that the system environment at compilation time is likely
  to reflect the politics and/or preferred configuration of packagers,
  and self-compilers have always the chance to configure themselves
  (Tarqi Kazan) [398eb29]

ChangeLog
^^^^^^^^^

- `un{,save,fwd}{ignore,retain}': let '*' mean 'all fields' [a1f1da9]

- Bugfix: `setenv' takes 1-1000 arguments, not exactly 2 [daf2ea8]

- New command: `varedit' edits the value of an existing variable in
  $EDITOR [93070d2]

- New commands: `File' (and `Folder') explicitly open a mailbox in
  readonly mode, thus finally offering the possibility to avoid flag
  updates etc. whenever so desired [b1f5f2d]

- Bugfix: since May the header display would display tabulators in an
  UTF-8 environment as replacement characters [870b314]

- *mime-counter-evidence* now is a valued option.  Set bit two (value
  two) and the detected real MIME type is carried along with the MIME
  part so that it is used instead of `application/octet-stream' to
  lookup possibly registered *pipe-CONTENT/SUBCONTENT* handlers.
  (Bob Tennent) [81473f8]

  Also pipe handlers will now be passed several MIME informations via
  environment variables, please see the manual for more.
  (inspired by Bob Tennent)

- Resource file loading now prints a diagnostic when loading was stopped
  due to a processing error.  This behaviour is also required by POSIX.
  (Bob Tennent) [fd42684]

- Incompatible changes in credential handling, as above.
  [25d7735,3cdb6a3]

- *netrc-lookup* is now a real chain and has -HOST and -USER@HOST
  variants (though the latter only for password lookups) [59fc226]

- .netrc machine names are now lowercased before use [28c6fee]

- The manual has seen some reorderings, a TOC will be shown if you
  '-dWANT_TOC=1' when using *roff(1) (as has been done for the online
  manual)

- There is a new file `THANKS' [6b5cb3e]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- IMAP and IMAP cache now use string relaxation which *drastically*
  reduces memory usage on large mailboxes [e5598ce]

- Fixed compilation on old OpenBSD installations without wordexp(3) as
  well as with GSS-API and WANT_AMALGAMATION and now using #pragma's to
  get rid of some warnings [topic/ccstuff]

v14.7.1, 2014-06-24
-------------------

Thanks to Georg Schlisio (g DOT schlisio AT dukun DOT de),
Wiesław Magusiak (wiemag AT poczta DOT onet DOT pl), Tarqi Kazan and
Karol Blazewicz.

Very special thanks: Gavin ".. .. Speeding kills. .." Troy from Ireland
and Ypnose "Gloria?? C'est une mouton!" from France.

Changelog in reverse order, oldest first.

ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- WANT_NOGETOPT is gone. [73f0605]

- WANT_NETRC: new option (on by default; see below). [topic/netrc]

ChangeLog
^^^^^^^^^

- Manual slightly improved in respect to LC_ALL etc. settings.
  The knowledge treshold value is much too high for a normal user;
  i hope that at some later time we can offer much more (at least
  optional) automation on the protocol level (e.g., timeout values,
  protocol features supported by servers etc.), at which time we will be
  able to make the manual more user friendly. (Georg Schlisio)
  [56fab16,bd1e11f; ArchLinux Wiki]

- The `@' search command has new "header" keyword, which searches in all
  headers.  Shortcuts: "<" = "header", ">" = "body", "=" = "text".
  ("body" and "text" still perform full text searches _including_ MIME
  part header content.)
  [b0138a7]

- The -O command line option is legacy and will vanish in v15.0.
  Arguments to the MTA can henceforth be passed after a `--' separator
  on the command line, as in
    echo bla|s-nail -vvd -s sub some@where -- MTA ARGS MADE EASIER
  [topic/mtaarg]

- New *sendmail-arguments* option; content will be (converted to list
  and) joined onto other MTA command line arguments (Wiesław Magusiak)
  [topic/mtaarg]

- *colour-pagers* is gone -- instead we have *colour-pager*, which is
  a boolean and off by default.  We again set LESS (and LV) environment
  variable(s) to automatic turn on colour support in $PAGERs, but only
  if the variable in question is not yet set.  (That is -- in order to
  get coloured $PAGER you at least have to set *colour-pager* now.)
  (Tarqi Kazan) [b794f5e]

- Terminals no longer need to be added to *colour-terms* if their name
  (in $TERM) includes the string "color". (Gavin Troy) [ce2c7f6]

- Karol Blazewicz opened a discussion in the ArchLinux Forum (s-nail
  14.7-1 doesn't work [1]) but i didn't realize his actual problem --
  luckily Gavin Troy wrapped his head around the real problem, and that
  finally opened my eyes against a whole can of worms in the new URL
  and credential handling!

  Then Ypnose also came along and reported an issue with IMAP handling
  that was related to the compatibility credential handling of the new
  URL and credential layer.

  (Gavin Troy, Ypnose, Karol Blazewicz) [a5c40ba]
  [1] <https://bbs.archlinux.org/viewtopic.php?id=182653>

- We now also have -HOST and -USER@HOST *smtp-use-starttls*. [bfb186a]

- Gabby history entries will now be saved and restored as such, in case
  *history-gabby-persists* is set.  (For this to work properly
  a possibly existing history file needs to be reset.) [b5502cc]

- We now have optional .netrc support (*v15-compat* set).
  Set *netrc-lookup* and we'll look in $NETRC / ~/.netrc for user
  credentials.  The `netrc' command will show or clear the entry cache.
  E.g., this is my new account macro:

   set v15-compat ssl-method=auto
   set netrc-lookup
   set smtp=smtps://smtp.yandex.ru:466 smtp-auth=plain smtp-hostname= \
         hostname=yandex.com
   ghost xp 'fi %:pop3s://pop.yandex.ru'
   ghost xi 'fi %:imaps://imap.yandex.ru'

  As an extension to the .netrc syntax we support a single
  introductional subdomain wildcard, e.g., my relevant ~/.netrc entry:

    machine *.yandex.ru login NAME password PASS

  Following a suggestion of Gavin Troy we have multi account support,
  i'm not quite sure wether this is portable across .netrc using
  applications, e.g., i could have written the above like

    machine *.yandex.ru login NAME
    machine *.yandex.ru password PASS
    machine *.yandex.ru login NAME2

  (I hope i don't lie and this really works.)
  (Suggested by Gavin Troy and Ypnose, testing and feedback Gavin Troy)
  [topic/netrc]

- Add primitive support for RFC 3798 via the new
  *disposition-notification-send* variable.  This is not yet
  a truly conforming implementation (it simply injects the necessary
  header) and it requires the *from* variable to be set.
  More in the far future, sorry. (Wiesław Magusiak) [ca31d32]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Interrupt protection during (recursive) macro calls with `localopts'
  on should now no longer be crashable at all.  Quote [a4e85c0]
    It is of course all pretty intermediate until we have a signal
    manager and we can actually poll signal states at those places where
    we are capable of and desire to handle them.  But it should work
    today and look nicer than it did.
  [25caeb9,592499f,a4e85c0]

- `ghost' handling performs more strict name checking on ghost names in
  order not to allow names which would later not be parsed as a whole.
  [1523a6d]

- Dropped catopen(3) support (we never really had it)!  We will have
  a new S-nail-specific gettext(3)-alike thing in v14.8.
  [topic/i-wanna-have-a-dog]

v14.7, 2014-06-07
-----------------

Thanks go to Tarqi Kazan (tarqi AT cfs DOT or DOT gs) and Johannes
Löthberg (johannes AT kyriasis DOT com), as well as Martin Neitzel.
(And the winner is... Gavin Troy for his role in "Silence from Ireland".
Yay!)

Notes
^^^^^

- Since S-nail now performs more-or-less proper percent-encoding as per
  RFC 3986 users of *imap-cache* have to (either throw away and recreate
  or) adjust their local cache, e.g. as follows (adjust CACHEDIR and
  echo(1) to mv(1) as necessary; won't work with paths with whitespace):

  $ CACHEDIR=${HOME}/traffic/.mail-cache; \
  find ${CACHEDIR}/ -depth -type d |
  while read d; do
    b=`basename ${d}`
    r=`echo ${b} | sed -e s/:/%3A/g -e s/@/%40/g`
    if [ ${b} != ${r} ]; then
      d=`dirname ${d}`
      echo ${d}/${b} ${d}/${r}
    fi
  done

ChangeLog
^^^^^^^^^

- New variable *history-gabby* can be set to add much, much entries into
  the history than is done normally.
  For the NCL only, setting *history-gabby-persist* will cause those
  entries to be saved into *NAIL_HISTFILE*, too, which they are not by
  default with it (the other command line editors should always save).
  [6026507]

- The `online' alias for `connect' has been obsoleted. [d5cfde4]

- New CONFIG=MAXIMAL make option. [c0d4087]

- Support compilation on new OpenBSD with their reduced OpenSSL clone.
  This topic also includes the real solution for getting rid of
  a strcat(3) warning that i reintroduced with s-nail-14_5_2-smime.patch.
  [topic/obsd56]

- Our -r command line option is now mapped to a `-f' MTA option -- the
  sendmail(1)-compatible `-r' is long obsoleted! (Johannes Löthberg)
  [d0ead39]

- New `elif' command so that we now have if..elif..else..endif.
  If the optional regular expression support is available the new
  conditions `=~' and `!~' can be used to perform (case-insensitive)
  regex matching with `if' and `elif'. [topic/condsplus]

- New `~R' tilde escape (like `~r', but indent lines). [fae1f29]

- Improved multibyte-safety (e.g. for *prompt*) and a bit of
  compatibility ("support" would be a wording much too strong) for
  bidirectional text via the new *headline-bidi* variable.
  [topic/unibidi, topic/mbbidi]

- Diversified behaviour of -v command line option as well as *verbose*
  to support multiple levels of verbosity; the latter is now ternary
  when set and boolean when unset.
  This was the ground on which SSL certificate validition verbosity was
  implemented (*verbose* level 1: certificates, level 2: network
  communication et cetera), though much is left to do.
  This has been suggested long ago by (Martin Neitzel). [topic/smverb]

- ^C in compose mode with *ignore* set acts now POSIX compatible
  [0275d09]

- If *encoding* is set to base64 then we don't ignore that user
  wish and use quoted-printable (when 7bit doesn't suffice) [2ca201f]

- New `urldec' and `urlenc' commands. [63e869e, fbd95e8, 0af5b1b]

- New `setenv' and `unsetenv' commands. [5e2ed79]

- Support for GSS-API authentification has been added (request and
  testing by Tarqi Kazan).

  Note that the following implicit relation is gone:
    *smtp-auth*
      If set to `login', or if unset and smtp-auth-user is set, `AUTH
      LOGIN' is used

  This topic branch also added support for the SUBMISSION protocol of
  RFC 6409, so re-reading the *smtp* manual may bring benefits.
  [topic/smtp]

- A new, backward-incompatible URL syntax and credential lookup scheme
  has been introduced that is accessible when the new *v15-compat*
  variable is set.  If used, credential lookup occurs before a network
  connection is made.

  The new manual section "URL syntax" describes the new credential
  variable chains, and documentation of *from* should be read again, as
  i now also refers to the new *smtp-hostname* variable.

  Note that the generated `Message-Id' has also changed.

  (Messy old way pointed out by Tarqi Kazan)
  [topic/url, topic/cred]

- `resend' should be truly fixed and (fwiw) can also resend to pipe and
  file addressees. [topic/resend]

- Support for empty lines in macro and account definition blocks (as
  required by POSIX for startup files in general) [43cdf92]

- The nail command line editor gained the possibility to use PgUp /
  PgDown / Home / End instead of z[-+0$] commands on xterm-compatible
  terminals; and ^O equals a `dp' there, too. [8c57be2, 7c30e61, 95e672f]

v14.6.4, 2014-04-07
-------------------

Many thanks to Gaetan Bisson.

ChangeLog
^^^^^^^^^

- Avoid segmentation faults with -L option if s-nail is opened on
  non-existent mailboxes, e.g. '$ MAIL= s-nail -Lx'.  (Gaetan Bisson)
  [e6c86da]

v14.6.3, 2014-04-05
-------------------

Thanks and greetings to Gavin Troy, Gaetan Bisson and Tarqi Kazan (tarqi
AT cfs DOT dyndns DOT biz).

ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- WANT_AUTOCC knows that clang(1) version 1 can dig -Wstrict-overflow=5.
  [2f77640]

- '$ make test' should work even if you are not steffen.
  (Gaetan Bisson, Gaetan Bisson, Gaetan Bisson, Gaetan Bisson,
  Gavin Troy, Gavin Troy) [8b796ba]

ChangeLog
^^^^^^^^^

- *autoinc* is gone -- this is *newmail*. [07a8462]

- Working with large(r) IMAP boxes should work again without causing
  segmentation violations. (Gavin Troy) [761dd87, b0ce180]

- With our builtin getopt a.k.a. WANT_NOGETOPT=1 usage of the -L option
  caused segmentation violations. (Tarqi Kazan, Gaetan Bisson) [f2c2646]

- The decision wether we need $PAGER or not now also incorporates the
  informational lines we inject for messages. [316b4cd]

- Drop `defines', add `unaccount', rename `undefine'..
  The `defines' command has been united with `define' -- just like
  `account' will list all defined accounts when used without arguments
  `define' will now do so for macros.  And `undefine' is the new name of
  `undef'.  The new command `unaccount' can be used to delete all given
  accounts, in equal spirit to `undefine' and macros.
  All of this is still vulnerable against recursivity, e.g., deleting
  an executing macro still works, but don't that. [b0b3275]

- Rename `var-inspect' to `varshow'; silly oversight that `var-inspect'
  will try to lookup a variable "-inspect".  Ouch. [afffd30]

- Without HAVE_ICONV the character set iterator sofar used
  *charset-8bit* as the last resort, whereas it should have used
  *ttycharset*.  Fixed.
  P.S.: All this still preliminary, we await the MIME and send layer
  rewrite to calm down the stuff for real. [edc3226, df9aefd]

- During `~@' editing it is possible to leave the possibly endless
  character set selection loop by interrupting via ^C.
  In the meanwhile this effectively drops the currently edited
  attachment and leaves the entire attachment selection session; it
  doesn't make sense to make it any better until we have our signal
  manager and stop jumping around.

  This changeset should also fix dangling Content-Xy MIME information of
  attachments which were in the same slot before, e.g., if #1 was
  a message attachment and that was changed on-the-fly to be a real file
  attachment then the Content-Description would still have stated that
  it is a message attachment.
  [07a8462]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Since it has been decided to remain compatible to ISO C89 we cannot
  use the ISO C99 `z' format string modifier (printf(3)).
  Since quite some time we make efforts to provide our own `ZFMT' macro
  (in `nail.h') which provides somethint compatible, but on 32-bit
  platforms compilers often complain nonetheless.
  Therefore we now also have a compile-time assertion that proves that
  our `ZFMT' macro is really correct. [397e4d1]

v14.6.2, 2014-03-01
-------------------

Many thanks to the perpetual Gavin Troy.

- Faulty notational change of system call return values from `<0' to
  `==-1' caused endless waitpid(2) loop. [d6f316a; test(!): 79fd761]
  (Gavin Troy)

- (GLibC) STD I/O overoptimizes rewind(3) so that underlaying file
  descriptor offset is not reset to 0.  Generalize the already
  used `really_rewind()' hack and use it not only in
  `savedeadletter()' but also in `page_or_print()'.  It is likely
  that this not also fixes `history' listing but also some other
  things which go through the pager, dependend on the setting of
  *crt* etc., and on at least GNU/Linux systems. [463660f]

  Note: standard I/O does NOT offer a possibility to do this in
  a non-hackish way.  It is thus likely that S-nail will gain
  a completely new I/O layer in the future.  That'll also be faster.

  P.S., 2014-03-04:
  This note is false: POSIX Issue 7 overloaded the meaning of
  fflush(3): when used on readable streams the file offset of the
  underlaying file descriptor is adjusted to that of the stream.
  (nail.h: adjust really_rewind(): POSIX Issue 7 defined a way..)
  uses this official approach instead if _POSIX_VERSION>=200809L.

- Old shells will now correctly execute an error-condition
  execution path in `mk-conf.sh'. [afef55f]

v14.6.1, 2014-02-22
-------------------

Thanks to Andy Switala (andy DOT switala AT gmail DOT com).
And thanks to all package maintainers for their stamina.

At the first workday after the release i've run into a bug that was
caused by an oversight, a double-Fclose() that would be harmless if we
wouldn't forcefully panic() when we encounter it!

So i've spent another week on a review, and despite fixing many
additional notational oversights i haven't found more oversights of
newly introduced problems.  On the other hand i've found and fixed some
old problems during the review, and tweaked some other things:

- The INSTALL file now has a `Current codebase state' section.

- Commands invoked via `!' should now be interruptable.
  I'm afraid the exit status of such a command will not be reflected by
  the return value of the `!' command yet, but hey, at least `!sleep 10'
  can now be interrupted -- try this with another Berkeley Mail!
  [381ff46]

- All credential prompts should now be interruptable.
  (Inspired from Andy Switala) [c3bb2a2]

- 'make test' will now test a silly S/MIME case when WANT_DEBUG (or
  'make devel') was used. [8cff17f]

- *batch-exit-on-error* should now look at the exit status of *every*
  command when the command loop ticks. [c7e7d53]

- The new `[?name-list]?search-pattern' search expression has been
  changed to `[@name-list]@search-pattern' -- like this it doesn't clash
  with the `?' help command and can thus be used on a line by itself,
  causing the default command (`next') to be invoked on its' result,
  shall there be one.  Ok, yes, that was surely also an oversight.
  [8368f70]

- *attrlist* must now be exactly 13 characters, just as it should
  be.  An error message is printed if not.  It was always komisch,
  but i'd buggified it somewhen in the past.  Now fixed.
  [part of 0d4e934]

- The NCL WANT_TABEXPAND feature now also works if *newfolders* is
  set to `maildir'.  Yet, if a folder was assumed to be of maildir
  type, shell globbing would not occur. [part of f5c184c]

- The `X-Decoding-Data' S/MIME header field was set to the epoch
  origin instead of NOW in v14.6.

  Also the `certsave' command now supports file globbing (i.e.,
  '~/.certs/' should end up in your $HOME now).
  [both part of 7e0aec7]

v14.6, 2014-02-15
-----------------

+ With this release the S-nail codebase has been converted to my usual
  style of function-code-flow and notation.

  ?0[]$ git diff --shortstat v14.5.2..HEAD
   55 files changed, 28065 insertions(+), 25356 deletions(-)
  ?0[]$ git diff --ignore-all-space --shortstat v14.5.2..HEAD
   55 files changed, 14664 insertions(+), 11955 deletions(-)

  Maildir and S/MIME support have been restored, and a MIME bug that
  could have led to missing data in header display+ has been fixed.
  Ah, and users of compressed boxes should now feel luckier, too --
  at least once they've realized that the compress extension is no
  longer appended automatically, but must be given explicitly.

  Thus: i hope that all those i-am-new-to-the-codebase bugs i've
  introduced over a year ago have been found and fixed, and that
  v14.6 is the true "sweet sixteen" (months of maintainership).

ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- If WANT_AMALGAMATION is set, `-pipe' will be added to our CFLAGS
  (which are only honoured with WANT_AUTOCC, of course).  [1330411]

- New configuration option: WANT_IMAP_SEARCH, enabled by default.

  The regular expression support for IMAP-style search expressions has
  been removed again: it changed the IMAP search semantic in that it
  couldn't be executed on the server, but only local, and the syntax
  sucked, too.  (And we have a new `?' search expression.)  [402b7c6]

- CONFIG=MEDIUM and CONFIG=NETSEND now both WANT_REGEX.  [dee954e]

- The `make test' target should *really* work gracefully, now that usage
  of the `-#' command line option also sets the folder to be opened to
  `/dev/null'.  (Still no `void' box in sight.)  [0119d514]

- All published patches may also be found in a new [patches] branch.

ChangeLog
^^^^^^^^^

- Several fixes that saw published patches (with equivalent
  functionality), and are thus described in NEWS, are included:

  . s-nail-14.5.2-sort-alt.patch
    Fixes a hasty commit that introduced string relaxation in a faulty
    way.  [5e75529]

  . s-nail-14_5_2-mimeheader.patch
    Fixes data loss if multiple MIME encoded-words follow each other in
    header bodies.  [c81afce]

  . s-nail-14_5_2-maildir.patch
    Effectively restores proper maildir support.  [1c2563b, 13f325f]

  . s-nail-14_5_2-smime.patch
    Fixes an off-by-one error and, in effect, restores S/MIME sign and
    encryption etc. support.  [e759f75]

- The `screen' terminal type is by default recognized as being
  colour-capable.  [e759f75]

- With the NCL command line editor and WANT_TABEXPAND hitting <TAB>
  should now act as if an "implicit asterisk" had been given in case
  there was no expansion of the original user input; e.g., '? ls <TAB>'
  may exceed your line limit now ;).  [0910a8f]

- The S/MIME cipher list was outdated, RFC 5751 requires AES-128 as
  the default, the RC2 ones are long obsoleted (etc.).  Also we now
  should handle that OpenSSL may not support individual algorithms.

  Note: we use the option value `des3' for `DES EDE3' from now on!
  (Maybe see *smime-cipher-user@host* manual entry.)

  *ssl-method* may now also be assigned the new (default) method `auto'
  explicitly.
  [2472670]

- Messages will now be stored in a set *record* even if only file or
  pipe addressees were given.  [a11935b]

- Support for xz(1) compressed mailboxes has been added.
  (The `Can't canonicalize' warning for compressed boxes had the same
  cause that made maildir usage impossible, but i don't feel _too_ bad
  because looking into the code a bit revealed that the *newmail*
  mechanism never worked for such boxes anyway.  And will for a while.)
  [7fd9979]

- S-nail now supports nested if..else..endif conditionals.  [3c22c04]

- The NCL command line editor now locks its' history file when it reads
  and writes it, so as to protect against concurrent usage.  [c3a39ce]

- You can now say 'fi%', 'fi&', 'p&10' and `ghost ps '!ps axu'' followed
  by 'ps|grep nail'.  [c3266c6]

- Invocation cleanup: usage of -f and -u is mutual, -H and -u is ok, -u
  in send mode not.  [fa0a0aa]

- New message specification: `[?name-list]?search-string' will search
  in locally available messages.  If the optional `?name-list' part is
  given, that specifies the (comma-separated list of) header fields to
  search in.  The special names `body' and `text' can be used to search
  in message bodies alone and bodies including the headers fields,
  respectively.  Note that "message bodies" unfortunately still means
  "including headers of attachments and attachments themselves", and
  until some later time.  [61bb460]

- The new command line option `-L spec-list' prints a header summary of
  only those messages that comply to the specification list `spec-list'.
  If -L and -H are used in combination, no summary is printed at all,
  but the exit status reports wether `spec-list' would have matched some
  messages or not.  [934e12c]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Most of the work was changing the code-flow of the entire codebase to
  my usual style of programming, with a single function entry and
  a single function exit, including the addition of N(ot) Y(et) D(ead)
  points of interest, which finally enabled me to get rid of (sic!)
  using a debugger for S-nail development.  Just compile via 'make
  devel', and in case of a crash you should get a nice backtrace
  listing.  (You use IMAP, do you?)

  However, because practically every line of code has been touched, this
  caused some other changes along the way, e.g., the handling of
  temporary files was changed completely (the formerly used Ftemp()
  function has been replaced with a new Ftmp(), which handles unlinking
  itself as necessary etc.), it was detected that the S/MIME support was
  no longer compliant to any RFC, some resource leaks have been
  eliminated...  It is likely that a change so large introduced some
  other flees and flaws, however.  But it looks good so far.
  Thank you.

v14.5.3, 2014-02-15
-------------------

+ No official release, only exists as git(1) tag.

v14.5.2: fix 4: 2014-02-15 (2014-02-14)
---------------------------------------

- s-nail-14_5_2-smime.patch
  Fix a very stupid off-by-one error that i've introduced
  in [7bdf330] (OpenBSD 5.3: sigh, address strcpy(),strcat()
  etc., 2013-06-01).
  Until we've changed the used data from string to something
  line-wise, use strcat(3) again.

v14.5.2: fix 3: 2014-02-10
--------------------------

- s-nail-14_5_2-maildir.patch
  maildir folders would have caused problems in environments which
  provide the realpath(3) function: beside a "cannot canonicalize PATH"
  warning the finally used path would be wrong (`test3' would end up as
  `test3/test3'), so that any further access would try to use the wrong
  path.  Please read the description of this patch and/or the commit
  logs of the commits [1c2563b] and [13f325f].

v14.5.2: fix 2: 2014-02-05
--------------------------

- s-nail-14_5_2-mimeheader.patch
  A header like

    Subject: ehm, .getElementById("blink") needs <span
     =?US-ASCII?Q?id=3D"blink">,?= not =?US-ASCII?Q?class=3D"id"?=

  would yet be displayed without the " not " in between the two encoded
  words because of faulty "encoded-word-continuation" detection (note
  the quotation marks).  The error path could also have been seen in
  mail forwarding and in faulty searching etc.
  This patch is in a row of fixes for my hasty [0f9ad93] from 2013-03-12
  that already caused the v14.2 minor release (because of [b608c6b] from
  2013-03-14).  Those with mercy may read the commit message of [c81afce].

v14.5.2: fix 1: 2014-01-30
--------------------------

- s-nail-14_5_2-sort.patch
  Reverses (sort(),thread(): use srelax()!, 2014-01-18, [a9b67e9]),
  which was a hasty commit of an untested diff that i've added few
  minutes beforehand:

    As a rather careless last-minute change i've added string relaxation
    to threaded and sorted display, but it's really one more step towards
    lowering memory pressure -- i couldn't resist [a9b67e9] after seeing

  An alternative, forward-heading patch that keeps string relaxation has
  been pushed to [master] as [5e75529] and is also available as
  s-nail-14_5_2-sort-alt.patch.

v14.5.2, 2014-01-18
-------------------

Thanks to Ypnose, Sunil Nimmagadda and Gavin Troy.
Gavin Troy *really* deserves special thanks for facing [next]!
And i want to dedicate the new coloured message display functionality
to John Dodson and Ypnose.  Thank you.
(And best wishes to beautiful Australia!)

ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- All utilities can now be overwritten during configuration so that
  their values are fixated in the generated makefile (`mk.mk').
  I.e., talking about MAKE=, STRIP=, awk=, cat=, chmod=, cp=, cmp=,
  grep=, mkdir=, mv=, tee=.
  rm= and sed= have to be overwritten from the command line, they're
  needed before `conf.rc' is read.
  [5c03347, 072ec65, 39a00ab, 23a1245, ?]
  (Ypnose)

- The release tarball is now also available in a xz(1) version.

- New configuration option: WANT_COLOUR, by default enabled.

- 'make test' should now really work, even if the running user has
  a mailbox with content. [f223a91]

- WANT_AUTOCC is now by default enabled, so as for normal users which
  don't have the need to embed into a defined packaging environment.
  [d7e4e31]

- Installation no longer strip(1)s away debug symbols if WANT_DEBUG was
  enabled. [6d075c6]
  (Gavin Troy)

ChangeLog
^^^^^^^^^

- Fixes to some bugs that are present since the first cvs(1) commit of
  Heirloom mailx(1); includes that *ssl-key-user@host* should now work.
  [4405a2cc, 9770c26f, 692976b9]

- Some off-by-XY fixes, thanks to the debug memory canaries.
  [19b2b0d, 202506e, 43df6e4]

- Fixes for (other) stupidisms (of mine): [1c2161f]

  This includes true implementation of in-memory history limit for the
  NCL, which was the final and real solution to a segmentation fault
  that Gavin Troy had to deal with on [next]. [1089f2b]
  (Gavin Troy)

- For completeness: new command `var-inspect' shows information about
  all given options.  Mostly ment for implementing future tests.
  [topic/okeys]

- The `pipe' command no longer embeds message information into the
  data passed through to the command (when *piperaw* is set).
  [ef5ecc6 (part of topic/colour)]

- Simple coloured message (header) display is now possible.  Please
  read the new manual section "Coloured message display", use
  *colour-disable* to turn it off.  (It is enabled by default if it
  knows the terminal is capable and, if used, the pager can, too.  Note
  we now set LESS=FRXi when starting PAGER and no LESS= is in the
  environment.)

  Dedicated to John Dodson and Ypnose.
  [topic/colour, c6e84c7]

- The `if', `else', `endif' syntax has been extended.
  You can now "if 0" (never), "if 1" (always), "if $OPTION" (boolean
  check for OPTION) and "if $OPTION == 'VALUE'" as well as "if $OPTION
  != 'VALUE'".  Unfortunately it is still not possible to use
  conditionals inside conditionals. [0fb2ae7]

- -# now also sets MBOX=/dev/null. [4be2f1e]

- The NCL command line editor now supports cursor keys when the terminal
  produces xterm(1)-compatible keycodes ('ESC' + '[' + [DACB] for left,
  up, right and down, respectively).  What a thrill, yay!!! [0cbf672]

- New (optional) command: `history': show or clear command line history,
  or select a specific command line from in there.
  History works a bit different now, and should no longer include
  command lines which include specific message numbers; more to come.
  [59c6195, topic/hist2]

  I plan to join all the history management and use only the one that is
  part of NCL now, hooking it into editline(3) and readline(3).  That
  would shrink tty.c a bit and also introduce duplicate elimination for
  readline(3).

- The new ~u and ~U tilde escapes work like ~f and ~m, respectively, but
  don't include any header lines.  Inspired by a patch from
  Sunil Nimmagadda on openbsd-tech@.  [c37b8b3]

- The `|' command should work again -- it has stopped working on
  2013-09-09 when i've accidentally changed the command name from `|' to
  ` | '. [5a8378d]
  (Gavin Troy)

- As a rather careless last-minute change i've added string relaxation
  to threaded and sorted display, but it's really one more step towards
  lowering memory pressure -- i couldn't resist [a9b67e9] after seeing
    ?0[ /Users/steffen/src/nail.git/t.mbox]? sst
      Buffer allocs ever/max simultan. : 14/14
      Overall alloc count/bytes        : 17165/881088
      Cycle maximums: alloc count/bytes: 16906/876984+0
    ?0[ /Users/steffen/src/nail.git/t.mbox]? sst
      Buffer allocs ever/max simultan. : 0/0
      Overall alloc count/bytes        : 16515/841816
      Cycle maximums: alloc count/bytes: 16256/837712+829560

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- We now have debug canaries for all memory sources now that [8419d44]
  added them to the "string dope".

- The most work has been done on our value system, which manages the
  binary and value options, like *folder* etc.
  It is now based on enumerations, i.e., constant integers, not on
  strings.  This of course only relates to non-dynamic options.
  Anyway, this saves us key hashing and allows more compact data
  representation in general (see the new header `okeys.h' for more).
  [topic/okeys]

v14.5.1, 2013-12-27
-------------------

ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- The build system *only* uses the automatically detected $CFLAGS and
  $LDFLAGS if WANT_AUTOCC=1.  I.e., even unset or empty $CFLAGS and
  $LDFLAGS are not touched until then.
  (We do however still set $CC if that is unset or empty or set to the
  plain string "cc".) [856625f6]

ChangeLog
^^^^^^^^^

- Fixed segmentation faults / bus errors when setting *nofolder*
  / *line-editor-cursor-right* to the null string (only with WANT_NCL),
  respectively. [d1f1a19b, 21e5c285, 9f6ff25d]

- *prompt* handling is now really POSIX compliant (thus no prompting
  occurs not only for 'set noprompt', but also for setting *prompt* to
  the null string).

  This was indeed a rather large changeset that also introduced the new
  *prompt* escape character \&, which expands to `?' by default and to
  `&' if *bsdcompat* is set.

  Like that we now can simply assign "\& " to *prompt* at program
  startup, which (a) allows to do 'set noprompt' without error (once)
  and (b) allows for POSIX compliance in respect to prompt handling
  without any complicated conditional code, but (c) gives us the
  opportunity to continue to support BSD prompts.
  [0dfe53db]

- For completeness: new command: `features'.  (Rather useful for being
  able to implement more tests in the future, and act according to what
  is really compiled into the tested binary.

- The `-#' command line option now also sets *quiet* by itself.
  [7b5a5c87]

- nail.1: a newly introduced empty line in the manual produced error
  messages on some systems.  Fixed.

- The return value of the `mimetypes' command has been reversed and
  should now be fixed. [acf56ac52]

- In threaded display the Subject: followup suppression no longer
  takes into account invisible messages.
  Also, rudely hack in a messages-already-written-in-this-round counter,
  so that the followup suppression knows when "the top of the screen" is
  reached, which (seems to) help(s) against missing subjects up there as
  well as after a `newmail'. [topic/subject]

- Added a WANT_REGEX=1 toggle in `conf.rc'.
  When we find regular expressions then a new regex-enabled IMAP-style
  search is available (see the manual for more) [1ec8fe68]

    ? f (/or subject ^\[S-nail (subject ^\[nail-devel))
    ? f (/subject ^\[S-nail) (/subject ^\[nail-devel)
    ? f (/subject "^\\[(S-nail|nail-devel)")

  I'm looking forward for being able to add another, simplified, syntax.

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- The cc-test.sh has seen some tweaks, for easier future extension, and
  for adding a test for [d1f1a19]. [several, mentioned: 21e5c285]

- On systems without a real wordexp(3) implementations deadlocks could
  occur because we sometimes hold_all_sigs() to avoid longjmp(3)s away
  (and will do so for quite some time, still), and that resulted in the
  SIGCHLD that reported the exit of the started subshell to be blocked,
  too (e.g., after '? *.h<Tab>': endless hang).  Fixed.

v14.5, 2013-12-19
-----------------

Many thanks: Gaetan Bisson, William Yodlowsky, Gavin Troy,
Thomas (wasd AT gmx DOT net), Ypnose.
And Gavin Troy definetely deserves a very special credit.
But thank you all, and very much indeed!

ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- The `test' make target has been fixed. [f0991e14]
  (Gaetan Bisson)

- It is possible to gain a different kind of make(1) verbosity by
  using a VERBOSE=1 command line argument (this knob is not taken into
  account when deciding wether a rebuild is needed). [498e4ad0]
  (William Yodlowsky)

- On Crux 3 Linux and OpenBSD the readline(3) and editline(3),
  respectively, libraries will now be found when desired. [a7d1aa78]
  (William Yodlowsky)

- WANT_LINE_EDITOR has been renamed to WANT_NCL, *plus*.
  So now there are WANT_READLINE, WANT_EDITLINE and WANT_NLC, each of
  them can be set individually, and they are tested in the shown order.
  Also, WANT_TABEXPAND and WANT_HISTORY have been introduced and can be
  used to fine-tune functionality. [ae4e01e1, b2635feb, 9742bf40]

  (While here, i've fixed WANT_TABEXPAND code so that it is more
  sensitive to line excess; on Linux etc., where MAX_INPUT is 255,
  strange behaviour could be seen because we didn't take into account
  the length of the prompt at all.  The NCL is assumed to have only
  one remaining, but unfixable problem: backspace often is incapable
  to cross visual line boundaries; use ^A/^E + ^L, then. [e832c04a]

  Also, cursor (now ^B and ^F) and history movement (now ^P and ^N) of
  the NCL have been changed. [d7d928da])

- WANT_QUOTE_FOLD is now enabled by default.  And WANT_ASSERTS has been
  renamed to WANT_DEBUG. [1e10da1f]

- The build system has seen yet another overhaul in general.  CC, CFLAGS
  and LDFLAGS plus are now tracked and changes will force rebuilds.
  The new WANT_AUTOCC option can be used to let the build system figure
  out a compiler and choose known-to-work flags.  Use the new ADDCFLAGS=
  and ADDLDFLAGS= command line arguments to add your specific flags on
  top of those -- the final CFLAGS etc. are what is change-tracked.

  This rather massive internal rework revealed that old Bourne shells
  were yet not supported by the new build system, and so did testing
  that UnixWare installation was yet impossible due to tool
  incompatibility. [75c4b74e]

- The new WANT_AMALGAMATION option will force compilation of all the
  sources in a single compilation unit.  This requires a rather large
  amount of memory, but may produce a more compact, maybe more optimized
  binary.  (Implementing this revealed quite some bugs which could
  therefore be fixed.) [topic/amalgam]

- `nail.rc' has been pimped a bit (mostly comments, but
  *mime-counter-evidence* is now always set). [e3094ba7]

   That changeset was however buggy. [f3dcb46]
   (Gavin Troy)

- We no longer use install(1) for `install'ation make rules. [80b02cd9]

ChangeLog
^^^^^^^^^

- Even '$ s-nail & fg $!' will now work with the NCL. [2a8b5c55]

- Several off-by-one (off-by-two) fixes. [32ce9836, 71e6d013, f139dc36]
  (Gavin Troy, Thomas)

- Setting *noprompt* now prevents prompting, as per POSIX. [ecefaf63]

- *prompt*: new \$ (exit status of last command) and \@ (name of
  currently active mailbox) escape sequences. [6f652046]

- One may now omit the space in '? unc' ('?unc') [05fcb383]

- New commands: `ghost' and `unghost' define command aliases (since
  `alias' is taken for a different purpose) [topic/commands]

    ? ghost ps '!ps axu'
    ? ps |grep nail

- There is now a pseudo account `null' (case-insensitive).
  Also a new `localopts' command exists; when used from within an
  `account' block, options changed will be reverted back to its former
  value when the account is left (e.g. by switching to `null'):

    define sdn_ {
       alternates sdaoden@users.sf.net sdaoden@users.sourceforge.net \
          sdaoden@googlemail.com sdaoden@gmail.com
       set Sign="\n--steffen\nForza Figa!" sign="\n--steffen"
       set smtp=smtp.gmail.com smtp-auth=plain smtp-use-starttls
       #..
    }
    account sdn_gm {
       localopts 1
       call sdn_
       set from="Steffen \"Daode\" Nurpmeso <sdaoden@gmail.com>"
    }
    account sdn_sf {
       localopts 1
       call sdn_
       set from="Steffen \"Daode\" Nurpmeso <sdaoden@users.sf.net>"
    }

  E.g., after

    ? acc sdn_gm
    ? acc null

  neither of *Sign*, *sign*, *smtp** nor *from* should be set.
  Please see the manual for more.
  TODO - neither command-ghosts nor alternates etc. are yet tracked
  TODO - we should have a boolify() so as to say 'localopts yes' etc.
  [topic/acmava]

- New command: `cwd' (print current working directory).
  Also fixing the `chdir' return value. [eff4397c]

- The *ssl-method* now allows explicit setting of 'tls.1.1' and
  'tls1.2' values. [c66b4196]

- When sending to display, be aware that filenames in MIME parts may of
  course be MIME-encoded! [1454be03]

- *hostname* is now honoured even if *smtp* is not set.  (We always
  supported *from*, so why not *hostname*?)

- The `-u user' option now acts identically to setting the $USER
  environment variable and both now tend to mean something like
  "impersonate as user in some aspects".  Note that we have always used
  the latter in one or the other way, and `-u user' always ment more
  than just "open mailbox of user", so i think this change sharpens the
  edge in the right direction. [09632731]

- Filename argument quoting has been tweaked for (some) function(s which
  take a filename argument last).  The following snippet as reported by
  Gavin Troy should work now: [2bb9b80e]

    ? mv +inbox.Junk\ Mail

- The GNU implementation of wordexp(3) is also (i've added a workaround
  for the very same bug for Mac OS X in S-nail v14.3 [63273772]) buggy,
   which causes segmentation faults when expansions failed (`fi &VOID').
  [470527b7]
  (Gavin Troy)

- The `fi' command no longer uses the (possibly truncated) display
  version of a filename, but the full path. [5cd85b07]

ChangeLog (purely technical)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Large rework of internal structure: bundle inclusion of most of the
  external and the content of most of the internal #include files in the
  new nail.h.  If that would have been done very first bugs like the
  infamous MAXPATHLEN bug as reported by Paul Vojta (see v14.4.2) would
  never have occurred. [21f3155b]

- Support for -fstrict-overflow cc(1) flags. [topic/strict-overflow]

- Fixed the quotation filter which yet allocated memory even if not
  used. [c98cdaf5]

- String relaxation reduces memory pressure rather drastically when
  working with many (especially MIME) mails at a time, e.g., when
  writing a modified mailbox.  Before all messages of a mailbox had to
  be worked without releasing any memory in between, now we give back
  memory (to our pool, not the system) after each and every message.
  [topic/srelax]

- The other memory source now uses bound canaries, which also found some
  errors. [3d9fe741]

- We now use the EL_PROMPT_ESC editline(3) mode for prompting, which
  should offer the possibility to use coloured prompts etc. with
  (even those) editline(3) (versions which do offer it -- older versions
  should just do fine by themselves).
  S-nail uses the special trigger control character \1. [ea30d818]
  (Ypnose)

  Note however that all tested editline(3) versions are buggy and
  either don't get it right (`\1COLOR-ON\1stuff\1COLOR-OFF\1') or are
  incapable of proper repainting (`\1COLOR-ONstuffCOLOR-OFF\1').

- We now use the MD5 digest code from the OpenSSL library if that is
  usable. [893b16c0]

v14.4.5, 2013-10-19
-------------------

Many thanks: Gaetan Bisson, Stephen Isard, Jérémie Courrèges-Anglas,
William Yodlowsky, and Adam Sjøgren from GMANE.org!

ChangeLog (packager-affine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- The packager-install: target has been fixed. [a8c1b0b]
  (Gaetan Bisson and William Yodlowsky)

- As suggested by Gaetan Bisson the several build system tasks are now
  individually addressable, i.e., 'make [OPTIONS] config', 'make build',
  'make test', 'make packager-install'); nothing changes unless you want
  to, in which case: please see INSTALL. [4d3b799]

  The new target 'test' will call cc-test.sh with its new --check-only
  option which will only perform the (too few) function tests on the
  ready binary.
  And cc-test.sh will no longer create output files, but simply echoes
  to STDOUT and STDERR. [629e1ee, 786f219]
  (Gaetan Bisson)

- The default configuration file now sets *bsdannounce* and *bsdflags*,
  all in one line, as suggested by William Yodlowsky.
  (If *header* is disabled, *bsdannounce* is ignored, but *header* must
  be enabled by default according to POSIX, and *bsdannounce* is just
  the same as *header*, but for the folder-switched event.  Thus setting
  *bsdannounce* is the more sane default, imho.) [6161f10]
  (William Yodlowsky)

- Announcement messages are now tagged '[ANNOUNCE]'. [26e1b35]
  (Tagging suggested by Stephen Isard and Jérémie Courrèges-Anglas)

- The manual NAME now includes the version (but it's somewhat ugly).
  [8adcca4]

ChangeLog
^^^^^^^^^

- When switching folders when in compose mode, message attachments
  become invalid.  For v14.4.5, at least warn when this happens.
  [47eb1ab]

- When reading multipart/alternative messages which do not contain
  a text/plain part, the (most likely HTML) part is not displayed (even
  if S-nail is configured to display HTML).  The reason is a bug i've
  introduced with [0d43a999] (Change "Part X:" display message..,
  2012-12-20).  (Note that the committed fix i've posted to the list was
  not correct either and has been fixed itself.) [225c02b, ecfa149]

v14.4.4, 2013-10-03
-------------------

Thanked, Gavin Troy, Gaetan Bisson.

- Fix output buffer confusion that would have occurred when parts of
  a multipart mail had a pipe command set.  Longer story in [e75d16dd].
  (Gavin Troy)

- The makefile now supports a `packager-install' target that bypasses
  the reevaluation of the configuration (after checking that there is
  one) and directly steps ahead to the install process.
  (Gaetan Bisson)

- Notes in INSTALL that CFLAGS and LDFLAGS need to be overwritten from
  within (conf.rc or) the command line.
  (Gaetan Bisson)

v14.4.3, 2013-10-02
-------------------

I convey special thanks to Karol Błażewicz and Gaetan Bisson.

- The new build system didn't allow to overwrite CFLAGS= when used in
  conjunction with GNU make(1).  To make a long story short, removing
  a `.POSIX:' directive from the makefile fixed the problem.  Luckily.
  [e6b26526]

- More INSTALL notes for UnixWare 7.1.4, which suffers from the same
  problem: here the fix is to use the -e option of make(1).

- Karol Błażewicz reported a segmentation violation he got when using an
  Arch Linux S-nail test package, and Gaetan Bisson informed me about
  that.  The problem was that we didn't assign the resulting default
  address (which gets used when *from* is not set) to the result which
  gets used, effectively resulting in a NULL dereference. [cfd60479]

v14.4.2, 2013-09-21
-------------------

Many thanks to Paul Vojta.

- On GNU/Linux there is no MAXPATHLEN constant defined by default, as
  this is a non-standard legacy constant.  Mozilla ran into this some
  time ago, though a bit different [1].  It made it easier for S-nail.

    [1] <https://bugzilla.mozilla.org/show_bug.cgi?id=412610>

  We could include `sys/limits.h' to get at MAXPATHLEN, there it is
  defined to be PATH_MAX, but let's just include the standard `limits.h'
  and ensure MAXPATHLEN ends up >= PATH_MAX.  With this condition being
  true even FORTIFYd sources won't bail with reported buffer overflows
  because realpath(3) expects a buffer of PATH_MAX bytes. [bee5e57c]
  (Paul Vojta)

- With the builtin LINE_EDITOR, ensure proper interaction with GNU
  rlogind(8), which is alone in its quest to set the ISTRIP termios(4)
  flag. [61e00f2d]

- Bugfix a codepath that would have prevented compilation when
  HAVE_ICONV is not set.
  While there, allow to unselect message attachments when using the `~@'
  tilde command interactively, which i mysteriously had forgotten when
  allowing selection of 'em.  (oops?) [4f58ffea]

- It's now easier for packagers to get at debug-enabled CFLAGS; simply
  use WANT_ASSERTS=1 (should not be enabled in shipouts, please).
  [d8663406]

- Fixed a terrible bug that i've introduced in november 2012, that would
  have corrupted MBOX files when using the `resend' command.  (The
  so-called "From_ line" would have been quoted to ">From_ line" instead
  of simply being stripped.) [19d449e2]

- Fixed a SIGSEGV for the builtin LINE_EDITOR, that would have occurred
  if a history traversal (^B or ^F) would have been continued by
  a reverse history completion (^R).
  While there, avoid some multiple-beeps-in-a-row that yet occurred due
  to code reuse, and document that ^G etc. reset the multibyte state
  machine. [003d9f6f]

  Also, the expand-on-tab code could have excessed line input maximums,
  e.g., after `? /usr/bin/*<Tab>'.  This was of course known, but
  i wanted to keep it because all tested (modern) terminals "mess up but
  won't break", and thus made it possible to use the data, even if it's
  visual representation was messed up.  The real solution will be much,
  *much* more complicated, i.e., show possible *completions*, page-wise,
  etc., i.e., just like is known by tab *completion*.  This will need
  far more time because it doesn't make sense to embed such complicated
  code into the current bed.
  Now i've chosen to simply don't display excess, but replace the
  content with a message that says that there was excess.  It simply
  looks better. [0320c8ba]

- I've changed the use of `[?]' as a replacement sequence for invalid
  / non-displayable characters to `?' (again).  There are still code
  paths (from the original codebase) which use the real Unicode
  replacement character instead, so our display is still not unique.
  On the long term the codepath can anticipate in all levels wether
  use of Unicode is possible, so that, then, we will be unique again,
  using either only `?' or the Unicode replacement character. [faf6380]

- I've anticipated in v15.0 and implemented *quote-fold* as a stream
  filter.  It is now multibyte safe and takes into account the visual
  width of characters, i.e., ideographs etc.  It is working almost as
  good as an algorithm can work that looks at data linewise, but is yet
  experimental and incomplete in that it will break lines even if only
  whitespace or a backslash escape follows.  It is code that is only
  a few hours old, which is why it is not enabled by default. [

v14.4.1, 2013-09-14
-------------------

How terrible.

- Fix some harmless stylos and typos in the manual and `conf.rc'.
  [1a6b880, 417b066]

- Ensure *complete* proper cleanup on signal-caused configuration run
  aborts. [7a08bda]

- Bugfix: reenable empty configuration variable overrides, as in

    $ make install SID= NAIL=mailx ...
  [171861d]

- Bugfix: rename the `conf.rc' variables SHELL, LISTER and PAGER because
  they clash with the POSIX standard variables of the same names, which
  hurts now that the configuration is run through the shell itself.
  The configuration names are now XSHELL, XLISTER and XPAGER (ouch).
  [ef93c4e]

- nail.rc: comment out some non-portable S-nail(1) specifics, for those
  who install this file as mailx.rc or so, somewhere. [3f14b01]

- From now on S-nail will use simple version tags, as, e.g., `14.4.1',
  i.e., no more `s-nail-14.4.1'. [a75437d, 183d59c] (Jürgen Daubert)

  Also move UAGENT out of `version.h' [f7be5be]

Uh! v14.4 must have originated in a bad dream; good it's vanished.

v14.4, 2013-09-13
-----------------

Thanks to the entire vivid and virile S-nail(1) user community is
proper, especially Stephen Isard, Gavin Troy, Martin Neitzel.
Not to forget Ryan Kavanagh and Ayan George.

Note this time the changes are in reverse order, i.e., oldest first.

Topic Branches
^^^^^^^^^^^^^^

15fbe09 ^bf9173f 'topic/varmac-unite'
  Simplification and unification of variable and macro handling
40f6f58 ^15fbe09 'topic/cledit1'
  Command line editor; new manual section `Line editor'
ad28a32 ^40f6f58 'topic/termsize'
  Honour POSIX mailx(1) and respect $COLUMNS and $LINES on startup
dc3cd49 ^a446fd8 'topic/qf'
  You don't wanna know
b8738f7 ^0651fd0 'topic/spam1'
  Interaction with SpamAssassin; new manual section `Handling spam'
5419d6f ^b8738f7 'topic/make1'
  Reworked build system; please read `INSTALL' and `conf.rc'
9ab4d6b ^5419d6f 'topic/list1'
  Slightly tweaked message thread display, fix `:u :r' to mean it

ChangeLog
^^^^^^^^^

- The default PAGER is now more(1).  (But read on.)

- The `echo' command is now compliant, and fully supports XSI.

- The `group' and `ungroup' command aliases have been removed, they are
  `alias' and `unalias'.

- We now have the capability of line editing and history.
  One may choose from not less than three different implementations:
  a builtin editor as well as possible linkage against BSD editline(3)
  and also a GNU readline(3) compatible layer.
  Please read the new manual section `Line editor'.

  Input is now compliant in that an interactive line may be continued
  after escaping the newline character with a backslash.
  [topic/cledit1]  (all of them)

  The *prompt* variable may now contain shell escapes, just like the
  `echo' command. [0938d8a]
  As a special extension the new \? escape, when used within *prompt*,
  will expand to the exit status of the last command. [41076d2]

- The POSIX standard environment variables $COLUMNS and $LINES are now
  honoured upon startup. [topic/termsize]

- The `help' / `?' commands now support abbreviation, i.e.,
  ``$ ? unc'' should now find `uncollapse'. [7b86195]

- The `~' abbreviation that has been introduced as an alias for `call'
  is now a real command, not a magic shortcut. [9987289]

- The new variable *quote-as-attachment* can be used to additionally
  embed the quoted message as a `message/rfc822' MIME attachment.
  [topic/qf]

- The compose-mode command `~@' will now attach messages from the
  current mailbox if given a filename of the style `#NUMBER'.
  Please read the corresponding manual section `Tilde escapes', though.

- The `WANT_JUNK' and `WANT_SCORE', as well as Gunnar Ritters junk mail
  management have been removed.

  Instead S-nail(1) can now support interaction with SpamAssassin, but
  sofar only via the spamc(1) / spamd(1) client / server pair of
  programs that ships as part of SpamAssassin.  The new configuration
  directive `WANT_SPAM' controls wether this feature is desired.

  Please read the new manual section `Handling spam'.
  [topic/spam1] (Martin Neitzel)

  (S-nail(1) is now *definitely* floating-point free.)

- The configuration and make system have been overhauled / reorganized.
  The configuration is now in `conf.rc', also contains directives like
  `PREFIX' etc, and is always read in.  However, only those directives
  which are not yet set (via environment or command line overwrites) are
  incorporated into the set of configuration options.  Therefore

    $ make WANT_IMAP=0
    $ make WANT_IMAP=1

  will now build S-nail(1) twice, because of the changed configuration.

  Note that `WANT_GSSAPI' is now by default disabled, which shrunk
  a freshly started s-nail image by more than 30 percent.

  We're not finished yet in that there is no dependency graph etc.
  Please do read `INSTALL' and `conf.rc'.
  [topic/make1]

- Message selection has been slightly bugfixed in that `:u :r' really
  means `:u' AND `:r'.  Compared to NetBSD Mail(1) it's still a shame.

  Threaded message display has been slightly changed in that within
  a thread identical Subject: lines are not repeated.  It may not be
  perfect yet due to the general list / thread state. [topic/list1]

- If, upon startup, the environment variable `NAIL_NO_SYSTEM_RC' is set,
  then the system wide initialization file isn't read, just as if the
  `-n' option had been given. [1b31535]

- It is now possible to use CTRL-C during connection hangs.  (But in
  general error recovery capabilities of the socket related
  infrastructure is non-existent, practically speaking.) [45a9f36]

- *quote-fold* has been temporarily disabled, as it is not multibyte
  safe.

No review for v14.4.  And today is Friday, the 13th.  Ouuuh!

v14.3.2, 2013-06-21
-------------------

I should *maybe* should have and want to give prominence to
Martin Neitzel for this, i maybe have misunderstood.

- Bugfix *synchronous* *pipe-** execution..

  Well, unfortunately yet another newly introduced bug slept in
  S-nail v14.3[.1] -- [a8d724b3, Add @ and @& shell command prefixes
  for pipe-MIMETYPE, 2013-05-03] falsely changed the waiting state
  for subprocesses, as has shown up by a HTML-only mail on the
  Unicode list today.
  'Seems i'm collecting one line fixes in this codebase; this needs
  to change in the future.

v14.3.1, 2013-06-08
-------------------

I want to give prominence to Juergen Daubert (jue AT jue DOT li), who
reported that i've broken plain-old unfancy send mode in 14.3.

+ Ok, i'll hope we're out of new errors for the v14.3 series with that.

- New variable: *batch-exit-on-error*.
  Only works if the new -# command line option has been given, and will
  check the "current" exit status whenever one operation completes
  (S-nail returns to the command prompt).
  If the exit status implies error (e.g., sending the last message
  failed) then we exit forcefully with that error status.  (The normal
  behaviour is that the status is reset when the command loop ticks.)
  [4cddd55]

- While here again, i've added the new -# command line option.
  This is the first step to implement a reliable batch mode;
  unfortunately it still selects the users system mailbox on startup,
  because we simply cannot go to "no" mailbox for quite some time -- at
  some future time we will be able to go to some VOID thing, and then
  this will end up as a rather efficient batch mode.
  For now it sets *dot*, *emptystart*, *noheader* and *sendwait*, and
  also implies the -~ command line option.  [7549569]

    (
      printf "m ${MBOX}\n~s subject1\nE-Mail Körper 1\n.\n" &&
      printf "m ${MBOX}\n~s subject2\nEmail body 2\n.\n" &&
      echo x
    ) | MAILRC=/dev/null "${NAIL}" -n -#

- Also, -N set *header* instead of *noheader*.  [7b4a13f6]
  (Juergen Daubert.)

- Plain old unfancy invocations like

    $ s-nail user@host
    $ echo bla|s-nail ./FILE1

  had been broken (by [522cb3ec]).  [260e19d]
  (Juergen Daubert.)

v14.3, 2013-06-03
-----------------

Thanks to Gavin Troy (gavtroy AT gmail DOT com) who inspired the @ and
@& pipe-command prefixes.

Random notes
^^^^^^^^^^^^

- S-nail has been registered at Coverity Scan, and the third build
  (after topic branches *coverity-444* and *coverity-444.2*) produced no
  more errors.  (<http://scan2.coverity.com/projects/444>.)
  (Then i used POP3 and IMAP and fixed some SIGSEGV. ;)  Still didn't
  look at S/MIME, Maildir, caches etc... o()

- S-nail v14.3 doesn't produce any spurious linker warnings on
  OpenBSD 5.3; all (correct!) use cases of strcpy() and strcat() have
  been replaced.  [7bdf330, 2c8d7cb]

- This is the first release with a (though very short) review -- i'm
  slowly getting comfortable with the code.  (But i'm too stupid to
  perform reviews on patches, 'always did reviews on C++/Perl/xy
  classes.  Aaah, how beautiful ... objects.)

ChangeLog
^^^^^^^^^

- It is now possible to "call" macros without using the `call' command
  by prefixing them with a tilde, as in

    ? define au {
      echo auau
    }
    ? ~au
    auau
  [93ea8acd]

- Added the *pop3-bulk-load* option.
  Yes, there are mailing lists etc. which use plain text email, and,
  there, headers are often more data than the body, so it doesn't make
  sense to download the headers twice (unfortunately POP3 doesn't
  support a BODY command; if only it would support a RETRDELE command..)
  [978e13a7]

  And yep, from this changeset on i personally use S-nail even over the
  network, no longer my stale and incomplete S-Postman.  And i can tell
  you, this damn thing is so silent, i always set *verbose* not to go
  grazy ... but .. i hate to say it .. the healing will take time.

- POP3 will now try to use APOP authentication automatically; thus the
  *use-apop* stuff has been replaced by *pop3-no-apop* options (just in
  case there are POP3 servers which advertise they support APOP but in
  fact fail to do so; anyone?)  [6c3c5575]

- Some IMAP segmentation violations have been fixed:

    ? fi imaps://user1@localhost
    Password:Interrupt            <- CNTRL-C
    ? set imap-auth=cram-md5      <- hey, 'forgot to set correct auth
    ? fi imaps://user1@localhost
    IMAP write error: error:140D00CF:SSL routines:SSL_write:protocol is shutdown
    Segmentation fault

  And also, when *folder* was set to an IMAP account but hasn't been
  opened yet, and no IMAP account ever has been opened, a string
  comparison against a NULL pointer yet caused a SIGSEGV, too.
  [417c01f, 413c23d9]

- `set folder=' now tolerates `%:' and expands PROTOs stuff etc.:

    ? short xp %:imaps://user1@localhost
    ? set folder=xp

  Pure convenience so that it doesn't need to be typed twice (still no
  completion in sight...).  Note that setting *folder* to a POP3 box
  will now be actively rejected.  [b12b17f5]

  NOTE: while implementing this i've detected another dead-end
  miscondition in S-nail -- you really should ensure that your target
  folder/box is connected before you leave your current POP3/network
  based folder, if there is data to be moved to the target (i.e.,
  mbox).  This problem will persist for a long time due to the way the
  entire codebase functions; i hope i can find a short/mid-term
  solution, but the real healing will take years.  The mentioned
  solution would at least make S-nail interruptable, currently we get
  stuck and interrupts are blocked...

- If you're using S-nail on Mac OS X and have seen some segmentation
  faults when expanding shell stuff then you may be pleased to hear that
  S-nail now works around an Apple bug.  [63273772]

- The builtin mime.types have been corrected and a lot of new ones have
  been added.  New data from
  <http://svn.apache.org/viewvc/tika/trunk/tika-core/src/main/resources/\
  org/apache/tika/mime/tika-mimetypes.xml>, thanks!  [8072fcb6]

- BEWARE: handling of command line arguments has changed a bit!

  1. The -D, -d, -E, -i, -N and -v command line options are now
  implemented by means of setting the respective option, as via -S.
  (This means that from now on resource files can only *temporarily*
  overwrite command line arguments.)

  2. The -I and -T command line arguments have been dropped.
  It seems Gunnar Ritter stopped developing nail/Heirloom mailx once he
  started implementing Newsreader functionality.  It'll take a long time
  until we get there, so for now drop all the Newsreader stuff.

  3. Handling of -r has been changed.  E.g.:

    s-nail -A test -Snoeditalong -r 'La mort est <fem@me>' -d
    ? set from=bummer@m1.com
    ? m t1
    Subject: s1
    .
    Sendmail arguments: "sendmail" "-i" "-r" "fem@me" "t1"
    ? set from=bummer@m2.com
    ? m t2
    Subject: s2
    Sendmail arguments: "sendmail" "-i" "-r" "fem@me" "t2"

  ...

    s-nail -A test -Snoeditalong -r '' -d
    ? set from=bummer@m1.com
    ? m t1
    Subject: s1
    .
    Sendmail arguments: "sendmail" "-i" "-r" "bummer@m1.com" "t1"
    ? set from=bummer@m2.com
    ? m t2
    Subject: s2
    Sendmail arguments: "sendmail" "-i" "-r" "bummer@m2.com" "t2"

  [*main-fun-cleanup* topic branch]

- *smime-sign-include-certs-** stuff works again, oops..  [9a8597c6]

- A whole lot of smallest and small fixes due to registration at
  Coverity Scan, as project 444.  Error handling in S-nail is ridiculous.
  [*coverity-444* and *coverity-444.2* topic branches.  The sheer number
  of fixes was the reason to sit down and go for unplanned S-nail v14.3]

- *idna-strict-checks* has been dropped.  It's silly to have in a MUA,
  especially given that GNU LibIDN doesn't ship with a lot of rules.
  We were able to drop quite some code (and a use-after-free, too :().
  [c81fd41d]

- The ~p tilde command displays attachments more verbose.
  Until the big big MIME and send layer rewrite :) this is intermediate
  since until then we do not really know neither MIME type nor charset
  of an attachment at the time this is displayed (for sure).  Yet
  i think it's nicer to show what we have than keep it the way it was.
  [60e70463]

- @ and @& shell command prefixes have been added for the pipe-MIMETYPE
  mechanism.  The former suppresses filters if multiple messages are
  displayed at once, the latter adds asynchronous program execution on
  top of that.  E.g., to display PDF documents, but only if you
  *explicitly* address the message *alone and by itself*, and without
  blocking S-nail and the $PAGER, do:

    set pipe-application/pdf="@&cat >"${TMPDIR}"/s-nail${$}.pdf;\
      mupdf "${TMPDIR}"/s-nail${$}.pdf; rm "${TMPDIR}"/s-nail${$}.pdf"

  (Inspired by Gavin Troy.)  [a8d724b3]

  Note: most of that had been posted to nail-devel@ already, but it was
  tweaked ([251b636]) so that you now *really* have to say `p MSGNO' to
  get there.

- The NETLESS CONFIG= has been removed; it is almost identical to
  MINIMAL now (i.e., without WANT_JUNK and WANT_SCORE).

- WANT_JUNK and WANT_SCORE have been disabled by default.
  They don't seem to be too useful; i hope i can implement
  a SpamAssassin hook for (downloaded) mail messages for v14.4.
  If so, expect these two "modules" to become removed completely.

v14.2.2, 2013-05-01
-------------------

Another unplanned (minor) bugfix release after Gavin Troy (gavtroy AT
gmail DOT com) pointed out that MIME CTE decoding was broken, who
i therefore want to give a lot of prominence right here.

- Fix MIME content decoding which has been broken by [01c0e135].
  [882caedd]
  (Gavin Troy.)

v14.2.1, 2013-04-30
-------------------

An unplanned (minor) bugfix release after i've found two bugs today and
heard from Jérémie Courrèges-Anglas (jca+nail AT wxcvbn DOT org) that
there exists a S-nail OpenBSD package.

I want to give prominence to the following people that helped to
improve S-nail(1) during this development cycle, in order of
appearance: Dirk Peters (peters AT schwertfisch DOT de).

Thank you very much, and best from Germany!

- Some warnings of newer clang(1) versions were silenced, including yet
  another alloca(3) problem (see *memtracer* topic branch in v14.0
  series).  [6f846efe]

- Tweaking the MIME boundary detection left a little hole that could
  cause boundaries not to be detected, as has been shown by a Microsoft
  Word generated mail on the ICU list.  [11e5fb5b]

- A format string could overflow bounds if unrealistic
  (18446744073709551615) line numbers or message sizes would have been
  produced.  [faa65c40]

- An algorithmic error could cause overlong lines which wrapped around
  to the next display line.  [ade52660]
  (Dirk Peters.)

v14.2, 2013-03-15 [v14.1, 2013-03-12]
-------------------------------------

I want to give prominence to the following people that helped to
improve S-nail(1) during this development cycle, in order of
appearance: Martin Neitzel, Christos Zoulas, Stephen Isard, jgw@txo.org
and Gavin Troy.

Thank you very much, and best from Germany!

+ v14.2 differs from v14.1 only by one commit, one that fixes
  (mime_fromhdr(): partial rewrite using n_iconv_str(), 2013-03-12),
  which i hastily implemented just hours before the release of v14.1,
  and simply shouldn't have made it (into there).
  The v14.1 tarball has been removed from the server.

- A fix for the quoted-printable codec: "message truncation" occurred
  when a mail maliciously used a soft linebreak to escape the linebreak
  of a completely empty line.
  (That resulted in 0 written and 0 leftover bytes, a condition that was
  declared erroneous back in november 2012 when i started handling I/O
  errors.)

- The "folders" command will work again when given an argument.
  A fault of mine introduced in (cmd1.c: expand() may fail, 2012-10-23).

- The Base64 codec has been touched again, and we are finally capable to
  perform sequential decoding; this was targeted for the MIME/send layer
  rewrite, but it actually was possible today.
  The result as seen in ps(1), running on the Base64 encoded HTML5
  standard (4622545 bytes HTML, with a NUL appended to force Base64
  encoding, resulting in a 6244793 bytes email):

   7420 s006  S+    2:22pm 0:10.65 plain-nail -f HTML5
   1440 s006  S+    2:23pm 0:00.36 ./s-nail -f HTML5

  (So the only thing that is left for a good throughput is sequential
  decoding of quoted-printable encoded parts that maliciously use soft
  linebreaks to convert an entire part to a single line.  And i've seen
  that from Apple Mail.)

- New option: *mime-allow-text-controls* (rather long manual entry).

- *smtp-auth-password-user@host* and *smtp-auth-user-user@host* will
  finally work!
  (Reported by jgw@txo.org in November 2011, fixed by Gavin Troy in
  January 2012.)

- Most *headline* formats now do support the '-' left-alignment flag.
  Note that you most likely have to change your *headline* accordingly.
  (The still missing %n format is one reason why there will be v14.2.)

- *datefield* and *datefield-markout-older* can now be set to
  strftime(3) format strings (except %n).
  (From Stephen Isard's wishlist.)

- A possible SEGV has been found and also fixed by Stephen Isard.
  (The "legendary" cross-world stereo fix!)

- Wow!  S-nail will finally compile on GNU based Linux systems like
  Slackware 14 etc.  (Found while hunting bug reported by
  Stephen Isard.)

- New option: *datefield-markout-older* can be used to choose
  a different date display for mails that are older than six months,
  in equal spirit to what POSIX describes for the -l option of the ls(1)
  command (Stephen Isard).

- (Exotic) Years are (would) now (be) interpreted correctly according to
  RFC 5322, 4.3.

- CRAM-MD5 usage has been fixed.

- *folder* updates are now tracked when set, and we will show the
  realpath(3) name of it, showing PREFIX..SUFFIX if that wouldn't fit on
  the display.
  Tracking updates made it also possible to perform other more expensive
  tasks when setting *folder*, so that it is now possible to do
  something like:

    :set folder=$HOME
    :set folder=~

  et cetera (both ideas by Christos Zoulas).

- Bugfix for the ~@ tilde-escape in non-interactive mode.
  (readtty(): quick shot: work in pipelines (on non-TTY).., 2013-01-25)
  introduced the possibility to "read data from the terminal" (STDIN
  that is) in non-interactive mode.
  The manual documents that attachment input must be terminated with an
  empty line, but if that had been omitted, as in the example below, we
  would have yet entered an endless loop.

     $ cat <<_EOT | /s-nail -~ -s boom ./OUT
    ~@
    test.c
    charset
    _EOT

- Alias expansion will now be performed for members of Reply-To: fields
  (Martin Neitzel).

- Decoding quoted-printable will now be more relaxed.
  (Even though the standard says that users should be given a hint when
  input is not absolutely clean; a possible warning will be added later,
  when we have an error message ring.)

- New option: *mimetypes-load-control* can be used to control which of
  the mime.types resources will be loaded.

- The builtin default mime.types have been extended a bit.

v14.0, 2013-02-10
-----------------

I want to give prominence to the following people that helped to
improve S-nail(1) during this development cycle, in order of
appearance: John Dodson, Gianluca Ramunno, and Anon Ymous from the
NetBSD project.

Random notes
^^^^^^^^^^^^

- Encoding defaults to *quoted-printable* not *8bit*.
  This has no technical background except that i think it's the better
  default.

- Small progress for the "getting stuck due to the current folder
  becomes inaccessible due to whatever reasons"  problem.
  (schdir(): realpath() local files before leaving CWD.., 2013-01-08)

- The names of temporary files have changed.  Whereas not all uses of
  temporary files already use really meaningful names, it has yet become
  possible to use the pattern "*mail-*"; or, to be compatible with
  NetBSD Mail(1) in one go, "*mail*".  (E.g., in my ~/.vimrc you'd read:
    :au   BufRead,BufNewFile *mutt*,*mail* setl fenc= | setf mail
  [the *mutt* is a leftover from times when i've used MUAs that suck].)

ChangeLog
^^^^^^^^^

- The Quoted-Printable MIME handling has been rewritten completely.
  We now correctly encode files with the MS-DOS newline sequence (CRLF).
  (Part of the *mime-cte* topic branch.)

  S-nail(1) continues to be able to handle text messages and text
  attachments without a trailing newline, but because these
  Content-Transfer-Encoding related things are now handled by the C-T-E
  layer instead of by sendout.c a text message body that comes in as
  part of a complete message via the -t command line option will loose
  the missing final newline (i.e., it'll gain one).
  This problem does *not* occur when *only* the message body comes in
  via STDIN, as in 'cat FILE | s-nail', but *only* when the -t option is
  used.
  (sendout.c: does no(t/ longer) know about CTE internals!, 2013-02-09)

- Filename arguments for -a are now processed *after* all the resource
  files have been loaded etc., so that the usual "folder" specifics can
  be used (provided that proper care for shell quoting was taken).
  ((main(): delay -a processing.., 2013-01-10), as a part of the
  *mainaflags* topic branch.)

- (d38c5bd, When the write command asks.., 2004-11-23) added support
  for pipes when saving attachments during a "write" command.
  It however used the wrong SIGPIPE signal handler; e.g.:

    Enter filename for part 2 (application/x-gzip): |exit
    Segmentation fault

  Of course, it still performs a jump and that most likely leaves memory
  chunks behind, thus causing some memory leaks.  This will be
  a long-term problem (you may want to read [mime.c:fwrite_td(): TODO
  notes on unfixable leaks, 2013-01-14] for more).
  (send.c:sendpart(): fix longjmp() SIGSEGV.., 2013-01-29)

- Fixed a name quoting regression that i've introduced in
  (Rewrite *extract().., 2012-10-20), that would have caused
  "x \"y\" z" to become "x"y" z" instead of "x "y" z".
  (S-nail still does not really have RFC compliant parsers, just as
  NetBSD Mail(1) has, i.e., there are structured and unstructured fields
  etc...  I hope i can provide them in v15.0.)
  (names.c:yankname(): fix quote regression.., 2013-01-29)

- The IDNA conversion now assumes domain names are specified in
  *ttycharset*, rather than in the LC_CTYPE locale charset.
  I.e., it integrates into the usual character set specifications.
  (IDNA: honour *ttycharset* for domain names, 2013-01-18)

- The new *editalong* variable will automatically spawn an editor when
  composing a mail in interactive mode, just as if `~e' was given.
  (Add new *editalong* variable, 2012-01-07)

- The manual has been converted to mdoc.
  (The manual has been converted to mdoc, 2012-12-28)

- The ~@ tilde escape, when given filename arguments, will treat the
  arguments as a comma-separated instead of a whitespace-separated list.
  (collect: change separator of ~@ tilde escape.., 2012-12-28)

  The interactive mode of ~@ has also been changed, rather massively.
  Please do reread what the manual says.
  ((collect: support multiple attachment charsets.., 2013-01-23), as
  part of the *attach* topic branch.)

- Thanks to Gianluca Ramunno (ramunno DOT gianluca AT gmail DOT com)
  S-Nail will no longer try to issue a STARTTLS command when it is about
  to establish a SMTPS connection, a task that logically fails since the
  connection is already secured.
  (Interestingly the nail codebase performs the necessary test for IMAP
  and POP3 already.)
  While here the undocumented nail v11.0 *smtp-use-tls* legacy option
  has been removed.
  (Fix SMPTS with a set *smtp-use-starttls*.., 2012-12-22)

- The RFC 4155 compliant MBOX quoting is now exclusively used, the
  shitty *posix-mbox* variable has been removed again.
  (Shitty because i've implemented RFC 4155 compliant MBOX quoting and
  tested it, then added *posix-mbox* for those who liked the old
  behaviour and did not re-test -- the final code path was buggy.)

  In mails newly created and saved by S-nail(1) no From_ quoting at all
  will be used no more, but instead the rewritten MIME file classifier
  will detect unquoted From_ lines and enforce quoted-printable encoding.
  (This is an approach that is S/MIME compatible all through the way as
  the file data is not modified at all, but only encoded, so that the
  data checksum is not changed.)

  In yet existent mails that S-nail copies or moves around without
  reclassification an RFC 4155 compliant From_ line detector will apply
  MBOXO quoting (prepend a single '>') as necessary.
  Different to the old MBOXRD behaviour S-nail will neither quote yet
  quoted From_ lines ('>>From xy' -> '>>>From xy') nor will it unquote
  one quote level when reading etc. mails ('>> From xy' -> '>From xy').
  As a result the code could be simplified.

  This changeset also incorporates a fix for NetBSD PR bin/47453, as
  reported by Martin Brandenburg.  I.e., some mailers, noticeably
  UW-imap (with MBX format only?), use non-compliant From_ lines with
  RFC 822 date specifications.  Be aware of 'em.
  (RFC 4155 MBOX, and drop *posix-mbox* and foldergets().., 2013-01-06)

- *rfc822-show-all* has been removed.
  It didn't work properly for more complex MIME structures, like
  message/rfc822 messages with attachments etc., just as i've seen today
  on the file(1) mailing list.
  So, instead of hacking it now i've dropped it and will come back with
  a better solution when the MIME and send layers have been overhauled.
  I.e., the real intent was to be able to specify that an embedded
  message/rfc822 is treated as a *unity*, and that's the goal.
  (Drop *rfc822-show-all*, 2013-01-23)
  [The manual will be adjusted in a different commit.]

- *rfc822-no-body-from_* has been renamed to *rfc822-body-from_*.
  It thus must be set explicitly.
  On the other hand it now catches all cases...
  (*rfc822-no-body-from_* -> *rfc822-body-from_*, 2013-01-23)
  [The manual will be adjusted in a different commit.]

- The new *charset-7bit* (defaults to US-ASCII) and *charset-8bit*
  (defaults to UTF-8) have been introduced.
  These are used if seven bit clean data is to be sent, and no
  *sendcharsets* are set or the convertion of all of them failed,
  respectively:

  - There is no functional change unless there is iconv(3) support.
  - There is no functional change unless you set them.
  (Introduce *charset-8bit* and *charset-7bit* variables.., 2013-01-18)
  [The manual will be adjusted in a different commit.]

  In addition the new *sendcharsets-else-ttycharset* variable can now
  be used to automatically use *ttycharset* as a *sendcharset(s)*,
  regardless of the new *charset-8bit* variable.
  (Add *sendcharsets-else-ttycharset* variable, 2013-01-24)
  [The manual will be adjusted in a different commit.]

  NOTE: before we apply charset conversion we now perform a string
  comparison to see wether character sets are identical.  If the strings
  match (case-insensitively), then *no* conversion is performed.
  This means that code like

    $ printf "LATIN1: \0376" | s-nail -Ssendcharsets= -s boom ./out.txt

  *succeeds* in an UTF-8 environment now, whereas older versions would
  fail with an "illegal byte sequence" error (unless the iconv(3)
  library of the system would not perform any conversion that seems
  superflous, of course).

  I thought about making this optional, but, in fact, if this would be
  done in an environment without iconv(3) support then the result would
  be equally corrupt.  And the way it is now we save the expensive and
  superflous conversions.  (See TODO for more.)

  Please *do* reread the manual section "Character sets".
  +++++++++++++++++++++++++++++++++++++++++++++++++++++++

- An attempt was made to improve MIME Content-XY: detection.
  It should be more RFC compliant, and just overall better :);
  a simple one-pass classifier cannot match libmagic(3), of course.

  This changeset removes support of the long obsoleted (4fee1ef,
  2005-01-06) *charset* variable, as well as for the
  *maximum-unencoded-line-length* variable that has been introduced in
  (48a652bd, 2005-07-26).

  For S-nail v14.0 it'll be no longer necessary to do

    $ tr -d '\015' < input | s-nail ...

  to transport files which use the $-DOS (terminal) newline (sequence).
  We still depend upon *sendcharsets* for a while, though.
  (Rewrite file-content classification.., 2013-01-02)

- The new *mime-counter-evidence* variable can be used to force
  a classification of non-text MIME parts (attachments) by their
  filename, i.e., a "reverse-classification" just as would be performed
  if S-nail(1) would itself *send* the file(name).  This can help
  against some stupid MUAs (Apple Mail?) that send .diff etc. files as
  `application/octet-stream' parts etc.

  At a later time this may become a valued option, causing a temporary
  save of unnamed attachments followed by a MIME classification of the
  file contents, followed by forced treatment as plain text if it seems
  to be human readable.  But not yet.  Just to warn you.
  (Add *mime-counter-evidence* variable.., 2012-12-29)

- The special "pipe-" command "@" can be used to force treatment of
  a MIME message part as plain text (e.g.,
  'set pipe-application/pgp-signature=@' will henceforth print those
  signatures inline and as plain text).
  (Introduce the special "@" "pipe-" command, 2012-12-27)

- The MIME types (as from mime.types(5)) will now be cached.  Before
  all possible sources would have been opened, read and parsed for each
  and every message part that required detection of the MIME
  Content-Type:.
  The new "mimetypes" command can be used to show or clear that cache.
  (Add mime.types(5) cache.., 2012-12-27)

- A small set of MIME types (template: ./mime.types) will now become
  compiled into S-nail(1), and be used as a fallback if there are no
  ~/.mime.types and/or no /etc/mime.types, or those didn't contain
  a matching type.  E.g., NetBSD 6 doesn't ship a default database.
  Also, file extensions will be matched case-insensitively (case of
  attribute values is not specified afaik?).
  (Introduce compiled-in mime.types(5).., 2012-12-21)

- The undocumented *charset7* variable was removed.

- The "Message X:" display leader has been changed and will henceforth
  be matchable via "^[-- Message \d+ -- \d+ lines, \d+ bytes --]:$".
  These lines can no longer be suppressed by setting the *quiet*
  option (which was yet possible for print and top, though undocumented).
  (Change "Message X:" display message.., 2012-12-20)

- When displaying multipart messages the "Part X:" introductional string
  has been changed; if the Content-type: header is not *retain*ed, then
  this string will include the part's type and size.  Ditto for
  Content-disposition: and a mentioned attachment filename.
  This is a first step only, for the final version the MIME and send
  layers will have to be adjusted.  But the string will be matchable via
  a "^[-- #.* --]$" regular expression from now on.
  (Change "Part X:" display message.., 2012-12-20)

- MIME boundaries in multipart messages are now handled better in that
  no boundary string should get through to the display.
 (Tweak MIME boundary detection.., 2012-12-20)

- A couple of long standing, even pre-Heirloom mailx(1) memory leaks and
  segmentation violations, most of them related to configurations
  without alloca(3) support, as well as one leak that i have introduced
  when i implemented RFC 4155 MBOX handling, have been fixed.
  But S-nail should now survive non-alloca(3) configurations.
  (*memtracer* topic branch.)

- The Base64 MIME handling has been rewritten completely.
  This was an urgent topic, because the old implementation (a) read in
  all lines of a base64 encoded text part, repeatedly resizing a string
  storage and repeatedly decoding that string until all the lines have
  been swallowed (i.e., or by accident the last decoded byte was
  a newline character, and that in turn may of course have fucked up for
  multi-octet encodings, dependent on the actual byte-order), (b) used
  function local static data to keep state in between multiple
  invocations, which messed up multi-byte/-octet encodings like this

    �5��ɽ���Aɥ����́��٥��������[lots of data follows]

  and (c) did not perform any error checking at all.
  The new one does not run into the problem that (a) tried to circumvent
  since leftover decoded data (as opposed to leftover *encoded* data) is
  transported along the call-chain for later use.  It adds a minimal set
  of error handling ('may now see "[Invalid Base64 encoding ignored]"),
  with more to become possible in later S-nail versions when the entire
  layers are reworked.  (Until then DOS newline sequences [CRLF]
  embedded into base64 will no longer be decoded to Unix LF newlines.)
  Base64 encoded lines will now be 76 characters long, as stated (as
  a maximum value) in RFC 2045, not 72 as before.

  The Base64 code core has been shamelessly stolen from NetBSD's
  Mail(1), and i guess it was the second time that this happened :=).
  (*base64-rewrite* topic branch; and reworked later on the *mime-cte*
  topic branch.)

- The string allocation strategy has been tweaked some more to, i think,
  a final version (regarding algorithm).
  In normal non-interactive send mode it should now no longer need any
  dynamic memory at all (unless some dozen recipients are specified).
  (Several other places still use normal dynamic memory, of course.)
  (*dope-stringdope-again* topic branch.)

- Support for NSS (Network Security Services) has been removed.
  I've never worked with it and are, regarding the complexity of
  network security, not willing to spend any time on it.
  SSL is installed on all systems i'm using and/or testing on by
  default, and so i've choosen to go this way.
  (It may be that sometime in the future S-nail will add support for
  libcurl(3) connectivity, and then it may happen that not only NSS
  support is reintroduced again, but also GNU TLS.  All of that applies
  to network connectivity only, however, not to S/MIME afaik.)
  (*drop-nss-support* topic branch.)

- I finally got a glue and understood that Sourceforge does (a) not
  support symbolic links and (b) doesn't like dots as regular parts of
  filenames.  This means that all this time the promised s-nail.tar.gz
  symbolic link did not work, and that s-nailv13.3.tar.gz wasn't
  accessible either (via the web interface).
  In the future S-nail(1) will not provide any more symbolic links (the
  Sourceforge website offers a "download latest" thing which seems to
  work), and use underscores in filenames -- s-nailv13.3.tar.gz has been
  renamed to s-nailv13_3.tar.gz.  The tags continue to use dot notation.
  Thanks.

- The *heirloom-plus* support branch has been removed.
  The code bases diverged a lot and even more to come.
  It doesn't make sense to put any effort in that.

v13.3, 2012-11-11
-----------------

- Configuration on UnixWare 7.1.4 will succeed (shell issue fixed).

- Even on DragonFly BSD the IMAP GSSAPI is now found
  (in /usr/pkg/include/krb5/gssapi/gssapi.h).

- Support for pkgsrc(7) systems and automatic integration of
  C_INCLUDE_PATH and LD_LIBRARY_PATH path configurations.
  Please see INSTALL.

- Fixes a mortally embarassing regression that the current maintainer
  introduced before i really knew what i was doing, in (If *record* is
  set, avoid writing dead content twice.., 2012-09-14).
  It hit users that send through a MTA and have *record* set; in this
  combination data would not have reached the MTA.
  Interested parties may read the comment in savedeadletter() (part of
  the changeset) or the (Fix MTA/*record* descriptor clash..,
  2012-11-10) commit log.

  Deepest apologies to tortured users from the current maintainer!

- RFC 4155 compatible MBOX file handling has been introduced, and so
  S-nail is now on par with (at least) NetBSD Mail in respect to this.
  It can be turned off with the new *posix-mbox* variable, which you may
  need to use since not all MUAs are capable to dig those MBOX files.
  E.g., less cutting-edge (.-) MUAs fail for this:

   |From - Thu May 10 20:40:54 2012
   |Date: Wed, 07 Nov 2012 11:48:30 +0100
   |To: super@duper.com
   |Subject: super1
   |
   |From me.
   |
   |From - Thu May 10 20:40:54 2012
   |Date: Wed, 07 Nov 2012 11:48:30 +0100
   |To: super@duper.com
   |Subject: super2
   |
   |>From - Thu May 10 20:40:54 2012
   |From - Thu May 10 20:40:54 2012

  I'm not completely happy since S-nail *does* still quote those lines,
  how rare they may be -- it *does* modify message content.  mutt(1)
  implements something more clever and that is quoted-printable encoding
  of the "F" from "From", when seen at the beginning of a line.
  This, when applied to just *any* "^From", will be a non-modifying and
  all-compatible solution.

- SEND_MBOX handling has been changed to discard any Content-Length: and
  Lines: headers when it rewrites a message by default.
  I know that mutt(1) generates them (why, after
  http://www.jwz.org/doc/content-length.html?).
  Anyway, S-nail does neither use nor manage them, so that any
  modification renders those fields invalid, and then it seems best to
  discard them anyway.
  You may turn the new behaviour off with *keep-content-length*.

v13.2, 2012-11-03
-----------------

The problem was that i really wanted to release on a 25th.
But i have been able to improve S-nail(1) some more, so that this is
possibly the first real release of it.  So i'll add only things that
have changed since v13 -- please see below for the complete picture.

- A new CONFIG=CUSTOM make directive was added, and the new user.conf
  variables WANT_SCORE and WANT_DOCSTRINGS have been added.  It is
  possible to create a floating-point free S-nail(1) now.
  Please see INSTALL.

- If a feature is disabled not even functions stubs should remain now.

- Many places which will work only with local filenames do now actually
  check that the target is a local filename.

- Space-separated lists should work again, at a few places at least.

- Tilde commands will be possible, even with -r.

- The *sendmail-progname* has been added after NetBSD 6 dropped the
  send-mail entry in mailer.conf(5), which broke S-nail(1).  Now users
  have an option.

- When editing messages via ~e or ~v file and pipe addressees will no
  longer be lost.

- If recipients occur multiple times spread over lists, i.e., To:, Cc:,
  Bcc:, then only one occurrence remains, and in the "highest-order"
  list.

- The "list" command prints the list alphabetically sorted (somewhat).

- The "help" and "?" commands take an optional argument that shows
  a synopsis string for the given command (unless WANT_DOCSTRINGS was
  false).

- String allocations are now more efficient.  The situation can still be
  improved.  However, for the first time Berkeley Mail(1) integrates
  harmonically into the system allocator, which may madvise(2) unused
  memory to the operating system as necessary and/or possible!

v13.1, 2012-10-25
-----------------

Well, a version number 13 is anyway an ugly thing...

  commit 4f534bb33b7c911272cc66a0e3a9e47b73ad8deb
  Date:   2012-10-25 20:46:07 +0200

      FIX MIME quoted-printable encoding (char cast)..

      (;-{
      Auauauauau!!

      Well, one of the things that have already been started in v13 is
      the turn from using "int" when working with 8-bit characters to
      "unsigned char" (and as long as we do not support wide
      characters).

      Unfortunately one very important piece of code, that is handling
      encoding to quoted-printable, still used integer instead of
      unsigned char, which caused an automatic extension cast to take
      place, and that resulted in a messed up output.
      Sorry!

v13, 2012-10-25
---------------

I want to give prominence to the following people that helped to improve
S-nail(1) during this development cycle, in order of appearance: Martin
Neitzel, Ezequiel Garzón, Björn Persson, Paul Vojta, and, especially,
John Dodson for warm words from beautiful Australia!  Many thanks also
to Christos Zoulas.

After i've officially forked nail(1) aka Heirloom mailx(1) as S-nail(1)
on 2012-09-18 i have been able to work five weeks almost fulltime on
S-nail(1) development.  The first three weeks can be characterized as
hectic fireworks here and there, but then it got better and i was able
to work more or less topic-centric.  In the meanwhile S-nail(1) is more
than 230 commits away from the Heirloom base--and drifting further apart.

S-nail(1) v13 is the first release of S-nail(1), but it was forked from
Heirloom mailx(1) 12.5 7/5/10 that arose from Berkeley Mail 8. unless
i'm mistaken.  What characterizes S-nail(1) v13?

- The build system has been reworked almost completely.
  It is possible to fine-tune which features should be present in the
  binary and which don't.  The name of the binary can be chosen, and
  that choice is reflected all through the manual and the template
  resource file.  The manual is always complete and thus may document
  features that are not supported by the actual binary, though.
  Please see INSTALL for more.

- Compiler warnings can now be used.  Please see the example WARN= flags
  in the Makefile, but '-Wall -Wextra -pedantic' should be silent though
  certainly insufficient to reflect the complex work of modern compilers.

- The following recipient address list combines some of the major
  improvements that have been made:

    <addr1@cdröm.de>  (bier) , ./file1,
    Steffen Smöregäs (Humbabä) <sauer@bäüer.de> (Hummpäa)    ,
         sabberlot@träbbel.de  ,  (bier2) <a2@bür2.de> ,
       a3@b3.de (bier3)  , <a4@b4.de> (bier4, und \"bier5\")  ,
    |cat > pipe1 ,   (bier 6) <a6@bür6.de>  ,   ./file2        ,
    (co\$mm1) abc1@düf.de (cö,bmm,2)   (co\"m\"m.3) ,
    co\$bmm1 \"c,ömm2\" co\"m\"m.3 <abc2@däf2.de>  ,  |cat > pipe2 ,
    moppel@höppel.org

  That, on a single line, may be given to ":m" or (quoted) on the
  command line, or to "~c" or whatever, and it will work as expected
  (well, everything else would be a bug..) and result in the following
  sendmail(1) invocation:

  SENDMAIL.SH
  <-i a2@xn--br2-hoa.de a3@b3.de a4@b4.de a6@xn--br6-hoa.de abc1@xn--df-xka.de abc2@xn--df2-qla.de addr1@xn--cdrm-7qa.de moppel@xn--hppel-jua.org sabberlot@xn--trbbel-cua.de sauer@xn--ber-qla4j.de>
  >>>>>>>>>>>>>>>>>
  Date: Thu, 25 Oct 2012 17:12:15 +0200
  To:
  Cc: Steffen =?utf-8?Q?Sm=C3=B6reg=C3=A4s?=
    =?utf-8?Q?_(Humbab=C3=A4)?= <sauer@xn--ber-qla4j.de> (=?utf-8?Q?Hummp=C3=A4a?=),
    sabberlot@xn--trbbel-cua.de, moppel@xn--hppel-jua.org,
    <addr1@xn--cdrm-7qa.de> (bier),
    co$bmm1 =?utf-8?Q?"c,=C3=B6mm2"?= co"m"m.3 <abc2@xn--df2-qla.de>,
    (co$mm1) abc1@xn--df-xka.de (=?utf-8?Q?c=C3=B6,bmm,2?=) (co"m"m.3),
    (bier 6) <a6@xn--br6-hoa.de>, <a4@b4.de> (bier4, und "bier5"),
    a3@b3.de (bier3), (bier2) <a2@xn--br2-hoa.de>
  Subject: Re: SubjectTest
  MIME-Version: 1.0
  Content-Type: text/plain; charset=us-ascii
  Content-Transfer-Encoding: 7bit

  body
  <<<<<<<<<<<<<<<<<

  So list parsing has been fixed, IDNA support has been added, and it is
  possible to mix pipe and file recipients *and* multiple thereof, and
  the result is still correct for *all* of them.
  I think this kind of list can be given wherever a user can directly
  enter such a list.  And i think all that is unique to S-nail(1).

- When writing back edited messages the target MBOX mailbox can no
  longer become "corrupted" when the trailing newline was removed during
  the edit.  Also affected FreeBSD and NetBSD mail(1).

- A security fix for CVE-2011-2895 was applied.

- The generated Message-Id: is now more human-friendly.

- The -h command line option has been dropped.  Use "-O -h XY" if your
  MTA really supports that.

- The -O and -r command line options no longer enforce a one-shot send
  mode, and instead persist for the duration of the entire session.

- Variables set via the -S command line option are now (un)set twice;
  immediately and after all the resource files have been loaded.

- Other new or changed options/commands, in order of appearance:
  recipients-in-cc, smime-sign-include-certs, quote-fold, stealthmua,
  add-file-recipients, write, rfc822-no-body-from_, rfc822-show-all,
  mail/Mail, idna-disable, idna-strict-checks, ??

- In the codebase itself an effort to reduce duplicate work and
  introduce caching, and to minimize the use of local variables, was
  started, but that is long term.  A lot of improvements here and there,
  too, like using the well MD5 optimization from Wei Dai, Chris Torek's
  hash algorithm for hash tables etc.

- Incredibly important: an heraldic animal was found: snailmail.jpg!

The full history can be inspected by issuing the git(1) command

  $ git log --reverse s-nail..s-nailv13

A new TODO has been introduced, and it is getting longer and longer.
Thanks.

# s-ts-mode
