Hello Norman.

[email protected] wrote:
 |I am transitioning from heirloom mailx to s-mailx.  I have been using

Hm, nice.  Thank you.

 |s-mailx version 14.8 as shipped with Debian stretch.  But I recently
 |tried a snapshot of the current 14.9 development, and there are a
 |bunch of incompatibilities.  Errors listed below, but I see at least
 |this set of problems:
 |
 |  - The # character is no longer interpreted as a comment marker (from
 |    # to end of line).  Instead, there is a # command.  This behavior
 |    is documented but not useful.

Of course it is.  # has always been a comment-command, it never
was a shell-style comment start character.  This has changed in
v14.9 with the new shell-style parser and will be everywhere in
v15.  You can use # as a shell style comment starter for all
commands which use the new shell-style parser, or for old commands
which support the `wysh' command modifier which warps the command
forward to shell-style syntax.

  wysh set pro=zac # This a comment is
  alternates [email protected] # This also comment is

 |  - Software is bleating about ! in alias names, but these are not
 |    aliases, they are alternates.  It seems to alternate complaining
 |    about aliases and alternates.

Hm.  That indeed is an interesting observation.  We do test
aliases according to Postfix aliases(5), plus dot extension.
Maybe that should be undone again.

 |  - The ! character ought to be acceptable in alternates.  Usenet
 |    lives, and I have no desire to destroy my history of
 |    alternates---I'm sure I still have archived mail that uses those
 |    alternates. 

Dear Norman, yes, `alternates' now verifies that the argument is
a valid address.  UUCP seems not to be a valid address.  Sorry.

Heirloom mailx may not touch that stuff and pass it through
unchanged, but that is not "support for UUCP addresses".  It does
not take that into account when testing for identical addresses or
whatever.  We have very primitive yet complicated address parsers.
We support address verification to the best we can, so that users
can say '-S expandaddr=failinvaddr' and be pretty sure that this
bails for invalid addresses.

I shortly had fever and desire when Warren Toomey announced his
UUCP project, but the current codebase uses a terrible mess of
interpreting strings as addresses, then tearing the addresses
apart into strings again, and back and forth again, etc., and
unfortunately i made this mistake in 2012/13 and did not introduce
the global name (address) (object) bypass, now we are stuck with
that until v15 comes and represents addresses as objects which are
created once and then carried all along the path.  Unfortunately.

No, i will not add UUCP address support before v15.  But
especially not before i went away for some time to make my roff
compile.  I need a break.  I think we actually could add
extensions for `alias' so that the semicolon is treated as a valid
character, but the expansion must then be valid.
I hope this gets you going.

 |  - Software bleats about invalid alias names if the aliases contain /
 |    or ) characters.  The restrictions are documented, but they seem
 |    gratuitous.
 |
 |  - s-nail doesn't like Latin-1 characters in alias names.  This
 |    position is defensible.  However, it also complains about UTF-8
 |    alphanumeric characters in alias names.  This position is
 |    indefensible.

I added that these follow Postfix aliases(5) rules.
And we now support any byte with the high-bit set as well as
exclamation mark may be used:

  ? ali
  s-nail: READ 3 bytes <ali>
  alias alias  "mailrus!Princeton.EDU!nr"
  alias björn-von-sydow  "[email protected]"
  alias mailrus!Princeton.EDU!nr  "björn-von-sydow"
  ? m alias
  s-nail: READ 7 bytes <m alias>
  ERROR# Subject: bla
  s-nail: READ 3 bytes <bla>
  ERROR# ^D
  -------
  Envelope contains:
  To: alias
  Subject: bla
  Send this message [yes/no, or recompose]? y
  s-nail: READ 1 bytes <y>
  s-nail: >>> MTA: /usr/bin/sendmail, arguments: sendmail -i -- 
[email protected]
  s-nail: >>> Date: Fri, 08 Sep 2017 18:08:06 +0200
  s-nail: >>> To: [email protected]
  s-nail: >>> Subject: bla
  s-nail: >>> User-Agent: s-nail v14.9.3-102-gd4a3c407-dirty
  s-nail: >>>
  s-nail: memreset: freed 16 chunks/11790 bytes
  ERROR# ? x
  s-nail: READ 1 bytes <x>
  s-nail: CMD 10 bytes <unbind * *>
  s-nail: memreset: freed 57 chunks/36056 bytes

Ok?

 |If I were king, I would request
 |
 | A. Any # that is preceded by whitespace marks a comment to the end of
 |    the line.

As above.  It must be the start of a shell token, as documented in
COMMANDS i think.

 | B. Any non-whitespace character should be acceptable in an alias
 |    name.

Nay, we have rules to adhere to (see "On sending mail, and
non-interactive mode", starting with the paragraph that talks on
message recipients).  We may support more characters, but we
should be able to generate helpful messages etc.  And we need to
have the shell parser all through, this is yet undefined area.

 |There are many other ways to deal with the alias issue, but choice B
 |allows one to deal with UTF-8 relatively easily.

Nah.  Only if your current locale is UTF-8, too.  Terrible thing,
we will have an `u' command modifier at some later time for
commands such as `alias', `source', some more, which allow one to
create portable and locale-independent resources.  (Such haunts in
my head for several years, but of course the knowledge must be
carried around, the software must simply be able to deal with that
properly, all the time.  Thus i delayed the idea until my ctext
library comes along, i never would have thought all that takes
sooo long!  ;|)

 |Sample lines from my .mailrc:
 |
 |  set replyall # doesn't work on cs

Use "wysh set replyall # comment"

 |  ignore via message-id status received
 |  set editheaders    # s-nail

Of course `wysh' is not portable to other mail(1)/Mail(1)
incarnations, you may create a specific one and include that via

  set mailx-extra-rc=FILE

 |  alias björn-von-sydow [email protected]
 |  alternates mailrus!Princeton.EDU!nr idacrd!princeton!nr
 |
 |Error messages from my full .mailrc (which I'm not posting to the list):
 |
 |s-nail: Variable is read-only: #
 |s-nail: Variable name with control character ignored: doesnt work on cs

Yeah, because the ' single-quote is a quote character with
old-style quoting, and thus the name extends to end-of-line.
Just use `wysh', or define a command-alias:

  commandalias wset wysh set

and then

  wset replyall # doesn't work on cs

 |s-nail: Variable is read-only: #
 |s-nail: mailrus!Princeton.EDU!nr is an invalid alias name
 |s-nail: Invalid `alternates' argument: mailrus!Princeton.EDU!nr
 |s-nail: idacrd!princeton!nr is an invalid alias name
 |s-nail: Invalid `alternates' argument: idacrd!princeton!nr
 |s-nail: rutgers!hpsemc.cup.hp.com!princeton!nr is an invalid alias name
 |s-nail: Invalid `alternates' argument: rutgers!hpsemc.cup.hp.com!princeton!n\
 |r
 |s-nail: surya!att!princeton!nr is an invalid alias name
 |s-nail: Invalid `alternates' argument: surya!att!princeton!nr

This will now work.  Because: we only test for validity of
something, the above are treated as aliases, and ! is now valid
therein.  For now i have no idea how to improve the messages,
maybe separate it as in "xy: is alias: invalid content" or
something.

 |s-nail: Not a valid alias name: amelio-v�zquez
 |s-nail: Not a valid alias name: j�rgen-h�tzel
 |s-nail: Not a valid alias name: christian-k�stner
 |s-nail: Not a valid alias name: 'rudy-service)'
 |s-nail: Not a valid alias name: tufts/celt
 |s-nail: Not a valid alias name: jonas-tr�mper
 |s-nail: Not a valid alias name: bj�rn-von-sydow
 |s-nail: Not a valid alias name: pierre-malo-deni�lou
 |s-nail: Not a valid alias name: j�r�me-vouillon
 |s-nail: Not a valid alias name: amazon/web
 |s-nail: Not a valid alias name: vilhelm-sj�berg
 |s-nail: Not a valid alias name: françois-pottier

Should work now, but because we simply wave through high-bits.

Along this hour long journey that lead to this reply i have fixed
some bugs too.  All that on [master] now.

Thanks for your thoughts!

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to