Hello and a good day.

Noctambule wrote in
<VoDeZrZpg0_t9tDNC1tLAY4K_KTfHPwu7YQHxi9O0d587pGBHzKDb8e-EBRaymOd19nWETn\
LspLmhXcyqCHLQ_mfwPxHWqSsAvJpMzldUlI=@protonmail.com>:
 |I feel a bit embarrassed to send you this email directly, but even
 |if I sent it to S-mailx-request five days ago, I can't see it in
 |archives. Therefore, I do not really know if you received it. If

No, it seems that was directly discarded:

  Apr 09 15:50:35 .. No command, message discarded... protonmail.com

Sorry for this!
s-mailx@ would have been right unless you wanted to subscribe:

  #?0|kent:src$ s-nail -#Y 'echo $contact-mail; x'
  s-mailx@lists.sdaoden.eu

So it is ok to forward to the list then, i blindly presume?
Feel free to respond/post in the future.

 |you already saw it, please accept my apologies.

Absolutely not needed, but: sure thing.

 |That was the message :
 |
 |At work, I extensively use S/MIME and due to the recent event, I
 |had to use s-nail to read my emails. S/MIME decryption works quite
 |nicely but I still have a problem. When I attempt to read an

It needs a rework for those messages which get mangled (aka
enwrapped in new envelope) by mailing-lists, for example.  Yes.

 |encrypted mail, the PAGER is launched before I see the "PEM pass phrase:"
 |prompt. So we can't see that prompt If I blindly type my password,
 |the mail is finally decrypted but the PAGER get messed up.

Yes i know, that is a real pity.  It needs a complete rewrite of
the MIME (and input/output) layer to get it right, what is the
plan for v15 (for many years).  Because this MUA can per
definition work on many or all messages of a mailbox at once, and
we parse the messages as we go, but may start $PAGER beforehand..

Since i had the same problem i added a "credential helper" which
could possibly solve your problem, too.  It is documented under
smime-sign-cert-USER@HOST, including bad english at [1]:

  For signing and decryption purposes it is possible to use encrypted
  keys, and the pseudo-host(s) ‘USER@HOST.smime-cert-key’ for the
  private key (and ‘USER@HOST.smime-cert-cert’ for the certificate
  stored in the same file) will be used for performing any necessary
  password lookup, therefore the lookup can be automated via the
  mechanisms described in "On URL syntax and credential lookup".
  For example, the hypothetical address ‘b...@exam.ple’ could be
  driven with a private key / certificate pair path defined in
  smime-sign-cert-...@exam.ple, and needed passwords would then be
  looked up via the pseudo hosts ‘b...@exam.ple.smime-cert-key’ (and
  ‘b...@exam.ple.smime-cert-cert’).  To include intermediate certifi‐
  cates, use smime-sign-include-certs.

  [1] https://www.sdaoden.eu/code-nail.html#560

I had the necessary passwords in my ~/.netrc, but which is
encrypted via gpg.  So i have

  set netrc-lookup netrc-pipe='gpg -qd ~/.netrc.gpg'

and in there one found

  machine HOST.smime-cert-key login steffen password ....

and so i did not have to type in something, the password would be
fetched automatically.  You could use all other password sources
too, as documented in [2].

  [2] https://www.sdaoden.eu/code-nail.html#12

Having said that, our s_mime test does not yet (!) test this
password query, and i have not used it for long.  I think i will
add a first simple case when i come back to the mailer, hopefully
not later but next week.  But should work, nothing has changed.

 |The keys assigned to commands are not applied. For example, if a type
 |"Up", "Down" and "Backspace", it shows the following results :
 |
 |:^[OA^[OB^?

When does that happen?  When you are asked for the password??

 |The only way to go down is to type on "Return", but the output will
 |be also messed up. Every line will have glitches like this :
 |
 |:
 |All servers will be using Debian buster
 |:

This looks like less(1), actually.  Hmmm...  This makes me wonder.
Which version of s-nail do you actually use?  There has been
a complete rewrite of the child process and termios handling in
v14.9.14 (released 2019-07-27), and such a problem should not
happen.  You must be using an elder version?

  (The problem with the prompt is still there, however, since we
  print it as the parser discovers the S/MIME part, which is not
  necessarily in sync with what you see in $PAGER, and _if_ you
  use multiple S/MIME certificates you have to guess.  That i will
  also change, a little hint at least is possible.  The real
  solution will come in v15, were we first iterate over _all_
  messages to be shown / copied / xy, ask for all passwords as
  necessary, and _then_ perform the desired action.)

 |At this point, the only way to go back is to CTRL + C. I hope you
 |understand my description. :)

Yes.  Yes, i think you must be using an elder version, the Debian
policy is pretty unfriendly to a small project like this, there
have been many bugfixes and huge changes i consider stable (almost
a thousand changesets) in between the v14.9.11 of Debian stable
and v14.9.17 in testing/unstable.  Sorry!

But really, if you use that "pseudo-host" mechanism shown above
you can avoid password prompts altogether, and the bad background
/ foreground process termios mess in between s-nail and less
should not happen.
I hope this helps.

Ciao,

--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