On 2022-05-19 12:05:59, Kevin J. McCarthy wrote: > On Thu, May 19, 2022 at 01:12:31PM -0500, Derek Martin wrote: > > On Thu, May 19, 2022 at 11:06:38AM -0700, Kevin J. McCarthy wrote: > > > Sorry, this isn't currently possible in Mutt. The $sendmail variable is > > > handled specially: it's tokenized by space and invoked directly via > > > execvp(). So you won't be able to use arguments with spaces in them > > > inside > > > the variable, or any shell quoting since it doesn't pass through the > > > shell. > > > > Couldn't you do something like the following? > > > > set my_sendmail=/usr/bin/msmtp [...] --passwordeval=$(gpg --no-tty -q -d > > ~/.user.gpg)" > > set sendmail=$my_sendmail > > > > Don't know, haven't tried it, but as long as the first thing evaluates > > to something that sendmail's tokenization can handle, seems like it > > should work... > > $sendmail goes through muttrc evaluation like other variables, but when > invoked to send an email, the resulting string is tokenized by space, '--' > and various arguments inserted as needed, and then passed to execvp(). > > Yes, this should be documented and I'll add it to the config option shortly. > > I don't know why it was written this way, perhaps some security concerns, > but I agree that it's surprising. > Thanks very much sir. I think this finally closes the last question of this -long- email thread...
I'm not sure if marking as "SOLVED", like in forum threads, applies here in mailing lists. But if it does, before actually doing it, just a small last question: Do you think this could be modified in Mutt's source? As in, kind of a Github-like ticket/issue petition to make it work with arguments with spaces... I try asking because you make it sound as if there were doubts regarding why this is currently coded like this. Most likely I'm wrong, but, do you think a small analysis could be in place? Could it be changed *without* compromising security indeed? Of course, if it doesn't turn too impractical, neither; and if it's worth Thanks very much for your help.