Hello Tomáš.

Tomáš Korbař wrote in
 <7fA.4EaGR.7SIopycJQa{[email protected]>:
 |I am trying to help with migration of machine, that was using mailx, to s-
 |nail.
 |
 |The machine was using script that sent mail to multiple addresses, \
 |and used 
 |comma
 |
 |as a delimiter. 
 |
 |Like this:
 |
 |$ echo "test" | s-nail -s "test" [email protected],[email protected]
 |
 |This is no longer possible in s-nail. Unfortunately some machine have to 
 |stay
 |with mailx and i am trying to remove the necessity to maintain two versions
 |of the same script.
 |Is there any combination of options that would allow such behavior?
 |If there is not, would you be open to me trying to implement this?

-T / --target with To: should do that quick and easy:

  </dev/null s-nail -:/ -Smta=test -s "test" \
    -T to:'[email protected],[email protected]'
  From steffen Tue Oct  8 22:07:58 2024
  Date: Tue, 08 Oct 2024 22:07:58 +0200
  To: [email protected], [email protected]
  Subject: test
  User-Agent: s-nail v14.9.25-608-ge479530e8d

  (Yes it was disallowed in 2019 for v14.9.12 says git, because
  the address parser is so terribly bad, and you will never know
  bad outcome for bad input.  The new one in v14.10 is a hundred
  percent RFC 5322, but not yet integrated, .. and -b, -c and the
  normal To: recipient lists will continue to be parsed as
  a single address.)

 |Thanks for any help.

Btw if you leave away the comma separation it should just work
anyway and out of the box.  This is backward compatible, too.

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