Steffen Nurpmeso wrote in
 <20210402231739.syrfe%[email protected]>:
 |[email protected] wrote in
 | <20210401111050.qfewh%[email protected]>:
 ...
 ||In another context, I'm thinking about encrypting my whole MAILRC in \
 ||addition
 ||to the NETRC files. Naively, I assumed I could pass the MAILRC content to
 ||s-nail by stdin, without using a temporary file. My tests with -: weren't
 ||that successful. With 14.9.22, do you think it is actually possible ?
 |
 |No.  Well, you actually can use the batch mode to read commands
 |from standard input, of course:
 |
 |  $ printf 'echo one; echo two\nechoerr three' | s-nail -:/ -#
 |  one
 |  two
 |  three
 |
 |So placing this in a script and decrypting some file on the fly,
 |passing that output to s-nail in batch mode is of course possible.

Other than that we now support pipe notation for the `source'
command.  So while not possible to use encrypted $MAILRC or even
*mailx-extra-rc*, you could very well create an additional,
encrypted file, and `source' it when you need it.

  $ s-nail -:/ -X 'source "echo echo your thing|"; xit'
  your thing

With the trailing vertical bar | all arguments of `source' are
passed to the shell via -c, and the generated output will be read
until EOF.

 |Ciao, and a nice weekend i wish from Germany,

Found that egg. :)
Hopping off now,
Ciao from Germany

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